diff options
author | Rob Bradford <rob@linux.intel.com> | 2009-01-15 15:43:21 +0000 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2009-01-15 15:43:21 +0000 |
commit | 631b8a075cf938d1aece6bd6f8379e00596c3dc2 (patch) | |
tree | c1b7604f56aaf4771dbacd4ebc46d955abeb46a0 | |
parent | 131f3a8e5367cf4b153cc5fe73bc1530633b92c9 (diff) |
Add missing implementations for RestProxyCall functions (MB: #420)librest-0.1
The following functions were missing implementations:
rest_proxy_call_lookup_response_header
rest_proxy_call_get_response_headers
This change fixes that.
-rw-r--r-- | rest/rest-proxy-call.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c index 9540d09..e257335 100644 --- a/rest/rest-proxy-call.c +++ b/rest/rest-proxy-call.c @@ -763,6 +763,51 @@ error: } /** + * rest_proxy_call_lookup_response_header + * + * @call: The #RestProxyCall + * @header: The name of the header to lookup. + * + * Returns: The string value of the header @header or NULL if that header is + * not present or there are no headers. + */ +const gchar * +rest_proxy_call_lookup_response_header (RestProxyCall *call, + const gchar *header) +{ + RestProxyCallPrivate *priv = GET_PRIVATE (call); + + if (!priv->response_headers) + { + return NULL; + } + + return g_hash_table_lookup (priv->response_headers, header); +} + +/** + * rest_proxy_call_get_response_headers + * + * @call: The #RestProxyCall + * + * Returns: A pointer to a hash table of headers. This hash table must not be + * changed. You should call g_hash_table_unref() when you have finished with + * it. + */ +GHashTable * +rest_proxy_call_get_response_headers (RestProxyCall *call) +{ + RestProxyCallPrivate *priv = GET_PRIVATE (call); + + if (!priv->response_headers) + { + return NULL; + } + + return g_hash_table_ref (priv->response_headers); +} + +/** * rest_proxy_call_get_payload_length: * @call: The #RestProxyCall * |