- Timestamp:
- 2007-08-22T17:35:09Z (17 years ago)
- Branches:
- master
- Children:
- 53b71d3
- Parents:
- 99426f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r99426f0 rbbba374 31 31 32 32 /* 33 * Enumerations 34 */ 35 36 typedef enum 37 { 38 SKYPE_CALL_RINGING, 39 SKYPE_CALL_MISSED 40 } skype_call_status; 41 42 /* 33 43 * Structures 34 44 */ … … 44 54 * the body. */ 45 55 char *handle; 56 /* This is necessary because we send a notification when we get the 57 * handle. So we store the state here and then we can send a 58 * notification about the handle is in a given status. */ 59 skype_call_status call_status; 46 60 }; 47 61 … … 274 288 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); 275 289 skype_write( ic, buf, strlen( buf ) ); 290 sd->call_status = SKYPE_CALL_RINGING; 291 } 292 else if(!strcmp(info, "STATUS MISSED")) 293 { 294 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); 295 skype_write( ic, buf, strlen( buf ) ); 296 sd->call_status = SKYPE_CALL_MISSED; 276 297 } 277 298 else if(!strncmp(info, "PARTNER_HANDLE ", 15)) 278 299 { 279 300 info += 15; 280 imcb_log(ic, "The user %s is currently ringing you.", info); 301 switch(sd->call_status) 302 { 303 case SKYPE_CALL_RINGING: 304 imcb_log(ic, "The user %s is currently ringing you.", info); 305 break; 306 case SKYPE_CALL_MISSED: 307 imcb_log(ic, "You have missed a call from user %s.", info); 308 break; 309 } 281 310 } 282 311 }
Note: See TracChangeset
for help on using the changeset viewer.