diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oauth.c | 6 | ||||
-rw-r--r-- | lib/oauth.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/oauth.c b/lib/oauth.c index 8012c37a..c60a5a52 100644 --- a/lib/oauth.c +++ b/lib/oauth.c @@ -232,7 +232,7 @@ void oauth_info_free( struct oauth_info *info ) } } -static void oauth_add_default_params( GSList **params, struct oauth_service *sp ) +static void oauth_add_default_params( GSList **params, const struct oauth_service *sp ) { char *s; @@ -293,7 +293,7 @@ static void *oauth_post_request( const char *url, GSList **params_, http_input_f static void oauth_request_token_done( struct http_request *req ); -struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data ) +struct oauth_info *oauth_request_token( const struct oauth_service *sp, oauth_cb func, void *data ) { struct oauth_info *st = g_new0( struct oauth_info, 1 ); GSList *params = NULL; @@ -438,7 +438,7 @@ char *oauth_to_string( struct oauth_info *oi ) return ret; } -struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp ) +struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp ) { struct oauth_info *oi = g_new0( struct oauth_info, 1 ); GSList *params = NULL; diff --git a/lib/oauth.h b/lib/oauth.h index 6b51dc2c..5dfe0ae5 100644 --- a/lib/oauth.h +++ b/lib/oauth.h @@ -39,7 +39,7 @@ typedef enum struct oauth_info { oauth_stage_t stage; - struct oauth_service *sp; + const struct oauth_service *sp; oauth_cb func; void *data; @@ -67,7 +67,7 @@ struct oauth_service Request an initial anonymous token which can be used to construct an authorization URL for the user. This is passed to the callback function in a struct oauth_info. */ -struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data ); +struct oauth_info *oauth_request_token( const struct oauth_service *sp, oauth_cb func, void *data ); /* http://oauth.net/core/1.0a/#auth_step3 (section 6.3) The user gets a PIN or so which we now exchange for the final access @@ -87,4 +87,4 @@ void oauth_info_free( struct oauth_info *info ); /* Convert to and back from strings, for easier saving. */ char *oauth_to_string( struct oauth_info *oi ); -struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp ); +struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp ); |