[libgdata] core: Add a GDATA_LINK_ACCESS_CONTROL_LIST #define for ACL links
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Add a GDATA_LINK_ACCESS_CONTROL_LIST #define for ACL links
- Date: Fri, 8 Oct 2010 23:10:08 +0000 (UTC)
commit 047b48ec87b70f8d2c662f5f28b9531cedabdd95
Author: Philip Withnall <philip tecnocode co uk>
Date: Tue Oct 5 13:05:07 2010 +0100
core: Add a GDATA_LINK_ACCESS_CONTROL_LIST #define for ACL links
docs/reference/gdata-sections.txt | 1 +
gdata/gdata-access-handler.c | 6 +++---
gdata/gdata-access-handler.h | 12 ++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index f11e756..0ebf0bd 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -642,6 +642,7 @@ GDataYouTubeQueryPrivate
<SECTION>
<FILE>gdata-access-handler</FILE>
<TITLE>GDataAccessHandler</TITLE>
+GDATA_LINK_ACCESS_CONTROL_LIST
GDataAccessHandler
GDataAccessHandlerIface
gdata_access_handler_get_rules
diff --git a/gdata/gdata-access-handler.c b/gdata/gdata-access-handler.c
index fe3edc9..075a21b 100644
--- a/gdata/gdata-access-handler.c
+++ b/gdata/gdata-access-handler.c
@@ -97,7 +97,7 @@ gdata_access_handler_get_rules (GDataAccessHandler *self, GDataService *service,
/* Get the ACL URI */
/* TODO: ETag support */
- _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList");
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_ACCESS_CONTROL_LIST);
g_assert (_link != NULL);
message = _gdata_service_build_message (service, SOUP_METHOD_GET, gdata_link_get_uri (_link), NULL, FALSE);
@@ -173,7 +173,7 @@ gdata_access_handler_insert_rule (GDataAccessHandler *self, GDataService *servic
/* Get the ACL URI */
/* TODO: ETag support */
- _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList");
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_ACCESS_CONTROL_LIST);
g_assert (_link != NULL);
message = _gdata_service_build_message (service, SOUP_METHOD_POST, gdata_link_get_uri (_link), NULL, FALSE);
@@ -222,7 +222,7 @@ build_message (GDataAccessHandler *access_handler, GDataService *service, GDataA
return _gdata_service_build_message (service, method, gdata_link_get_uri (_link), NULL, FALSE);
/* Try building the URI instead */
- _link = gdata_entry_look_up_link (GDATA_ENTRY (access_handler), "http://schemas.google.com/acl/2007#accessControlList");
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (access_handler), GDATA_LINK_ACCESS_CONTROL_LIST);
g_assert (_link != NULL);
gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
diff --git a/gdata/gdata-access-handler.h b/gdata/gdata-access-handler.h
index a38d543..f6fb779 100644
--- a/gdata/gdata-access-handler.h
+++ b/gdata/gdata-access-handler.h
@@ -29,6 +29,18 @@
G_BEGIN_DECLS
+/**
+ * GDATA_LINK_ACCESS_CONTROL_LIST:
+ *
+ * The relation type URI of the access control list location for this resource.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#SharingACalendar">ACL specification</ulink>.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_LINK_ACCESS_CONTROL_LIST "http://schemas.google.com/acl/2007#accessControlList"
+
#define GDATA_TYPE_ACCESS_HANDLER (gdata_access_handler_get_type ())
#define GDATA_ACCESS_HANDLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ACCESS_HANDLER, GDataAccessHandler))
#define GDATA_ACCESS_HANDLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ACCESS_HANDLER, GDataAccessHandlerIface))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]