diff options
author | Ross Burton <ross@linux.intel.com> | 2011-07-11 16:43:49 +0100 |
---|---|---|
committer | Ross Burton <ross@linux.intel.com> | 2011-07-11 16:44:34 +0100 |
commit | b0cedf9c55487baf29931df629dafe99dbdc3bed (patch) | |
tree | 55a5250f49c7988bb7e3ba6fde4531fab6bf90e7 | |
parent | 4a33f04726b713ea8de948992b17571221c80b05 (diff) | |
download | librest-b0cedf9c55487baf29931df629dafe99dbdc3bed.tar.gz |
oauth: Add GType for OAuthSignatureMethod enum
-rw-r--r-- | rest/oauth-proxy.c | 18 | ||||
-rw-r--r-- | rest/oauth-proxy.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/rest/oauth-proxy.c b/rest/oauth-proxy.c index 38c9e4a..1d293b6 100644 --- a/rest/oauth-proxy.c +++ b/rest/oauth-proxy.c @@ -775,3 +775,21 @@ oauth_proxy_new_echo_proxy (OAuthProxy *proxy, return (RestProxy *)echo_proxy; } + +GType +oauth_signature_method_get_type (void) +{ + static GType enum_type_id = 0; + if (G_UNLIKELY (!enum_type_id)) + { + static const GEnumValue values[] = + { + { PLAINTEXT, "PLAINTEXT", "plaintext" }, + { HMAC_SHA1, "HMAC_SHA1", "hmac-sha1" }, + { 0, NULL, NULL } + }; + enum_type_id = g_enum_register_static ("OAuthSignatureMethod", values); + } + return enum_type_id; +} + diff --git a/rest/oauth-proxy.h b/rest/oauth-proxy.h index 24749a3..23e4ce4 100644 --- a/rest/oauth-proxy.h +++ b/rest/oauth-proxy.h @@ -60,6 +60,9 @@ typedef struct { gpointer _padding_dummy[8]; } OAuthProxyClass; +GType oauth_signature_method_get_type (void) G_GNUC_CONST; +#define OAUTH_TYPE_SIGNATURE_METHOD (oauth_signature_method_get_type()) + /** * OAuthSignatureMethod: * @PLAINTEXT: plain text signatures (not recommended) |