Changeset d87daf3
- Timestamp:
- 2008-02-29T01:40:12Z (17 years ago)
- Branches:
- master
- Children:
- e0074cb
- Parents:
- a92fb07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
ra92fb07 rd87daf3 42 42 SKYPE_CALL_RINGING = 1, 43 43 SKYPE_CALL_MISSED, 44 SKYPE_CALL_UNPLACED,45 44 SKYPE_CALL_CANCELLED, 46 45 SKYPE_CALL_FINISHED, 47 SKYPE_CALL_REFUSED, 48 /* This means we are ringing somebody, not somebody rings us. */ 49 SKYPE_CALL_RINGING_OUT 46 SKYPE_CALL_REFUSED 50 47 } skype_call_status; 51 48 … … 85 82 char *call_id; 86 83 char *call_duration; 84 /* If the call is outgoing or not */ 85 int call_out; 87 86 /* Same for file transfers. */ 88 87 skype_filetransfer_status filetransfer_status; … … 570 569 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); 571 570 skype_write( ic, buf, strlen( buf ) ); 572 if(sd->call_status != SKYPE_CALL_UNPLACED) 573 sd->call_status = SKYPE_CALL_RINGING; 574 else 575 sd->call_status = SKYPE_CALL_RINGING_OUT; 571 sd->call_status = SKYPE_CALL_RINGING; 576 572 } 577 573 else if(!strcmp(info, "STATUS MISSED")) … … 583 579 else if(!strcmp(info, "STATUS CANCELLED")) 584 580 { 585 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id);586 skype_write( ic, buf, strlen( buf ) );587 sd->call_status = SKYPE_CALL_CANCELLED;581 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); 582 skype_write( ic, buf, strlen( buf ) ); 583 sd->call_status = SKYPE_CALL_CANCELLED; 588 584 } 589 585 else if(!strcmp(info, "STATUS FINISHED")) … … 605 601 /* Save the ID for later usage (Cancel/Finish). */ 606 602 sd->call_id = g_strdup(id); 607 sd->call_ status = SKYPE_CALL_UNPLACED;603 sd->call_out = TRUE; 608 604 } 609 605 else if(!strncmp(info, "DURATION ", 9)) … … 620 616 { 621 617 case SKYPE_CALL_RINGING: 622 imcb_log(ic, "The user %s is currently ringing you.", info); 618 if(sd->call_out) 619 imcb_log(ic, "You are currently ringing the user %s.", info); 620 else 621 imcb_log(ic, "The user %s is currently ringing you.", info); 623 622 break; 624 623 case SKYPE_CALL_MISSED: 625 624 imcb_log(ic, "You have missed a call from user %s.", info); 626 625 break; 627 case SKYPE_CALL_RINGING_OUT:628 imcb_log(ic, "You are currently ringing the user %s.", info);629 break;630 626 case SKYPE_CALL_CANCELLED: 631 627 imcb_log(ic, "You cancelled the call to the user %s.", info); 628 sd->call_status = 0; 629 sd->call_out = FALSE; 632 630 break; 633 631 case SKYPE_CALL_REFUSED: 634 imcb_log(ic, "The user %s refused the call.", info); 632 if(sd->call_out) 633 imcb_log(ic, "The user %s refused the call.", info); 634 else 635 imcb_log(ic, "You refused the call from user %s.", info); 636 sd->call_out = FALSE; 635 637 break; 636 638 case SKYPE_CALL_FINISHED: 637 639 if(sd->call_duration) 638 {639 640 imcb_log(ic, "You finished the call to the user %s (duration: %s seconds).", info, sd->call_duration); 640 }641 641 else 642 {643 642 imcb_log(ic, "You finished the call to the user %s.", info); 644 }643 sd->call_out = FALSE; 645 644 break; 646 645 default:
Note: See TracChangeset
for help on using the changeset viewer.