[libgdata] calendar: Re-enable support for ACLs with version 3 of the API
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] calendar: Re-enable support for ACLs with version 3 of the API
- Date: Wed, 27 May 2015 22:59:49 +0000 (UTC)
commit 68ed77fbafaa1403e924ae9f9a06ebc8d159fcaa
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu May 14 13:42:55 2015 +0100
calendar: Re-enable support for ACLs with version 3 of the API
This was non-trivial. New API added:
• GDataCalendarAccessRule
Due to how this new class overrides GDataAccessRule, it must be used in
place of GDataAccessRule for any interactions with the Calendar API.
This is essentially a soft API break for anyone who uses calendars. It’s
unavoidable.
https://bugzilla.gnome.org/show_bug.cgi?id=664353
Makefile.am | 5 +-
docs/reference/gdata-docs.xml | 1 +
docs/reference/gdata-sections.txt | 28 ++-
gdata/gdata.h | 1 +
gdata/gdata.symbols | 2 +
.../services/calendar/gdata-calendar-access-rule.c | 277 ++++++++++++++++++++
.../services/calendar/gdata-calendar-access-rule.h | 125 +++++++++
gdata/services/calendar/gdata-calendar-calendar.c | 89 ++++++-
gdata/services/calendar/gdata-calendar-calendar.h | 46 ----
gdata/tests/calendar.c | 80 ++++--
gdata/tests/traces/calendar/access-rule-delete | 72 ++----
gdata/tests/traces/calendar/access-rule-get | 108 ++++----
gdata/tests/traces/calendar/access-rule-insert | 94 +++-----
gdata/tests/traces/calendar/access-rule-update | 89 ++----
gdata/tests/traces/calendar/global-authentication | 16 +-
gdata/tests/traces/calendar/setup-temp-calendar | 16 +-
.../tests/traces/calendar/setup-temp-calendar-acls | 94 +++-----
gdata/tests/traces/calendar/teardown-temp-calendar | 12 +-
.../traces/calendar/teardown-temp-calendar-acls | 72 ++----
19 files changed, 772 insertions(+), 455 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 31c851b..7b4982b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -268,7 +268,9 @@ gdatacalendarinclude_HEADERS = \
gdata/services/calendar/gdata-calendar-calendar.h \
gdata/services/calendar/gdata-calendar-event.h \
gdata/services/calendar/gdata-calendar-query.h \
- gdata/services/calendar/gdata-calendar-feed.h
+ gdata/services/calendar/gdata-calendar-feed.h \
+ gdata/services/calendar/gdata-calendar-access-rule.h \
+ $(NULL)
gdatacontactsincludedir = $(gdataincludedir)/services/contacts
gdatacontactsinclude_HEADERS = \
@@ -410,6 +412,7 @@ gdata_sources = \
gdata/services/calendar/gdata-calendar-event.c \
gdata/services/calendar/gdata-calendar-query.c \
gdata/services/calendar/gdata-calendar-feed.c \
+ gdata/services/calendar/gdata-calendar-access-rule.c \
\
gdata/services/contacts/gdata-contacts-service.c \
gdata/services/contacts/gdata-contacts-contact.c \
diff --git a/docs/reference/gdata-docs.xml b/docs/reference/gdata-docs.xml
index 917e72a..4f7ede0 100644
--- a/docs/reference/gdata-docs.xml
+++ b/docs/reference/gdata-docs.xml
@@ -141,6 +141,7 @@
<xi:include href="xml/gdata-calendar-query.xml"/>
<xi:include href="xml/gdata-calendar-calendar.xml"/>
<xi:include href="xml/gdata-calendar-event.xml"/>
+ <xi:include href="xml/gdata-calendar-access-rule.xml"/>
</chapter>
<chapter>
diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index 813b4ee..92e68b2 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -528,11 +528,6 @@ GDataCalendarQueryPrivate
<SECTION>
<FILE>gdata-calendar-calendar</FILE>
<TITLE>GDataCalendarCalendar</TITLE>
-GDATA_CALENDAR_ACCESS_ROLE_READ
-GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY
-GDATA_CALENDAR_ACCESS_ROLE_EDITOR
-GDATA_CALENDAR_ACCESS_ROLE_OWNER
-GDATA_CALENDAR_ACCESS_ROLE_ROOT
GDataCalendarCalendar
GDataCalendarCalendarClass
gdata_calendar_calendar_new
@@ -2815,3 +2810,26 @@ GDATA_TYPE_YOUTUBE_FEED
<SUBSECTION Private>
GDataYouTubeFeedPrivate
</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-access-rule</FILE>
+<TITLE>GDataCalendarAccessRule</TITLE>
+GDATA_CALENDAR_ACCESS_ROLE_READ
+GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY
+GDATA_CALENDAR_ACCESS_ROLE_EDITOR
+GDATA_CALENDAR_ACCESS_ROLE_OWNER
+GDATA_CALENDAR_ACCESS_ROLE_ROOT
+GDataCalendarAccessRule
+GDataCalendarAccessRuleClass
+gdata_calendar_access_rule_new
+<SUBSECTION Standard>
+gdata_calendar_access_rule_get_type
+GDATA_CALENDAR_ACCESS_RULE
+GDATA_CALENDAR_ACCESS_RULE_CLASS
+GDATA_CALENDAR_ACCESS_RULE_GET_CLASS
+GDATA_IS_CALENDAR_ACCESS_RULE
+GDATA_IS_CALENDAR_ACCESS_RULE_CLASS
+GDATA_TYPE_CALENDAR_ACCESS_RULE
+<SUBSECTION Private>
+GDataCalendarAccessRulePrivate
+</SECTION>
diff --git a/gdata/gdata.h b/gdata/gdata.h
index e74dd06..f259b26 100644
--- a/gdata/gdata.h
+++ b/gdata/gdata.h
@@ -107,6 +107,7 @@
#include <gdata/services/calendar/gdata-calendar-calendar.h>
#include <gdata/services/calendar/gdata-calendar-event.h>
#include <gdata/services/calendar/gdata-calendar-query.h>
+#include <gdata/services/calendar/gdata-calendar-access-rule.h>
/* Google PicasaWeb */
#include <gdata/services/picasaweb/gdata-picasaweb-service.h>
diff --git a/gdata/gdata.symbols b/gdata/gdata.symbols
index ffb308b..30c4a30 100644
--- a/gdata/gdata.symbols
+++ b/gdata/gdata.symbols
@@ -1114,3 +1114,5 @@ gdata_oauth2_authorizer_get_timeout
gdata_oauth2_authorizer_set_timeout
gdata_oauth2_authorizer_get_proxy_resolver
gdata_oauth2_authorizer_set_proxy_resolver
+gdata_calendar_access_rule_get_type
+gdata_calendar_access_rule_new
diff --git a/gdata/services/calendar/gdata-calendar-access-rule.c
b/gdata/services/calendar/gdata-calendar-access-rule.c
new file mode 100644
index 0000000..6f2d382
--- /dev/null
+++ b/gdata/services/calendar/gdata-calendar-access-rule.c
@@ -0,0 +1,277 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip tecnocode co uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-access-rule
+ * @short_description: GData Calendar access rule object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-access-rule.h
+ *
+ * #GDataCalendarAccessRule is a subclass of #GDataAccessRule to represent an
+ * access rule affecting users of a shared calendar in Google Calendar.
+ *
+ * Since: UNRELEASED
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-access-rule.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-calendar-access-rule.h"
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error);
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder);
+static const gchar *
+get_content_type (void);
+
+G_DEFINE_TYPE (GDataCalendarAccessRule, gdata_calendar_access_rule,
+ GDATA_TYPE_ACCESS_RULE)
+
+static void
+gdata_calendar_access_rule_class_init (GDataCalendarAccessRuleClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "calendar#aclRule";
+}
+
+static void
+gdata_calendar_access_rule_init (GDataCalendarAccessRule *self)
+{
+ /* Nothing to do here. */
+}
+
+/* V3 reference:
+ * https://developers.google.com/google-apps/calendar/v3/reference/acl#role
+ * V2 reference is no longer available.
+ */
+const struct {
+ const gchar *v3;
+ const gchar *v2;
+} role_pairs[] = {
+ { "none", "none" },
+ { "freeBusyReader", "http://schemas.google.com/gCal/2005#freebusy" },
+ { "reader", "http://schemas.google.com/gCal/2005#read" },
+ { "writer", "http://schemas.google.com/gCal/2005#editor" },
+ { "owner", "http://schemas.google.com/gCal/2005#owner" },
+};
+
+static const gchar *
+role_v3_to_v2 (const gchar *v3_role)
+{
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (role_pairs); i++) {
+ if (g_strcmp0 (v3_role, role_pairs[i].v3) == 0) {
+ return role_pairs[i].v2;
+ }
+ }
+
+ /* Fallback. */
+ return v3_role;
+}
+
+static const gchar *
+role_v2_to_v3 (const gchar *v2_role)
+{
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (role_pairs); i++) {
+ if (g_strcmp0 (v2_role, role_pairs[i].v2) == 0) {
+ return role_pairs[i].v3;
+ }
+ }
+
+ /* Fallback. */
+ return v2_role;
+}
+
+static const gchar *
+scope_type_v3_to_v2 (const gchar *v3_scope_type)
+{
+ /* Surprisingly, they have not changed from v2 to v3. */
+ return v3_scope_type;
+}
+
+static const gchar *
+scope_type_v2_to_v3 (const gchar *v2_scope_type)
+{
+ /* Surprisingly, they have not changed from v2 to v3. */
+ return v2_scope_type;
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "role") == 0) {
+ gchar *role = NULL; /* owned */
+
+ g_assert (gdata_parser_string_from_json_member (reader, "role",
+ P_REQUIRED |
+ P_NON_EMPTY,
+ &role, &success,
+ error));
+
+ if (!success) {
+ return FALSE;
+ }
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (parsable),
+ role_v3_to_v2 (role));
+ g_free (role);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "scope") == 0) {
+ const gchar *scope_type;
+ const gchar *scope_value;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader,
+ error);
+ }
+
+ json_reader_read_member (reader, "type");
+ scope_type = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "value");
+ scope_value = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* Scope type is required. */
+ if (scope_type == NULL) {
+ return gdata_parser_error_required_json_content_missing (reader,
+ error);
+ }
+
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (parsable),
+ scope_type_v3_to_v2 (scope_type),
+ scope_value);
+
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_calendar_access_rule_parent_class)->parse_json (parsable, reader,
user_data, error);
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ /* Do _not_ chain up. */
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataAccessRule *access_rule;
+ const gchar *id, *etag, *role, *scope_type, *scope_value;
+
+ access_rule = GDATA_ACCESS_RULE (parsable);
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+ if (id != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, id);
+ }
+
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "calendar#aclRule");
+
+ /* Add the ETag, if available. */
+ etag = gdata_entry_get_etag (GDATA_ENTRY (parsable));
+ if (etag != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, etag);
+ }
+
+ role = gdata_access_rule_get_role (access_rule);
+ if (role != NULL) {
+ json_builder_set_member_name (builder, "role");
+ json_builder_add_string_value (builder, role_v2_to_v3 (role));
+ }
+
+ gdata_access_rule_get_scope (access_rule, &scope_type, &scope_value);
+ if (scope_type != NULL || scope_value != NULL) {
+ json_builder_set_member_name (builder, "scope");
+ json_builder_begin_object (builder);
+
+ if (scope_type != NULL) {
+ json_builder_set_member_name (builder, "type");
+ json_builder_add_string_value (builder,
+ scope_type_v2_to_v3 (scope_type));
+ }
+
+ if (scope_value != NULL) {
+ json_builder_set_member_name (builder, "value");
+ json_builder_add_string_value (builder, scope_value);
+ }
+
+ json_builder_end_object (builder);
+ }
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_calendar_access_rule_new:
+ * @id: the access rule's ID, or %NULL
+ *
+ * Creates a new #GDataCalendarAccessRule with the given ID and default
+ * properties.
+ *
+ * Return value: (transfer full): a new #GDataCalendarAccessRule; unref with
+ * g_object_unref()
+ *
+ * Since: UNRELEASED
+ */
+GDataCalendarAccessRule *
+gdata_calendar_access_rule_new (const gchar *id)
+{
+ GObject *retval = NULL; /* owned */
+
+ retval = g_object_new (GDATA_TYPE_CALENDAR_ACCESS_RULE,
+ "id", id,
+ NULL);
+ return GDATA_CALENDAR_ACCESS_RULE (retval);
+}
diff --git a/gdata/services/calendar/gdata-calendar-access-rule.h
b/gdata/services/calendar/gdata-calendar-access-rule.h
new file mode 100644
index 0000000..d1d202c
--- /dev/null
+++ b/gdata/services/calendar/gdata-calendar-access-rule.h
@@ -0,0 +1,125 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip tecnocode co uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_ACCESS_RULE_H
+#define GDATA_CALENDAR_ACCESS_RULE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-access-rule.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_READ:
+ *
+ * The users specified by the #GDataCalendarAccessRule have read-only access to
+ * the calendar.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_READ "http://schemas.google.com/gCal/2005#read"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY:
+ *
+ * The users specified by the #GDataCalendarAccessRule can only see the
+ * free/busy information on the calendar; not event details.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY "http://schemas.google.com/gCal/2005#freebusy"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_EDITOR:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full edit access to
+ * the calendar, except they can’t change the calendar’s access rules.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_EDITOR "http://schemas.google.com/gCal/2005#editor"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_OWNER:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full owner access
+ * to the calendar.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_OWNER "http://schemas.google.com/gCal/2005#owner"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_ROOT:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full administrator
+ * access to the calendar server. This is only available in Google Apps For
+ * Your Domain.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_ROOT "http://schemas.google.com/gCal/2005#root"
+
+#define GDATA_TYPE_CALENDAR_ACCESS_RULE (gdata_calendar_access_rule_get_type ())
+#define GDATA_CALENDAR_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRule))
+#define GDATA_CALENDAR_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),
GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
+#define GDATA_IS_CALENDAR_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
GDATA_TYPE_CALENDAR_ACCESS_RULE))
+#define GDATA_IS_CALENDAR_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
GDATA_TYPE_CALENDAR_ACCESS_RULE))
+#define GDATA_CALENDAR_ACCESS_RULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
+
+/**
+ * GDataCalendarAccessRule:
+ *
+ * All the fields in the #GDataCalendarAccessRule structure are private and
+ * should never be accessed directly.
+ *
+ * Since: UNRELEASED
+ */
+typedef struct {
+ GDataAccessRule parent;
+} GDataCalendarAccessRule;
+
+/**
+ * GDataCalendarAccessRuleClass:
+ *
+ * All the fields in the #GDataCalendarAccessRuleClass structure are private
+ * and should never be accessed directly.
+ *
+ * Since: UNRELEASED
+ */
+typedef struct {
+ /*< private >*/
+ GDataAccessRuleClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarAccessRuleClass;
+
+GType gdata_calendar_access_rule_get_type (void) G_GNUC_CONST;
+
+GDataCalendarAccessRule *
+gdata_calendar_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_ACCESS_RULE_H */
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c
b/gdata/services/calendar/gdata-calendar-calendar.c
index 9d7204b..59c0788 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -86,6 +86,7 @@
#include "gdata-types.h"
#include "gdata-access-handler.h"
#include "gdata-calendar-service.h"
+#include "gdata-calendar-access-rule.h"
static void gdata_calendar_calendar_access_handler_init (GDataAccessHandlerIface *iface);
static void gdata_calendar_calendar_finalize (GObject *object);
@@ -252,11 +253,85 @@ get_authorization_domain (GDataAccessHandler *self)
return gdata_calendar_service_get_primary_authorization_domain ();
}
+static GDataFeed *
+get_rules (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error)
+{
+ GDataAccessHandlerIface *iface;
+ GDataAuthorizationDomain *domain = NULL;
+ GDataFeed *feed;
+ GDataLink *_link;
+ SoupMessage *message;
+ GList/*<unowned GDataCalendarAccessRule>*/ *rules, *i;
+ const gchar *calendar_id;
+
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self),
+ GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (self);
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ message = _gdata_service_query (service, domain,
+ gdata_link_get_uri (_link), NULL,
+ cancellable, error);
+ if (message == NULL) {
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ feed = _gdata_feed_new_from_json (GDATA_TYPE_FEED,
+ message->response_body->data,
+ message->response_body->length,
+ GDATA_TYPE_CALENDAR_ACCESS_RULE,
+ progress_callback, progress_user_data,
+ error);
+
+ /* Set the self link on all the ACL rules so they can be deleted.
+ * Sigh. */
+ rules = gdata_feed_get_entries (feed);
+ calendar_id = gdata_entry_get_id (GDATA_ENTRY (self));
+
+ for (i = rules; i != NULL; i = i->next) {
+ const gchar *id;
+ gchar *uri = NULL; /* owned */
+
+ /* Set the self link, which is needed for
+ * gdata_service_delete_entry(). Unfortunately, it needs the
+ * ACL ID _and_ the calendar ID. */
+ id = gdata_entry_get_id (GDATA_ENTRY (i->data));
+
+ if (id == NULL || calendar_id == NULL) {
+ continue;
+ }
+
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/",
+ calendar_id, "/acl/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (i->data), _link);
+ g_object_unref (_link);
+ g_free (uri);
+ }
+
+ g_object_unref (message);
+
+ return feed;
+}
+
static void
gdata_calendar_calendar_access_handler_init (GDataAccessHandlerIface *iface)
{
iface->is_owner_rule = is_owner_rule;
iface->get_authorization_domain = get_authorization_domain;
+ iface->get_rules = get_rules;
}
static void
@@ -443,15 +518,25 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GEr
const gchar *id;
gchar *uri;
- /* Calendar entries don’t contain their own selfLink, so we have
- * to add one manually. */
id = json_reader_get_string_value (reader);
if (id != NULL && *id != '\0') {
+ /* Calendar entries don’t contain their own selfLink,
+ * so we have to add one manually. */
uri = g_strconcat ("https://www.googleapis.com/calendar/v3/calendars/", id, NULL);
_link = gdata_link_new (uri, GDATA_LINK_SELF);
gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
g_object_unref (_link);
g_free (uri);
+
+ /* Similarly for the ACL link. */
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/", id,
+ "/acl", NULL);
+ _link = gdata_link_new (uri,
+ GDATA_LINK_ACCESS_CONTROL_LIST);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ g_free (uri);
}
return GDATA_PARSABLE_CLASS (gdata_calendar_calendar_parent_class)->parse_json (parsable,
reader, user_data, error);
diff --git a/gdata/services/calendar/gdata-calendar-calendar.h
b/gdata/services/calendar/gdata-calendar-calendar.h
index 37a368f..01106e2 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.h
+++ b/gdata/services/calendar/gdata-calendar-calendar.h
@@ -28,52 +28,6 @@
G_BEGIN_DECLS
-/**
- * GDATA_CALENDAR_ACCESS_ROLE_READ:
- *
- * The users specified by the #GDataAccessRule have read-only access to the calendar.
- *
- * Since: 0.7.0
- **/
-#define GDATA_CALENDAR_ACCESS_ROLE_READ "http://schemas.google.com/gCal/2005#read"
-
-/**
- * GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY:
- *
- * The users specified by the #GDataAccessRule can only see the free/busy information on the calendar; not
event details.
- *
- * Since: 0.7.0
- **/
-#define GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY "http://schemas.google.com/gCal/2005#freebusy"
-
-/**
- * GDATA_CALENDAR_ACCESS_ROLE_EDITOR:
- *
- * The users specified by the #GDataAccessRule have full edit access to the calendar, except they can't
change the calendar's access rules.
- *
- * Since: 0.7.0
- **/
-#define GDATA_CALENDAR_ACCESS_ROLE_EDITOR "http://schemas.google.com/gCal/2005#editor"
-
-/**
- * GDATA_CALENDAR_ACCESS_ROLE_OWNER:
- *
- * The users specified by the #GDataAccessRule have full owner access to the calendar.
- *
- * Since: 0.7.0
- **/
-#define GDATA_CALENDAR_ACCESS_ROLE_OWNER "http://schemas.google.com/gCal/2005#owner"
-
-/**
- * GDATA_CALENDAR_ACCESS_ROLE_ROOT:
- *
- * The users specified by the #GDataAccessRule have full administrator access to the calendar server.
- * This is only available in Google Apps For Your Domain.
- *
- * Since: 0.7.0
- **/
-#define GDATA_CALENDAR_ACCESS_ROLE_ROOT "http://schemas.google.com/gCal/2005#root"
-
#define GDATA_TYPE_CALENDAR_CALENDAR (gdata_calendar_calendar_get_type ())
#define GDATA_CALENDAR_CALENDAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendar))
#define GDATA_CALENDAR_CALENDAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_CALENDAR,
GDataCalendarCalendarClass))
diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
index 892c4aa..0cbc39c 100644
--- a/gdata/tests/calendar.c
+++ b/gdata/tests/calendar.c
@@ -938,7 +938,7 @@ test_access_rule_properties (void)
GDataAccessRule *rule;
const gchar *scope_type, *scope_value;
- rule = gdata_access_rule_new (NULL);
+ rule = gdata_calendar_access_rule_new (NULL);
gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
@@ -954,22 +954,20 @@ test_access_rule_json (void)
{
GDataAccessRule *rule;
- rule = gdata_access_rule_new (NULL);
+ rule = gdata_calendar_access_rule_new (NULL);
gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "darcy gmail com");
/* Check the JSON */
- gdata_test_assert_json (rule,
- "<?xml version='1.0' encoding='UTF-8'?>"
- "<entry xmlns='http://www.w3.org/2005/Atom' "
- "xmlns:gd='http://schemas.google.com/g/2005' "
- "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
- "<title type='text'>http://schemas.google.com/gCal/2005#editor</title>"
- "<category term='http://schemas.google.com/acl/2007#accessRule'
scheme='http://schemas.google.com/g/2005#kind'/>"
- "<gAcl:role value='http://schemas.google.com/gCal/2005#editor'/>"
- "<gAcl:scope type='user' value='darcy gmail com'/>"
- "</entry>");
+ gdata_test_assert_json (rule, "{"
+ "'kind': 'calendar#aclRule',"
+ "'role': 'writer',"
+ "'scope': {"
+ "'type': 'user',"
+ "'value': 'darcy gmail com'"
+ "}"
+ "}");
}
static void
@@ -1084,10 +1082,36 @@ typedef struct {
} TempCalendarAclsData;
static void
+calendar_access_rule_set_self_link (GDataCalendarCalendar *parent_calendar,
+ GDataCalendarAccessRule *rule)
+{
+ GDataLink *_link = NULL; /* owned */
+ const gchar *calendar_id, *id;
+ gchar *uri = NULL; /* owned */
+
+ /* FIXME: Horrendous hack to set the self link, which is needed for
+ * gdata_service_delete_entry(). Unfortunately, it needs the
+ * ACL ID _and_ the calendar ID.
+ *
+ * Do _not_ copy this code. It needs to be fixed architecturally in
+ * libgdata. */
+ calendar_id = gdata_entry_get_id (GDATA_ENTRY (parent_calendar));
+ id = gdata_entry_get_id (GDATA_ENTRY (rule));
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/",
+ calendar_id, "/acl/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (rule), _link);
+ g_object_unref (_link);
+ g_free (uri);
+}
+
+static void
set_up_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
{
GDataAccessRule *rule;
GDataLink *_link;
+ GError *error = NULL;
/* Set up a calendar */
set_up_temp_calendar ((TempCalendarData*) data, service);
@@ -1095,7 +1119,7 @@ set_up_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
gdata_test_mock_server_start_trace (mock_server, "setup-temp-calendar-acls");
/* Add an access rule to the calendar */
- rule = gdata_access_rule_new (NULL);
+ rule = gdata_calendar_access_rule_new (NULL);
gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "darcy gmail com");
@@ -1106,8 +1130,12 @@ set_up_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
data->rule = GDATA_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service),
gdata_calendar_service_get_primary_authorization_domain (),
- gdata_link_get_uri (_link), GDATA_ENTRY
(rule), NULL, NULL));
- g_assert (GDATA_IS_ACCESS_RULE (data->rule));
+ gdata_link_get_uri (_link), GDATA_ENTRY
(rule), NULL,
+ &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_ACCESS_RULE (data->rule));
+
+ calendar_access_rule_set_self_link (data->parent.calendar, data->rule);
g_object_unref (rule);
@@ -1124,16 +1152,16 @@ set_up_temp_calendar_acls_no_insertion (TempCalendarAclsData *data, gconstpointe
static void
tear_down_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
{
- gdata_test_mock_server_start_trace (mock_server, "teardown-temp-calendar-acls");
-
/* Delete the access rule if it still exists */
if (data->rule != NULL) {
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-calendar-acls");
+
g_assert (gdata_service_delete_entry (GDATA_SERVICE (service),
gdata_calendar_service_get_primary_authorization_domain (),
GDATA_ENTRY (data->rule), NULL, NULL) == TRUE);
g_object_unref (data->rule);
- }
- uhm_server_end_trace (mock_server);
+ uhm_server_end_trace (mock_server);
+ }
/* Delete the calendar */
tear_down_temp_calendar ((TempCalendarData*) data, service);
@@ -1173,7 +1201,7 @@ test_access_rule_insert (TempCalendarAclsData *data, gconstpointer service)
gdata_test_mock_server_start_trace (mock_server, "access-rule-insert");
- rule = gdata_access_rule_new (NULL);
+ rule = gdata_calendar_access_rule_new (NULL);
gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "darcy gmail com");
@@ -1189,6 +1217,8 @@ test_access_rule_insert (TempCalendarAclsData *data, gconstpointer service)
g_assert (GDATA_IS_ACCESS_RULE (new_rule));
g_clear_error (&error);
+ calendar_access_rule_set_self_link (data->parent.calendar, data->rule);
+
/* Check the properties of the returned rule */
g_assert_cmpstr (gdata_access_rule_get_role (new_rule), ==, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
gdata_access_rule_get_scope (new_rule, &scope_type, &scope_value);
@@ -1202,7 +1232,7 @@ test_access_rule_insert (TempCalendarAclsData *data, gconstpointer service)
g_assert (categories != NULL);
g_assert_cmpuint (g_list_length (categories), ==, 1);
category = categories->data;
- g_assert_cmpstr (gdata_category_get_term (category), ==,
"http://schemas.google.com/acl/2007#accessRule");
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "calendar#aclRule");
g_assert_cmpstr (gdata_category_get_scheme (category), ==, "http://schemas.google.com/g/2005#kind");
g_assert (gdata_category_get_label (category) == NULL);
@@ -1233,6 +1263,8 @@ test_access_rule_update (TempCalendarAclsData *data, gconstpointer service)
g_assert (GDATA_IS_ACCESS_RULE (new_rule));
g_clear_error (&error);
+ calendar_access_rule_set_self_link (data->parent.calendar, new_rule);
+
/* Check the properties of the returned rule */
g_assert_cmpstr (gdata_access_rule_get_role (new_rule), ==, GDATA_CALENDAR_ACCESS_ROLE_READ);
gdata_access_rule_get_scope (new_rule, &scope_type, &scope_value);
@@ -1402,8 +1434,6 @@ main (int argc, char *argv[])
g_test_add ("/calendar/event/insert/async/cancellation", GDataAsyncTestData, service,
set_up_insert_event_async,
test_event_insert_async_cancellation, tear_down_insert_event_async);
-#if 0
-TODO
g_test_add ("/calendar/access-rule/get", TempCalendarAclsData, service, set_up_temp_calendar_acls,
test_access_rule_get,
tear_down_temp_calendar_acls);
g_test_add ("/calendar/access-rule/insert", TempCalendarAclsData, service,
set_up_temp_calendar_acls_no_insertion,
@@ -1412,7 +1442,6 @@ TODO
tear_down_temp_calendar_acls);
g_test_add ("/calendar/access-rule/delete", TempCalendarAclsData, service, set_up_temp_calendar_acls,
test_access_rule_delete,
tear_down_temp_calendar_acls);
-#endif
g_test_add_func ("/calendar/event/json", test_event_json);
g_test_add_func ("/calendar/event/json/dates", test_event_json_dates);
@@ -1423,11 +1452,8 @@ TODO
g_test_add_func ("/calendar/calendar/escaping", test_calendar_escaping);
-#if 0
-TODO
g_test_add_func ("/calendar/access-rule/properties", test_access_rule_properties);
g_test_add_func ("/calendar/access-rule/json", test_access_rule_json);
-#endif
g_test_add_func ("/calendar/query/uri", test_query_uri);
g_test_add_func ("/calendar/query/etag", test_query_etag);
diff --git a/gdata/tests/traces/calendar/access-rule-delete b/gdata/tests/traces/calendar/access-rule-delete
index 28912f9..d022391 100644
--- a/gdata/tests/traces/calendar/access-rule-delete
+++ b/gdata/tests/traces/calendar/access-rule-delete
@@ -1,63 +1,23 @@
-> DELETE
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202837
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 121 (0x7fffe003f550), SoupSocket 111 (0x7fffe0040970)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl/user:darcy gmail
com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766374
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 17 (0xa550b0), SoupSocket 8 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202837
-< Soup-Debug: SoupMessage 121 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:18 GMT
-< Set-Cookie: S=calendar=jBZUb79fi9kSaQXb1FBYKA;Expires=Sat, 10-Aug-2013 22:54:10 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:17 GMT
-< Date: Tue, 30 Jul 2013 16:47:17 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1432766374
+< Soup-Debug: SoupMessage 17 (0xa550b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:34 GMT
+< Vary: Origin
+< Vary: X-Origin
< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA">here</A>.
-< </BODY>
-< </HTML>
-
-> DELETE
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202837
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 121 (0x7fffe003f550), SoupSocket 111 (0x7fffe0040970),
restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-
-< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1375202837
-< Soup-Debug: SoupMessage 121 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_QMIIFxw1-89I4fIiltp3toM_OQPaV-s2Op5YfNNKqskJ-elHTN3M2YrIdeRcj84Q94sPukowimpQydy5Tbb14G3YJ4S-NHM8cpqZJBifvXkyktCQOlLQS03AMrw1-u6qvRouqxtCMYd1apUUU9kXVWwoSYowH2iqScUeke9qp_ZEetMmdoQ61WwPB5gd4Of34y2qjfi6BC-i8q-4AfecimYdMpxx-Z7ncnkPEftWV84VyvVUhWfLM8oWcP3zT943b_FOzjNl76pHK1Za70lHtw
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:18 GMT
-< Set-Cookie: S=calendar=4cE4wWxAns3je5eEC48OpQ;Expires=Mon, 12-Aug-2013 16:53:14 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:18 GMT
-< Date: Tue, 30 Jul 2013 16:47:18 GMT
-< GData-Version: 2.6
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Content-Length: 0
-< Server: GSE
-< Content-Type: text/html; charset=UTF-8
+< Alternate-Protocol: 443:quic,p=1
<
diff --git a/gdata/tests/traces/calendar/access-rule-get b/gdata/tests/traces/calendar/access-rule-get
index 990a4f2..7cad0bd 100644
--- a/gdata/tests/traces/calendar/access-rule-get
+++ b/gdata/tests/traces/calendar/access-rule-get
@@ -1,67 +1,65 @@
-> GET /calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full HTTP/1.1
-> Soup-Debug-Timestamp: 1375202815
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 107 (0x7fffe003f550), SoupSocket 99 (0x7750d0)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202815
-< Soup-Debug: SoupMessage 107 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:46:57 GMT
-< Set-Cookie: S=calendar=G_6kLMPUbpzgPxnXiSrtUw;Expires=Mon, 12-Aug-2013 11:38:22 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:46:56 GMT
-< Date: Tue, 30 Jul 2013 16:46:56 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=G_6kLMPUbpzgPxnXiSrtUw
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=G_6kLMPUbpzgPxnXiSrtUw">here</A>.
-< </BODY>
-< </HTML>
-
-> GET
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=G_6kLMPUbpzgPxnXiSrtUw
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202815
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 107 (0x7fffe003f550), SoupSocket 99 (0x7750d0), restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> GET /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766357
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 3 (0xa55470), SoupSocket 2 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1375202816
-< Soup-Debug: SoupMessage 107 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_q4NwI2V8UT-SSEMjiblkY8jTSCIGQJCo_ZFavemirrG0G2jzg3jjEVC3CQauPSZoNTFtDCw6Eu1-1S6nOyDK2J9zwLcpKLPHGuWk8fzL5JjKgN0Z0HbdhVtGaldMU2XCoc4_I0dsAZNFNzMl12pQ2IhlOpKYk_syrjXgbEIFWB07e6wSu6Mp1XswtWQL95nokCfWJkTHf4YGsR2zpy2736UplfLIVHDJLz7fiJzKG-5nUmoz2a5jdwopbkQ6flW44tTL7okPm_2Y6nqlPi74Mg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:46:57 GMT
-< Set-Cookie: S=calendar=GSG2J1yGIV1MRxedFUw0tg;Expires=Thu, 08-Aug-2013 23:52:29 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:46:56 GMT
-< Date: Tue, 30 Jul 2013 16:46:56 GMT
-< Content-Type: application/atom+xml; charset=UTF-8; type=feed
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.6
-< ETag: W/"CE8FRH47eCp7JGA9WhFWEk0."
-< Last-Modified: Tue, 30 Jul 2013 16:46:55 GMT
+< Soup-Debug-Timestamp: 1432766357
+< Soup-Debug: SoupMessage 3 (0xa55470)
+< Expires: Wed, 27 May 2015 22:39:17 GMT
+< Date: Wed, 27 May 2015 22:39:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
< Transfer-Encoding: chunked
<
-< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'
xmlns:app='http://www.w3.org/2007/app' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
xmlns:gd='http://schemas.google.com/g/2005' xmlns:gAcl='http://schemas.google.com/acl/2007'
gd:etag='W/"CE8FRH47eCp7JGA9WhFWEk0."'
gd:kind='calendar#aclFeed'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full</id><updated>2013-07-30T16:46:55.000Z</updated><category
scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>Temp Test Calendar's access control
list</title><link rel='http://schemas.google.com/acl/2007#controlledObject' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/private/full'/><link
rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
href='https://www.google.com/calendar/feed
s/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full'/><link
rel='http://schemas.google.com/g/2005#post' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full'/><link
rel='self' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full'/><generator
version='1.0' uri='http://www.google.com/calendar'>Google
Calendar</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry
gd:etag='W/"CE8FRH47eCp7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><updated>2013-07-30T16:46:55.000Z</updated><app:edited>2013-07-30T16:46:55.000Z</app:edited><category
scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/
acl/2007#accessRule'/><title>editor</title><content/><link rel='self' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='edit' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><author><name>Temp
Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail
com'/></entry><entry gd:etag='W/"CE8FRH47eCp7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Alibgdata.test%40googlemail.com</id><updated>2013-07-30T16:46:55.000Z</updated><app:edited>2013-07-30T16:46:55.000Z</app:edited><category
scheme='http://sch
emas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>owner</title><content/><link rel='self'
type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Alibgdata.test%40googlemail.com'/><link
rel='edit' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Alibgdata.test%40googlemail.com'/><author><name>Temp
Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#owner'/><gAcl:scope type='user' value='libgdata test googlemail
com'/></entry><entry gd:etag='W/"CE8FRH47eCp7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Ai4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com</i
d><updated>2013-07-30T16:46:55.000Z</updated><app:edited>2013-07-30T16:46:55.000Z</app:edited><category
scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>owner</title><content/><link rel='self'
type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Ai4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com'/><link
rel='edit' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Ai4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com'/><author><name>Temp
Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#owner'/><gAcl:scope type='user' value='i4jqlr6fcg9obf3qucemmcm1m0
group calendar google com'/></entry></feed>
+< {
+< "kind": "calendar#acl",
+< "etag": "\"1432766357173000\"",
+< "nextSyncToken": "00001432766357173000",
+< "items": [
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766357173000\"",
+< "id": "user:darcy gmail com",
+< "scope": {
+< "type": "user",
+< "value": "darcy gmail com"
+< },
+< "role": "writer"
+< },
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766351605000\"",
+< "id": "user:libgdata test googlemail com",
+< "scope": {
+< "type": "user",
+< "value": "libgdata test googlemail com"
+< },
+< "role": "owner"
+< },
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00000000000000000000\"",
+< "id": "user:ndihjbq6agrl249fjqgd535qmk group calendar google com",
+< "scope": {
+< "type": "user",
+< "value": "ndihjbq6agrl249fjqgd535qmk group calendar google com"
+< },
+< "role": "owner"
+< }
+< ]
+< }
diff --git a/gdata/tests/traces/calendar/access-rule-insert b/gdata/tests/traces/calendar/access-rule-insert
index 44e699b..ba5b6f8 100644
--- a/gdata/tests/traces/calendar/access-rule-insert
+++ b/gdata/tests/traces/calendar/access-rule-insert
@@ -1,75 +1,43 @@
-> POST /calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full HTTP/1.1
-> Soup-Debug-Timestamp: 1375202821
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 111 (0x7fffe40158e0), SoupSocket 102 (0x7fffe0040af0)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766363
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 7 (0xa55290), SoupSocket 4 (0x63b410)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
-> Content-Type: application/atom+xml
+> Content-Type: application/json
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#editor</title><category
term='http://schemas.google.com/acl/2007#accessRule'
scheme='http://schemas.google.com/g/2005#kind'/><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
+> {"kind":"calendar#aclRule","role":"writer","scope":{"type":"user","value":"darcy gmail com"}}
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202821
-< Soup-Debug: SoupMessage 111 (0x7fffe40158e0)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:03 GMT
-< Set-Cookie: S=calendar=0cMHcOhSoQQJOW_tcXpzww;Expires=Mon, 12-Aug-2013 13:18:56 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:02 GMT
-< Date: Tue, 30 Jul 2013 16:47:02 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=0cMHcOhSoQQJOW_tcXpzww
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766363
+< Soup-Debug: SoupMessage 7 (0xa55290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:23 GMT
+< ETag: "00001432766363662000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
< Transfer-Encoding: chunked
<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=0cMHcOhSoQQJOW_tcXpzww">here</A>.
-< </BODY>
-< </HTML>
-
-> POST
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=0cMHcOhSoQQJOW_tcXpzww
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202822
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 111 (0x7fffe40158e0), SoupSocket 103 (0x775310),
restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Content-Type: application/atom+xml
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-> Content-Length: 473
->
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#editor</title><category
term='http://schemas.google.com/acl/2007#accessRule'
scheme='http://schemas.google.com/g/2005#kind'/><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
-
-< HTTP/1.1 201 Created
-< Soup-Debug-Timestamp: 1375202822
-< Soup-Debug: SoupMessage 111 (0x7fffe40158e0)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_q4NwI2V8UT-SSEMjiblkY8jTSCIGQJCo_ZFavemirrG0G2jzg3jjEVC3CQauPSZoNTFtDCw6Eu1-1S6nOyDK2J9zwLcpKLPHGuWk8fzL5JjKgN0Z0HbdhVtGaldMU2XCoc4_I0dsAZNFNzMl12pQ2IhlOpKYk_syrjXgbEIFWB07e6wSu6Mp1XswtWQL95nokCfWJkTHf4YGsR2zpy2736UplfLIVHDJLz7fiJzKG-5nUmoz2a5jdwopbkQ6flW44tTL7okPm_2Y6nqlPi74Mg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:03 GMT
-< Set-Cookie: S=calendar=VwlNXiAzfDEQTMMFHSsEkw;Expires=Tue, 13-Aug-2013 03:25:53 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:02 GMT
-< Date: Tue, 30 Jul 2013 16:47:02 GMT
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.6
-< ETag: W/"CE8GQ3o_eSp7JGA9WhFWEk0."
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
-< Content-Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:app='http://www.w3.org/2007/app' xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gAcl='http://schemas.google.com/acl/2007' gd:etag='W/"CE8GQ3o_eSp7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><published>2013-07-30T16:47:02.441Z</published><updated>2013-07-30T16:47:02.000Z</updated><app:edited>2013-07-30T16:47:02.441Z</app:edited><category
scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>editor</title><content/><link rel='self'
type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='edit' type='application/atom+xml' href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1
m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><author><name>Temp Test
Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766363662000\"",
+< "id": "user:darcy gmail com",
+< "scope": {
+< "type": "user",
+< "value": "darcy gmail com"
+< },
+< "role": "writer"
+< }
diff --git a/gdata/tests/traces/calendar/access-rule-update b/gdata/tests/traces/calendar/access-rule-update
index b5a96cd..02f0ab2 100644
--- a/gdata/tests/traces/calendar/access-rule-update
+++ b/gdata/tests/traces/calendar/access-rule-update
@@ -1,72 +1,43 @@
-> PUT
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202830
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 116 (0x7fffe003f640), SoupSocket 107 (0x7753d0)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> PUT /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl/user:darcy gmail com
HTTP/1.1
+> Soup-Debug-Timestamp: 1432766369
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 12 (0xa550b0), SoupSocket 6 (0x63b270)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
-> Content-Type: application/atom+xml
+> Content-Type: application/json
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#read</title><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><updated>2013-07-30T16:47:10Z</updated><published>2013-07-30T16:47:10Z</published><category
term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/><link
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'
rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'
rel='http://www.iana.org/assignments/relation/edit' type='applic
ation/atom+xml'/><author><name>Temp Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar
google com</email></author><gAcl:role value='http://schemas.google.com/gCal/2005#read'/><gAcl:scope
type='user' value='darcy gmail com'/></entry>
-
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202830
-< Soup-Debug: SoupMessage 116 (0x7fffe003f640)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:11 GMT
-< Set-Cookie: S=calendar=rRDVDN6I2LALAeYTokq2zQ;Expires=Fri, 09-Aug-2013 11:51:01 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:10 GMT
-< Date: Tue, 30 Jul 2013 16:47:10 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=rRDVDN6I2LALAeYTokq2zQ
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=rRDVDN6I2LALAeYTokq2zQ">here</A>.
-< </BODY>
-< </HTML>
-
-> PUT
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=rRDVDN6I2LALAeYTokq2zQ
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202830
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 116 (0x7fffe003f640), SoupSocket 107 (0x7753d0),
restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Content-Type: application/atom+xml
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-> Content-Length: 1237
->
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#read</title><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><updated>2013-07-30T16:47:10Z</updated><published>2013-07-30T16:47:10Z</published><category
term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/><link
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'
rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'
rel='http://www.iana.org/assignments/relation/edit' type='applic
ation/atom+xml'/><author><name>Temp Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar
google com</email></author><gAcl:role value='http://schemas.google.com/gCal/2005#read'/><gAcl:scope
type='user' value='darcy gmail com'/></entry>
+> {"id":"user:darcy gmail
com","kind":"calendar#aclRule","role":"reader","scope":{"type":"user","value":"darcy gmail com"}}
< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1375202831
-< Soup-Debug: SoupMessage 116 (0x7fffe003f640)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_x9DCxs6Yn1ShR7x5wx1k6e37TbqaZyvZnHbBDD5MjDqIwu2doXjOCD97mfXE8YE20iZQLD52PYbtpDGgujgmHXXGW1wlvqMs94qpgxdE8eYecbfbso9UjfaO5uqfvsRXIhKhe7zV2m0bacHn0JcyH7mkYYXHxHv7XZ_tjZftH-i5SVfC5OZaKOQXxynRfd_Yz5PzuJngGrHUxv5bViZFI3gQCqJikX_t9TXaydAiNvFoCzIgXcLmw11rsBONKvKvzka6NqtM8xqoAdhWs62jAQ
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:12 GMT
-< Set-Cookie: S=calendar=TyBkhul0iYJOiCY2R0pDmQ;Expires=Fri, 09-Aug-2013 23:54:30 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:11 GMT
-< Date: Tue, 30 Jul 2013 16:47:11 GMT
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< GData-Version: 2.6
-< ETag: W/"CE8HQH44eyp7JGA9WhFWEk0."
-< Cache-control: private, max-age=0
+< Soup-Debug-Timestamp: 1432766369
+< Soup-Debug: SoupMessage 12 (0xa550b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:29 GMT
+< ETag: "00001432766369644000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
< Transfer-Encoding: chunked
<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:app='http://www.w3.org/2007/app' xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gAcl='http://schemas.google.com/acl/2007' gd:etag='W/"CE8HQH44eyp7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><updated>2013-07-30T16:47:11.000Z</updated><app:edited>2013-07-30T16:47:11.033Z</app:edited><category
scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>read</title><content/><link
rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'
href='https://www.google.com/calend
ar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='self' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='edit' type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><author><name>Temp
Test Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#read'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766369644000\"",
+< "id": "user:darcy gmail com",
+< "scope": {
+< "type": "user",
+< "value": "darcy gmail com"
+< },
+< "role": "reader"
+< }
diff --git a/gdata/tests/traces/calendar/global-authentication
b/gdata/tests/traces/calendar/global-authentication
index be4dd66..a2e0683 100644
--- a/gdata/tests/traces/calendar/global-authentication
+++ b/gdata/tests/traces/calendar/global-authentication
@@ -1,22 +1,22 @@
POST /o/oauth2/token HTTP/1.1
-> Soup-Debug-Timestamp: 1430949580
-> Soup-Debug: SoupSession 1 (0xc32110), SoupMessage 1 (0xffb8b0), SoupSocket 1 (0x7fe1540036b0)
+> Soup-Debug-Timestamp: 1431695653
+> Soup-Debug: SoupSession 1 (0x1562130), SoupMessage 1 (0x17eb8b0), SoupSocket 1 (0x7efddc0036b0)
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
->
client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FB4IYd9knVDIDdLZdrhuCBbjmotzgYNLb1QqstmPrxbA.UuDy7Em42q8doiIBeO6P2m8efXtWmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+>
client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FTrFY0VbJzBRhT4r_kkyl39xFF15qserv8dER-e182eU.AjD_rrH7m_EUoiIBeO6P2m9a02uvmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1430949580
-< Soup-Debug: SoupMessage 1 (0xffb8b0)
+< Soup-Debug-Timestamp: 1431695654
+< Soup-Debug: SoupMessage 1 (0x17eb8b0)
< Content-Type: application/json; charset=utf-8
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
-< Date: Wed, 06 May 2015 21:59:40 GMT
+< Date: Fri, 15 May 2015 13:14:14 GMT
< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
< Content-Encoding: gzip
< X-Content-Type-Options: nosniff
@@ -27,9 +27,9 @@
< Transfer-Encoding: chunked
<
< {
-< "access_token" : "ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg",
+< "access_token" : "ya29.dAFjwh3j5bnolAkoumk7nKv5Et2BPEF4uLxyUsDhp788Hs7E6P4W865ZrKn7PAcfe4X40GjC0xx3Wg",
< "token_type" : "Bearer",
< "expires_in" : 3600,
-< "refresh_token" : "1/WCwwRyT6fkH315Vd62L8HwTu67pjEG0DJ5H4xGlr8bQMEudVrK5jSpoR30zcRFq6"
+< "refresh_token" : "1/NnqQoUbp8ZRdraXhZV_VxmYC72GtHl65vwf1h6OZ8ik"
< }
diff --git a/gdata/tests/traces/calendar/setup-temp-calendar b/gdata/tests/traces/calendar/setup-temp-calendar
index 5a21021..6e685e3 100644
--- a/gdata/tests/traces/calendar/setup-temp-calendar
+++ b/gdata/tests/traces/calendar/setup-temp-calendar
@@ -1,8 +1,8 @@
POST /calendar/v3/calendars HTTP/1.1
-> Soup-Debug-Timestamp: 1430949585
-> Soup-Debug: SoupSession 1 (0xc32240), SoupMessage 5 (0xffba90), SoupSocket 3 (0xbf11a0)
+> Soup-Debug-Timestamp: 1432766371
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 15 (0xa55470), SoupSocket 7 (0x63b0d0)
Host: www.googleapis.com
-> Authorization: Bearer ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
Content-Type: application/json
Accept-Encoding: gzip, deflate
@@ -12,13 +12,13 @@
{"kind":"calendar#calendar","summary":"Temp Test
Calendar","hidden":false,"backgroundColor":"#7a367a","selected":false}
< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1430949588
-< Soup-Debug: SoupMessage 5 (0xffba90)
+< Soup-Debug-Timestamp: 1432766373
+< Soup-Debug: SoupMessage 15 (0xa55470)
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
-< Date: Wed, 06 May 2015 21:59:48 GMT
-< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/76RTQy6ui7dW5fjosFBgA2nn3xs"
+< Date: Wed, 27 May 2015 22:39:33 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/dA-nwMO6Tel1lbt3WcBQAAl9e34"
< Vary: Origin
< Vary: X-Origin
< Content-Type: application/json; charset=UTF-8
@@ -32,7 +32,7 @@
<
< {
< "kind": "calendar#calendar",
-< "etag": "\"pc4WsFKtK0DPTzlsquzpd-pobYU/76RTQy6ui7dW5fjosFBgA2nn3xs\"",
+< "etag": "\"pc4WsFKtK0DPTzlsquzpd-pobYU/dA-nwMO6Tel1lbt3WcBQAAl9e34\"",
< "id": "ndihjbq6agrl249fjqgd535qmk group calendar google com",
< "summary": "Temp Test Calendar"
< }
diff --git a/gdata/tests/traces/calendar/setup-temp-calendar-acls
b/gdata/tests/traces/calendar/setup-temp-calendar-acls
index 56c3b8c..f08cdf6 100644
--- a/gdata/tests/traces/calendar/setup-temp-calendar-acls
+++ b/gdata/tests/traces/calendar/setup-temp-calendar-acls
@@ -1,75 +1,43 @@
-> POST /calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full HTTP/1.1
-> Soup-Debug-Timestamp: 1375202836
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 120 (0x7fffe40158e0), SoupSocket 110 (0x7fffe0040af0)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766373
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 16 (0xa55290), SoupSocket 8 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
-> Content-Type: application/atom+xml
+> Content-Type: application/json
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#editor</title><category
term='http://schemas.google.com/acl/2007#accessRule'
scheme='http://schemas.google.com/g/2005#kind'/><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
+> {"kind":"calendar#aclRule","role":"writer","scope":{"type":"user","value":"darcy gmail com"}}
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202836
-< Soup-Debug: SoupMessage 120 (0x7fffe40158e0)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:17 GMT
-< Set-Cookie: S=calendar=ZeDIKMUxNaJdSQptI64v2w;Expires=Wed, 07-Aug-2013 20:50:45 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:16 GMT
-< Date: Tue, 30 Jul 2013 16:47:16 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=ZeDIKMUxNaJdSQptI64v2w
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766374
+< Soup-Debug: SoupMessage 16 (0xa55290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:34 GMT
+< ETag: "00001432766374263000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
< Transfer-Encoding: chunked
<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=ZeDIKMUxNaJdSQptI64v2w">here</A>.
-< </BODY>
-< </HTML>
-
-> POST
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full?gsessionid=ZeDIKMUxNaJdSQptI64v2w
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202836
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 120 (0x7fffe40158e0), SoupSocket 111 (0x7fffe0040970),
restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Content-Type: application/atom+xml
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-> Content-Length: 473
->
-> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title
type='text'>http://schemas.google.com/gCal/2005#editor</title><category
term='http://schemas.google.com/acl/2007#accessRule'
scheme='http://schemas.google.com/g/2005#kind'/><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
-
-< HTTP/1.1 201 Created
-< Soup-Debug-Timestamp: 1375202837
-< Soup-Debug: SoupMessage 120 (0x7fffe40158e0)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_q4NwI2V8UT-SSEMjiblkY8jTSCIGQJCo_ZFavemirrG0G2jzg3jjEVC3CQauPSZoNTFtDCw6Eu1-1S6nOyDK2J9zwLcpKLPHGuWk8fzL5JjKgN0Z0HbdhVtGaldMU2XCoc4_I0dsAZNFNzMl12pQ2IhlOpKYk_syrjXgbEIFWB07e6wSu6Mp1XswtWQL95nokCfWJkTHf4YGsR2zpy2736UplfLIVHDJLz7fiJzKG-5nUmoz2a5jdwopbkQ6flW44tTL7okPm_2Y6nqlPi74Mg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:18 GMT
-< Set-Cookie: S=calendar=xDRPVc8CWeuqjiBdPj6K4A;Expires=Mon, 12-Aug-2013 17:58:51 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:17 GMT
-< Date: Tue, 30 Jul 2013 16:47:17 GMT
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.6
-< ETag: W/"CE8HRn46eip7JGA9WhFWEk0."
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
-< Content-Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom'
xmlns:app='http://www.w3.org/2007/app' xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gAcl='http://schemas.google.com/acl/2007' gd:etag='W/"CE8HRn46eip7JGA9WhFWEk0."'
gd:kind='calendar#acl'><id>http://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/user%3Adarcy%40gmail.com</id><published>2013-07-30T16:47:17.012Z</published><updated>2013-07-30T16:47:17.000Z</updated><app:edited>2013-07-30T16:47:17.012Z</app:edited><category
scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'/><title>editor</title><content/><link rel='self'
type='application/atom+xml'
href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><link
rel='edit' type='application/atom+xml' href='https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1
m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com'/><author><name>Temp Test
Calendar</name><email>i4jqlr6fcg9obf3qucemmcm1m0 group calendar google com</email></author><gAcl:role
value='http://schemas.google.com/gCal/2005#editor'/><gAcl:scope type='user' value='darcy gmail com'/></entry>
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766374263000\"",
+< "id": "user:darcy gmail com",
+< "scope": {
+< "type": "user",
+< "value": "darcy gmail com"
+< },
+< "role": "writer"
+< }
diff --git a/gdata/tests/traces/calendar/teardown-temp-calendar
b/gdata/tests/traces/calendar/teardown-temp-calendar
index a59c9aa..ce878c7 100644
--- a/gdata/tests/traces/calendar/teardown-temp-calendar
+++ b/gdata/tests/traces/calendar/teardown-temp-calendar
@@ -1,20 +1,20 @@
DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com HTTP/1.1
-> Soup-Debug-Timestamp: 1430949589
-> Soup-Debug: SoupSession 1 (0xc32240), SoupMessage 9 (0xffb8b0), SoupSocket 3 (0xbf11a0)
+> Soup-Debug-Timestamp: 1432766374
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 18 (0xa550b0), SoupSocket 7 (0x63b0d0)
Host: www.googleapis.com
-> Authorization: Bearer ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
GData-Version: 2
Accept-Encoding: gzip, deflate
User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
< HTTP/1.1 204 No Content
-< Soup-Debug-Timestamp: 1430949591
-< Soup-Debug: SoupMessage 9 (0xffb8b0)
+< Soup-Debug-Timestamp: 1432766375
+< Soup-Debug: SoupMessage 18 (0xa550b0)
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
-< Date: Wed, 06 May 2015 21:59:51 GMT
+< Date: Wed, 27 May 2015 22:39:35 GMT
< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/vyGp6PvFo4RvsFtPoIWeCReyIC8"
< Vary: Origin
< Vary: X-Origin
diff --git a/gdata/tests/traces/calendar/teardown-temp-calendar-acls
b/gdata/tests/traces/calendar/teardown-temp-calendar-acls
index 28912f9..59898c9 100644
--- a/gdata/tests/traces/calendar/teardown-temp-calendar-acls
+++ b/gdata/tests/traces/calendar/teardown-temp-calendar-acls
@@ -1,63 +1,23 @@
-> DELETE
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202837
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 121 (0x7fffe003f550), SoupSocket 111 (0x7fffe0040970)
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk group calendar google com/acl/user:darcy gmail
com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766619
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 13 (0x6efa90), SoupSocket 6 (0x63b270)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAHddfQWb9C4GiMShf_Y0IJh-yvldLrsnTlElpkVj6vzIPGfgSOOhva2ihZRFxK3FLmzu4RCCv_kHQ
GData-Version: 2
Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
Connection: Keep-Alive
-< HTTP/1.1 302 Moved Temporarily
-< Soup-Debug-Timestamp: 1375202837
-< Soup-Debug: SoupMessage 121 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_lzf1dm9Ue8N3SJp2J6o695WrE5nMbNLIXgO1GwYSOH0dinvA7V6dAhAIAEim2gLMsmbC2ddMnDUzaVKIGr3_JWCh97kMTIAR1M2IeSsu02b7EZA-X4HjICLw-x5pMnXhR8i08nLbVHSLT_No8fvB518lPWszfELKmW9TYG0-BAxXFzn9IKi_SmDnEv70WeTVk9AKBXEZK8GgbVvG2jwg9IxQwwSgxxH2Am-wKlw1Xh28Ocyi9bXsxw2zvbHLluu_emFBzQJ8Ds6aIurEQIryfg
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:18 GMT
-< Set-Cookie: S=calendar=jBZUb79fi9kSaQXb1FBYKA;Expires=Sat, 10-Aug-2013 22:54:10 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:17 GMT
-< Date: Tue, 30 Jul 2013 16:47:17 GMT
-< Location:
https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA
-< Content-Type: text/html; charset=UTF-8
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1432766619
+< Soup-Debug: SoupMessage 13 (0x6efa90)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:43:39 GMT
+< Vary: Origin
+< Vary: X-Origin
< Server: GSE
-< Transfer-Encoding: chunked
-<
-< <HTML>
-< <HEAD>
-< <TITLE>Moved Temporarily</TITLE>
-< </HEAD>
-< <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-< <H1>Moved Temporarily</H1>
-< The document has moved <A
HREF="https://www.google.com/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA">here</A>.
-< </BODY>
-< </HTML>
-
-> DELETE
/calendar/feeds/i4jqlr6fcg9obf3qucemmcm1m0%40group.calendar.google.com/acl/full/user%3Adarcy%40gmail.com?gsessionid=jBZUb79fi9kSaQXb1FBYKA
HTTP/1.1
-> Soup-Debug-Timestamp: 1375202837
-> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 121 (0x7fffe003f550), SoupSocket 111 (0x7fffe0040970),
restarted
-> Host: www.google.com
-> Authorization: GoogleLogin
auth=DQAAANUAAACtQA4YYe986jGVKTRKjvf_LQKCUZ-IrhGFxQuS1Zfjc3yd5y6Y5AHV3CUuKKT-NheGlvH_Hh7TOXLccehoG2zbN5TDNxZ-TDfe29rhXBteyCMVj5DvD7eNA2g8k8tM1sbnqitPfsPs-kbfR6iXisr9Yp_3Vt3LqvpmmxJI6AKoXpC08YhV24rZiqJZMMHhxxFr_TeYYtgiPL9vOqjnfhJJI6rGgNQ6eYvVaKo7TzLgbhWkg6Sikn3hbkowxi8_rA9_Bvwwxs77T15OWlsObAigagTJyjsQoAUGISPhESplZQ
-> GData-Version: 2
-> Accept-Encoding: gzip, deflate
-> Connection: Keep-Alive
-
-< HTTP/1.1 200 OK
-< Soup-Debug-Timestamp: 1375202837
-< Soup-Debug: SoupMessage 121 (0x7fffe003f550)
-< Update-Client-Auth:
DQAAANYAAACtQA4YYe986jGVKTRKjvf_QMIIFxw1-89I4fIiltp3toM_OQPaV-s2Op5YfNNKqskJ-elHTN3M2YrIdeRcj84Q94sPukowimpQydy5Tbb14G3YJ4S-NHM8cpqZJBifvXkyktCQOlLQS03AMrw1-u6qvRouqxtCMYd1apUUU9kXVWwoSYowH2iqScUeke9qp_ZEetMmdoQ61WwPB5gd4Of34y2qjfi6BC-i8q-4AfecimYdMpxx-Z7ncnkPEftWV84VyvVUhWfLM8oWcP3zT943b_FOzjNl76pHK1Za70lHtw
-< Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Tue, 30-Jul-2013 16:47:18 GMT
-< Set-Cookie: S=calendar=4cE4wWxAns3je5eEC48OpQ;Expires=Mon, 12-Aug-2013 16:53:14 GMT;Secure
-< Expires: Tue, 30 Jul 2013 16:47:18 GMT
-< Date: Tue, 30 Jul 2013 16:47:18 GMT
-< GData-Version: 2.6
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
-< Content-Length: 0
-< Server: GSE
-< Content-Type: text/html; charset=UTF-8
+< Alternate-Protocol: 443:quic,p=1
<
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]