- Timestamp:
- 2010-05-01T14:10:32Z (15 years ago)
- Branches:
- master
- Children:
- 3b878a1
- Parents:
- c2ecadc
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/oauth.c
rc2ecadc rf4b0911 425 425 return ret ? g_string_free( ret, FALSE ) : NULL; 426 426 } 427 428 char *oauth_to_string( struct oauth_info *oi ) 429 { 430 GSList *params = NULL; 431 char *ret; 432 433 oauth_params_add( ¶ms, "oauth_token", oi->token ); 434 oauth_params_add( ¶ms, "oauth_token_secret", oi->token_secret ); 435 ret = oauth_params_string( params ); 436 oauth_params_free( ¶ms ); 437 438 return ret; 439 } 440 441 struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp ) 442 { 443 struct oauth_info *oi = g_new0( struct oauth_info, 1 ); 444 GSList *params = NULL; 445 446 oauth_params_parse( ¶ms, in ); 447 oi->token = g_strdup( oauth_params_get( ¶ms, "oauth_token" ) ); 448 oi->token_secret = g_strdup( oauth_params_get( ¶ms, "oauth_token_secret" ) ); 449 oauth_params_free( ¶ms ); 450 oi->sp = sp; 451 452 return oi; 453 } -
lib/oauth.h
rc2ecadc rf4b0911 85 85 /* Shouldn't normally be required unless the process is aborted by the user. */ 86 86 void oauth_info_free( struct oauth_info *info ); 87 88 /* Convert to and back from strings, for easier saving. */ 89 char *oauth_to_string( struct oauth_info *oi ); 90 struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp );
Note: See TracChangeset
for help on using the changeset viewer.