Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skype.c

    r2487112 rb2dc873  
    4646enum {
    4747        SKYPE_FILETRANSFER_NEW = 1,
     48        SKYPE_FILETRANSFER_TRANSFERRING,
     49        SKYPE_FILETRANSFER_COMPLETED,
    4850        SKYPE_FILETRANSFER_FAILED
    4951};
     
    8183        /* Same for file transfers. */
    8284        int filetransfer_status;
     85        /* Path of the file being transferred. */
     86        char *filetransfer_path;
    8387        /* Using /j #nick we want to have a groupchat with two people. Usually
    8488         * not (default). */
     
    783787                        id);
    784788                sd->filetransfer_status = SKYPE_FILETRANSFER_FAILED;
     789        } else if (!strcmp(info, "STATUS COMPLETED")) {
     790                skype_printf(ic, "GET FILETRANSFER %s PARTNER_HANDLE\n", id);
     791                sd->filetransfer_status = SKYPE_FILETRANSFER_COMPLETED;
     792        } else if (!strcmp(info, "STATUS TRANSFERRING")) {
     793                skype_printf(ic, "GET FILETRANSFER %s PARTNER_HANDLE\n", id);
     794                sd->filetransfer_status = SKYPE_FILETRANSFER_TRANSFERRING;
     795        } else if (!strncmp(info, "FILEPATH ", 9)) {
     796                info += 9;
     797                sd->filetransfer_path = g_strdup(info);
    785798        } else if (!strncmp(info, "PARTNER_HANDLE ", 15)) {
    786799                info += 15;
     
    795808                        imcb_log(ic, "Failed to transfer file from user %s.",
    796809                                info);
     810                        break;
     811                case SKYPE_FILETRANSFER_COMPLETED:
     812                        imcb_log(ic, "File transfer from user %s completed.", info);
     813                        break;
     814                case SKYPE_FILETRANSFER_TRANSFERRING:
     815                        if (sd->filetransfer_path) {
     816                                imcb_log(ic, "File transfer from user %s started, saving to %s.", info, sd->filetransfer_path);
     817                                g_free(sd->filetransfer_path);
     818                                sd->filetransfer_path = NULL;
     819                        }
    797820                        break;
    798821                }
Note: See TracChangeset for help on using the changeset viewer.