Changeset 36f6ab3 for protocols


Ignore:
Timestamp:
2013-02-28T07:15:49Z (7 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
b2b7f52
Parents:
c440320
Message:

skype: add support for fetching full names of buddies

Location:
protocols/skype
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skype.c

    rc440320 r36f6ab3  
    118118         * created. */
    119119        char *pending_user;
     120        /* If the info command was used, to determine what to do with FULLNAME result. */
     121        int is_info;
    120122};
    121123
     
    320322
    321323        nicks = g_strsplit(line + 6, ", ", 0);
    322         for (i = nicks; *i; i++)
     324        for (i = nicks; *i; i++) {
    323325                skype_printf(ic, "GET USER %s ONLINESTATUS\n", *i);
     326                skype_printf(ic, "GET USER %s FULLNAME\n", *i);
     327        }
    324328        g_strfreev(nicks);
    325329}
     
    375379                if (set_getbool(&ic->acc->set, "show_moods"))
    376380                        imcb_log(ic, "User `%s' changed mood text to `%s'", user, buf);
    377         } else if (!strncmp(ptr, "FULLNAME ", 9))
    378                 sd->info_fullname = g_strdup(ptr + 9);
    379         else if (!strncmp(ptr, "PHONE_HOME ", 11))
     381        } else if (!strncmp(ptr, "FULLNAME ", 9)) {
     382                char *name = ptr + 9;
     383                if (sd->is_info) {
     384                        sd->is_info = FALSE;
     385                        sd->info_fullname = g_strdup(name);
     386                } else {
     387                        char *buf = g_strdup_printf("%s@skype.com", user);
     388                        imcb_rename_buddy(ic, buf, name);
     389                        g_free(buf);
     390                }
     391        } else if (!strncmp(ptr, "PHONE_HOME ", 11))
    380392                sd->info_phonehome = g_strdup(ptr + 11);
    381393        else if (!strncmp(ptr, "PHONE_OFFICE ", 13))
     
    15031515static void skype_get_info(struct im_connection *ic, char *who)
    15041516{
     1517        struct skype_data *sd = ic->proto_data;
    15051518        char *ptr, *nick;
    15061519        nick = g_strdup(who);
     
    15081521        if (ptr)
    15091522                *ptr = '\0';
     1523        sd->is_info = TRUE;
    15101524        skype_printf(ic, "GET USER %s FULLNAME\n", nick);
    15111525        skype_printf(ic, "GET USER %s PHONE_HOME\n", nick);
  • protocols/skype/t/add-yes-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> SET USER bob BUDDYSTATUS 2 Please authorize me
    1214<< USER bob BUDDYSTATUS 2
  • protocols/skype/t/added-no-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113<< USER bob RECEIVEDAUTHREQUEST Please allow me to see when you are online
    1214>> SET USER bob ISAUTHORIZED FALSE
  • protocols/skype/t/added-yes-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113<< USER bob RECEIVEDAUTHREQUEST Please allow me to see when you are online
    1214>> SET USER bob ISAUTHORIZED TRUE
  • protocols/skype/t/call-failed-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS OFFLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> CALL bob
    1418<< CALL 216 STATUS UNPLACED
  • protocols/skype/t/call-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS OFFLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> CALL bob
    1418<< CALL 178 STATUS UNPLACED
  • protocols/skype/t/called-no-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317<< CALL 212 CONF_ID 0
    1418<< CALL 212 STATUS RINGING
  • protocols/skype/t/called-yes-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317<< CALL 208 CONF_ID 0
    1418<< CALL 208 STATUS RINGING
  • protocols/skype/t/ctcp-help-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
  • protocols/skype/t/filetransfer-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317<< FILETRANSFER 208 TYPE INCOMING
    1418<< FILETRANSFER 208 PARTNER_HANDLE bob
  • protocols/skype/t/group-read-skyped.mock

    rc440320 r36f6ab3  
    1717>> GET USER echo123 ONLINESTATUS
    1818<< USER echo123 ONLINESTATUS ONLINE
     19>> GET USER echo123 FULLNAME
     20<< USER echo123 FULLNAME Echo / Sound Test Service
    1921>> GET USER bob ONLINESTATUS
    2022<< USER bob ONLINESTATUS ONLINE
     23>> GET USER bob FULLNAME
     24<< USER bob FULLNAME Bob
    2125>> GET USER cecil ONLINESTATUS
    2226<< USER cecil ONLINESTATUS ONLINE
     27>> GET USER cecil FULLNAME
     28<< USER cecil FULLNAME Cecil
    2329>> GET USER daniel ONLINESTATUS
    2430<< USER daniel ONLINESTATUS ONLINE
     31>> GET USER daniel FULLNAME
     32<< USER daniel FULLNAME Daniel
    2533>> GET USER emily ONLINESTATUS
    2634<< USER emily ONLINESTATUS OFFLINE
     35>> GET USER emily FULLNAME
     36<< USER emily FULLNAME Emily
  • protocols/skype/t/groupchat-invite-bitlbee.mock

    rc440320 r36f6ab3  
    55<< PRIVMSG &bitlbee :account add skype alice foo
    66<< PRIVMSG &bitlbee :account skype on
     7>> :bob!bob@skype.com JOIN :&bitlbee
    78<< PRIVMSG &bitlbee :chat with bob
    89>> 353 alice = ##alice/$bob;a7ab206ec780 :@alice bob @root
  • protocols/skype/t/groupchat-invite-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> GET USER cecil ONLINESTATUS
    1418<< USER cecil ONLINESTATUS ONLINE
     19>> GET USER cecil FULLNAME
     20<< USER cecil FULLNAME Cecil
    1521>> CHAT CREATE bob
    1622<< CHAT #alice/$bob;a7ab206ec78060f1 STATUS DIALOG
  • protocols/skype/t/groupchat-invited-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS OFFLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> GET USER cecil ONLINESTATUS
    1418<< USER cecil ONLINESTATUS OFFLINE
     19>> GET USER cecil FULLNAME
     20<< USER cecil FULLNAME Cecil
    1521<< CHAT #cecil/$bob;4d8cc9965791c6b9 NAME #cecil/$bob;4d8cc9965791c6b9
    1622<< CHAT #cecil/$bob;4d8cc9965791c6b9 STATUS MULTI_SUBSCRIBED
  • protocols/skype/t/info-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> GET USER bob FULLNAME
    1418<< USER bob FULLNAME Bob
  • protocols/skype/t/login-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
  • protocols/skype/t/msg-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> GET USER bob ONLINESTATUS
    1214<< USER bob ONLINESTATUS ONLINE
     15>> GET USER bob FULLNAME
     16<< USER bob FULLNAME Bob
    1317>> MESSAGE bob foo
    1418<< CHATMESSAGE 290 STATUS SENDING
  • protocols/skype/t/set-mood-text-skyped.mock

    rc440320 r36f6ab3  
    99>> GET USER echo123 ONLINESTATUS
    1010<< USER echo123 ONLINESTATUS ONLINE
     11>> GET USER echo123 FULLNAME
     12<< USER echo123 FULLNAME Echo / Sound Test Service
    1113>> SET PROFILE MOOD_TEXT foo bar
    1214<< PROFILE MOOD_TEXT foo bar
Note: See TracChangeset for help on using the changeset viewer.