Changeset df9255d
- Timestamp:
- 2007-10-06T15:16:06Z (17 years ago)
- Branches:
- master
- Children:
- 3922d44
- Parents:
- 7e66424
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
r7e66424 rdf9255d 182 182 - Detect when somebody wants to add you and ask for confirmation 183 183 184 - Detect when somebody wants to transfer a file 185 184 186 == What needs to be done (aka. TODO) 185 187 … … 193 195 194 196 - Add a question callback for calls. 195 196 - Somehow at least mention that somebody offers a file for transfer.197 197 198 198 == I would like to have support for ... -
skype/skype.c
r7e66424 rdf9255d 36 36 typedef enum 37 37 { 38 SKYPE_CALL_RINGING ,38 SKYPE_CALL_RINGING = 1, 39 39 SKYPE_CALL_MISSED 40 40 } skype_call_status; 41 42 typedef enum 43 { 44 SKYPE_FILETRANSFER_NEW = 1, 45 SKYPE_FILETRANSFER_FAILED 46 } skype_filetransfer_status; 41 47 42 48 /* … … 62 68 * notification about the handle is in a given status. */ 63 69 skype_call_status call_status; 70 /* Same for file transfers. */ 71 skype_filetransfer_status filetransfer_status; 64 72 }; 65 73 … … 313 321 { 314 322 info += 15; 315 switch(sd->call_status) 316 { 317 case SKYPE_CALL_RINGING: 318 imcb_log(ic, "The user %s is currently ringing you.", info); 319 break; 320 case SKYPE_CALL_MISSED: 321 imcb_log(ic, "You have missed a call from user %s.", info); 322 break; 323 if(sd->call_status) { 324 switch(sd->call_status) 325 { 326 case SKYPE_CALL_RINGING: 327 imcb_log(ic, "The user %s is currently ringing you.", info); 328 break; 329 case SKYPE_CALL_MISSED: 330 imcb_log(ic, "You have missed a call from user %s.", info); 331 break; 332 } 333 sd->call_status = 0; 334 } 335 } 336 } 337 } 338 else if(!strncmp(line, "FILETRANSFER ", 13)) 339 { 340 char *id = strchr(line, ' '); 341 if(++id) 342 { 343 char *info = strchr(id, ' '); 344 *info = '\0'; 345 info++; 346 if(!strcmp(info, "STATUS NEW")) 347 { 348 g_snprintf(buf, 1024, "GET FILETRANSFER %s PARTNER_HANDLE\n", id); 349 skype_write( ic, buf, strlen( buf ) ); 350 sd->filetransfer_status = SKYPE_FILETRANSFER_NEW; 351 } 352 else if(!strcmp(info, "STATUS FAILED")) 353 { 354 g_snprintf(buf, 1024, "GET FILETRANSFER %s PARTNER_HANDLE\n", id); 355 skype_write( ic, buf, strlen( buf ) ); 356 sd->filetransfer_status = SKYPE_FILETRANSFER_FAILED; 357 } 358 else if(!strncmp(info, "PARTNER_HANDLE ", 15)) 359 { 360 info += 15; 361 if(sd->filetransfer_status) { 362 switch(sd->filetransfer_status) 363 { 364 case SKYPE_FILETRANSFER_NEW: 365 imcb_log(ic, "The user %s offered a new file for you.", info); 366 break; 367 case SKYPE_FILETRANSFER_FAILED: 368 imcb_log(ic, "Failed to transfer file from user %s.", info); 369 break; 370 } 371 sd->filetransfer_status = 0; 323 372 } 324 373 }
Note: See TracChangeset
for help on using the changeset viewer.