[librest] oauth: Add GType for OAuthSignatureMethod enum
- From: Ross Burton <rburton src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest] oauth: Add GType for OAuthSignatureMethod enum
- Date: Mon, 11 Jul 2011 15:45:06 +0000 (UTC)
commit b0cedf9c55487baf29931df629dafe99dbdc3bed
Author: Ross Burton <ross linux intel com>
Date: Mon Jul 11 16:43:49 2011 +0100
oauth: Add GType for OAuthSignatureMethod enum
rest/oauth-proxy.c | 18 ++++++++++++++++++
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]