- Timestamp:
- 2008-02-29T00:34:31Z (17 years ago)
- Branches:
- master
- Children:
- 239b036
- Parents:
- 9db0234
- Location:
- skype
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
r9db0234 r2eb4b1f 238 238 communication is encrypted. 239 239 240 - Starting calls: `account set skype/call nick` 240 - Managing outgoing calls: 241 242 * `account set skype/call nick` 243 * `account set -del skype/call` 241 244 242 245 == What needs to be done (aka. TODO) -
skype/skype.c
r9db0234 r2eb4b1f 43 43 SKYPE_CALL_MISSED, 44 44 SKYPE_CALL_UNPLACED, 45 SKYPE_CALL_CANCELLED, 45 46 /* This means we are ringing somebody, not somebody rings us. */ 46 47 SKYPE_CALL_RINGING_OUT … … 80 81 * notification about the handle is in a given status. */ 81 82 skype_call_status call_status; 83 char *call_id; 82 84 /* Same for file transfers. */ 83 85 skype_filetransfer_status filetransfer_status; … … 576 578 sd->call_status = SKYPE_CALL_MISSED; 577 579 } 580 else if(!strcmp(info, "STATUS CANCELLED")) 581 { 582 g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); 583 skype_write( ic, buf, strlen( buf ) ); 584 sd->call_status = SKYPE_CALL_CANCELLED; 585 } 578 586 else if(!strcmp(info, "STATUS UNPLACED")) 587 { 588 if(sd->call_id) 589 g_free(sd->call_id); 590 /* Save the ID for later usage (Cancel/Finish). */ 591 sd->call_id = g_strdup(id); 579 592 sd->call_status = SKYPE_CALL_UNPLACED; 593 } 580 594 else if(!strncmp(info, "PARTNER_HANDLE ", 15)) 581 595 { … … 592 606 case SKYPE_CALL_RINGING_OUT: 593 607 imcb_log(ic, "You are currently ringing the user %s.", info); 608 break; 609 case SKYPE_CALL_CANCELLED: 610 imcb_log(ic, "You cancelled the call to the user %s.", info); 594 611 break; 595 612 default: … … 908 925 account_t *acc = set->data; 909 926 struct im_connection *ic = acc->ic; 927 struct skype_data *sd = ic->proto_data; 910 928 char *nick, *ptr, *buf; 911 user_t *u = user_find(acc->irc, value); 912 913 if(!u) 929 930 if(value) 914 931 { 915 imcb_error(ic, "%s - no such nick", value); 916 return(value); 932 user_t *u = user_find(acc->irc, value); 933 /* We are starting a call */ 934 if(!u) 935 { 936 imcb_error(ic, "%s - no such nick", value); 937 return(value); 938 } 939 nick = g_strdup(u->handle); 940 ptr = strchr(nick, '@'); 941 if(ptr) 942 *ptr = '\0'; 943 944 buf = g_strdup_printf("CALL %s", nick); 945 skype_write( ic, buf, strlen( buf ) ); 946 g_free(buf); 947 g_free(nick); 917 948 } 918 nick = g_strdup(u->handle); 919 ptr = strchr(nick, '@'); 920 if(ptr) 921 *ptr = '\0'; 922 923 buf = g_strdup_printf("CALL %s", nick); 924 skype_write( ic, buf, strlen( buf ) ); 925 g_free(buf); 926 g_free(nick); 949 else 950 { 951 /* We are ending a call */ 952 if(sd->call_id) 953 { 954 buf = g_strdup_printf("SET CALL %s STATUS FINISHED", sd->call_id); 955 skype_write( ic, buf, strlen( buf ) ); 956 g_free(buf); 957 } 958 else 959 { 960 imcb_error(ic, "There are no active calls currently."); 961 } 962 } 927 963 return(value); 928 964 } -
skype/skyped.py
r9db0234 r2eb4b1f 56 56 options.buf = None 57 57 else: 58 input = fd.recv(1024) 58 try: 59 input = fd.recv(1024) 60 except SysCallError: 61 return True 59 62 for i in input.split("\n"): 60 63 skype.send(i.strip())
Note: See TracChangeset
for help on using the changeset viewer.