Changeset 23411c6
- Timestamp:
- 2007-08-20T22:00:16Z (17 years ago)
- Branches:
- master
- Children:
- 98bca36
- Parents:
- f78f949
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
rf78f949 r23411c6 92 92 - Adding / removing contacts 93 93 94 - Set away state when you do a `/away`. 95 94 96 == What needs to be done (aka. TODO) 95 97 96 98 - detect when somebody wants to add us (confirm callback) 97 99 98 - Due to some API limitations, I have no idea how to change status. This affects: 99 * When you `/away`, Skype will be still show `Online` 100 * When you `account off`, Skype will not set status to `Offline` 101 * When you `account on`, Skype will not set status to `Online` 100 - When you `account off`, Skype will not set status to `Offline` 101 - When you `account on`, Skype will not set status to `Online` 102 102 103 103 == I would like to have support for ... -
skype/skype.c
rf78f949 r23411c6 40 40 { "DND", "Do Not Disturb" }, 41 41 { "INVISIBLE", "Invisible" }, 42 { "OFFLINE", "Offline" } 42 { "OFFLINE", "Offline" }, 43 { NULL, NULL} 43 44 }; 44 45 … … 258 259 } 259 260 261 const struct skype_away_state *skype_away_state_by_name( char *name ) 262 { 263 int i; 264 265 for( i = 0; skype_away_state_list[i].full_name; i ++ ) 266 if( g_strcasecmp( skype_away_state_list[i].full_name, name ) == 0 ) 267 return( skype_away_state_list + i ); 268 269 return NULL; 270 } 271 260 272 static void skype_set_away( struct im_connection *ic, char *state_txt, char *message ) 261 273 { 274 const struct skype_away_state *state; 275 char *buf; 276 277 if( strcmp( state_txt, GAIM_AWAY_CUSTOM ) == 0 ) 278 state = skype_away_state_by_name( "Away" ); 279 else 280 state = skype_away_state_by_name( state_txt ); 281 printf("would set to: '%s'\n", state->code); 282 buf = g_strdup_printf("SET USERSTATUS %s\n", state->code); 283 skype_write( ic, buf, strlen( buf ) ); 284 g_free(buf); 262 285 } 263 286 264 287 static GList *skype_away_states( struct im_connection *ic ) 265 288 { 266 staticGList *l = NULL;289 GList *l = NULL; 267 290 int i; 268 291 269 if( l == NULL ) 270 for( i = 0; skype_away_state_list[i].full_name; i ++ ) 271 l = g_list_append( l, (void*) skype_away_state_list[i].full_name ); 292 for( i = 0; skype_away_state_list[i].full_name; i ++ ) 293 l = g_list_append( l, (void*) skype_away_state_list[i].full_name ); 272 294 273 295 return l; … … 315 337 ret->add_buddy = skype_add_buddy; 316 338 ret->remove_buddy = skype_remove_buddy; 317 ret->away_states = skype_away_states;318 ret->set_away = skype_set_away;319 339 ret->handle_cmp = g_strcasecmp; 320 340 register_protocol( ret );
Note: See TracChangeset
for help on using the changeset viewer.