diff options
| author | Miklos Vajna <vmiklos@frugalware.org> | 2008-02-29 01:49:43 +0100 | 
|---|---|---|
| committer | Miklos Vajna <vmiklos@frugalware.org> | 2008-02-29 01:49:43 +0100 | 
| commit | 48181f05fef4c5c6624a06bcf5ce3648f63576dd (patch) | |
| tree | 3c07213ad7196ccda13fab488a8a79192039ea66 /skype/skype.c | |
| parent | acd94789946b2bc83ab529485a3342255a2cdecf (diff) | |
report call duration at the end
Diffstat (limited to 'skype/skype.c')
| -rw-r--r-- | skype/skype.c | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/skype/skype.c b/skype/skype.c index 299e0768..291233e7 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -82,6 +82,7 @@ struct skype_data  	 * notification about the handle is in a given status. */  	skype_call_status call_status;  	char *call_id; +	char *call_duration;  	/* Same for file transfers. */  	skype_filetransfer_status filetransfer_status;  	/* Using /j #nick we want to have a groupchat with two people. Usually @@ -598,6 +599,12 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c  						sd->call_id = g_strdup(id);  						sd->call_status = SKYPE_CALL_UNPLACED;  					} +					else if(!strncmp(info, "DURATION ", 9)) +					{ +						if(sd->call_duration) +							g_free(sd->call_duration); +						sd->call_duration = g_strdup(info+9); +					}  					else if(!strncmp(info, "PARTNER_HANDLE ", 15))  					{  						info += 15; @@ -617,7 +624,14 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c  									imcb_log(ic, "You cancelled the call to the user %s.", info);  									break;  								case SKYPE_CALL_FINISHED: -									imcb_log(ic, "You finished the call to the user %s.", info); +									if(sd->call_duration) +									{ +										imcb_log(ic, "You finished the call to the user %s (duration: %s seconds).", info, sd->call_duration); +									} +									else +									{ +										imcb_log(ic, "You finished the call to the user %s.", info); +									}  									break;  								default:  									/* Don't be noisy, ignore other statuses for now. */ | 
