diff options
author | Ross Burton <ross@linux.intel.com> | 2009-05-20 15:11:48 +0100 |
---|---|---|
committer | Ross Burton <ross@linux.intel.com> | 2009-05-20 15:11:48 +0100 |
commit | fa34345d113f47d7d54b1fe38c2c13cade05b88c (patch) | |
tree | 64a7a4754ee1a43c51178f1512bb842ed71d53e2 | |
parent | 56913616b3b7e24b3e3989ae55fa8157b8485462 (diff) |
Add accessors for the api key and shared secret
-rw-r--r-- | rest/flickr-proxy.c | 36 | ||||
-rw-r--r-- | rest/flickr-proxy.h | 4 |
2 files changed, 38 insertions, 2 deletions
diff --git a/rest/flickr-proxy.c b/rest/flickr-proxy.c index 14f1ce1..20e2424 100644 --- a/rest/flickr-proxy.c +++ b/rest/flickr-proxy.c @@ -180,10 +180,42 @@ flickr_proxy_new_with_token (const char *api_key, } /** + * flickr_proxy_get_api_key: + * @proxy: an #FlickrProxy + * + * Get the API key. + * + * Returns: the API key. This string is owned by #FlickrProxy and should not be + * freed. + */ +const char * +flickr_proxy_get_api_key (FlickrProxy *proxy) +{ + FlickrProxyPrivate *priv = PROXY_GET_PRIVATE (proxy); + return priv->api_key; +} + +/** + * flickr_proxy_get_shared_secret: + * @proxy: an #FlickrProxy + * + * Get the shared secret for authentication. + * + * Returns: the shared secret. This string is owned by #FlickrProxy and should not be + * freed. + */ +const char * +flickr_proxy_get_shared_secret (FlickrProxy *proxy) +{ + FlickrProxyPrivate *priv = PROXY_GET_PRIVATE (proxy); + return priv->shared_secret; +} + +/** * flickr_proxy_get_token: * @proxy: an #FlickrProxy * - * Get the current request or access token. + * Get the current token. * * Returns: the token, or %NULL if there is no token yet. This string is owned * by #FlickrProxy and should not be freed. @@ -200,7 +232,7 @@ flickr_proxy_get_token (FlickrProxy *proxy) * @proxy: an #FlickrProxy * @token: the access token * - * Set the access token. + * Set the token. */ void flickr_proxy_set_token (FlickrProxy *proxy, const char *token) diff --git a/rest/flickr-proxy.h b/rest/flickr-proxy.h index 134e1a0..bc7b0e9 100644 --- a/rest/flickr-proxy.h +++ b/rest/flickr-proxy.h @@ -69,6 +69,10 @@ RestProxy* flickr_proxy_new_with_token (const char *api_key, const char *shared_secret, const char *token); +const char * flickr_proxy_get_api_key (FlickrProxy *proxy); + +const char * flickr_proxy_get_shared_secret (FlickrProxy *proxy); + const char * flickr_proxy_get_token (FlickrProxy *proxy); void flickr_proxy_set_token (FlickrProxy *proxy, const char *token); |