Changeset adce2de
- Timestamp:
- 2007-08-19T17:35:34Z (17 years ago)
- Branches:
- master
- Children:
- 592f824
- Parents:
- ddd3502
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
rddd3502 radce2de 1 1 What works: 2 2 3 - Download buddies from Skype3 - Download nicks and away statuses from Skype 4 4 5 5 What needs to be done: 6 6 7 - Away status es (now OFFLINE = Offline, anything else is Online)7 - Away status changes 8 8 9 9 - join / parts -
skype/skype.c
rddd3502 radce2de 18 18 int tx_len; 19 19 int r_inpa, w_inpa; 20 }; 21 22 struct skype_away_state 23 { 24 char *code; 25 char *full_name; 26 }; 27 28 const struct skype_away_state skype_away_state_list[] = 29 { 30 { "ONLINE", "Online" }, 31 { "SKYPEME", "Skype Me" }, 32 { "AWAY", "Away" }, 33 { "NA", "Not available" }, 34 { "DND", "Do Not Disturb" }, 35 { "INVISIBLE", "Invisible" }, 36 { "OFFLINE", "Offline" } 20 37 }; 21 38 … … 82 99 else if(!strncmp(line, "USER ", 5)) 83 100 { 101 int flags = 0; 84 102 char *status = strrchr(line, ' '); 85 103 char *user = strchr(line, ' '); 104 status++; 86 105 ptr = strchr(++user, ' '); 87 106 *ptr = '\0'; … … 89 108 imcb_add_buddy(ic, ptr, NULL); 90 109 // TODO online can be away 91 if(strcmp(++status, "OFFLINE") != 0) 92 imcb_buddy_status(ic, ptr, OPT_LOGGED_IN, NULL, NULL); 110 if(strcmp(status, "OFFLINE") != 0) 111 flags |= OPT_LOGGED_IN; 112 if(strcmp(status, "ONLINE") != 0 && strcmp(status, "SKYPEME") != 0) 113 flags |= OPT_AWAY; 114 imcb_buddy_status(ic, ptr, flags, NULL, NULL); 93 115 g_free(ptr); 94 116 } … … 170 192 { 171 193 static GList *l = NULL; 172 173 l = g_list_append( l, (void*)"Online" ); 194 int i; 195 196 if( l == NULL ) 197 for( i = 0; skype_away_state_list[i].full_name; i ++ ) 198 l = g_list_append( l, (void*) skype_away_state_list[i].full_name ); 199 174 200 return l; 175 201 }
Note: See TracChangeset
for help on using the changeset viewer.