[libgdata] [calendar] Add #defines for Google Calendar objects
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] [calendar] Add #defines for Google Calendar objects
- Date: Sat, 27 Mar 2010 14:38:26 +0000 (UTC)
commit c78794f350371e31b54d4b44bb264ccb27238571
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Mar 27 14:38:03 2010 +0000
[calendar] Add #defines for Google Calendar objects
docs/reference/gdata-sections.txt | 9 +++
gdata/gd/gdata-gd-when.h | 81 +++++++++++++++++++++
gdata/services/calendar/gdata-calendar-calendar.c | 6 +-
gdata/services/calendar/gdata-calendar-event.c | 7 +-
gdata/services/calendar/gdata-calendar-feed.c | 3 +-
gdata/tests/calendar.c | 4 +-
gdata/tests/general.c | 2 +-
7 files changed, 103 insertions(+), 9 deletions(-)
---
diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index a34db15..46a93a9 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -825,6 +825,15 @@ GDataGDOrganizationPrivate
<SECTION>
<FILE>gdata-gd-when</FILE>
<TITLE>GDataGDWhen</TITLE>
+GDATA_GD_EVENT_STATUS_CANCELED
+GDATA_GD_EVENT_STATUS_CONFIRMED
+GDATA_GD_EVENT_STATUS_TENTATIVE
+GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL
+GDATA_GD_EVENT_VISIBILITY_DEFAULT
+GDATA_GD_EVENT_VISIBILITY_PRIVATE
+GDATA_GD_EVENT_VISIBILITY_PUBLIC
+GDATA_GD_EVENT_TRANSPARENCY_OPAQUE
+GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT
GDataGDWhen
GDataGDWhenClass
gdata_gd_when_new
diff --git a/gdata/gd/gdata-gd-when.h b/gdata/gd/gdata-gd-when.h
index 2f2e1f4..4eb8ad7 100644
--- a/gdata/gd/gdata-gd-when.h
+++ b/gdata/gd/gdata-gd-when.h
@@ -28,6 +28,87 @@
G_BEGIN_DECLS
+/**
+ * GDATA_GD_EVENT_STATUS_CANCELED:
+ *
+ * The event has been canceled.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_STATUS_CANCELED "http://schemas.google.com/g/2005#event.canceled"
+
+/**
+ * GDATA_GD_EVENT_STATUS_CONFIRMED:
+ *
+ * The event has been planned and confirmed.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_STATUS_CONFIRMED "http://schemas.google.com/g/2005#event.confirmed"
+
+/**
+ * GDATA_GD_EVENT_STATUS_TENTATIVE:
+ *
+ * The event has been planned, but only tentatively scheduled.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_STATUS_TENTATIVE "http://schemas.google.com/g/2005#event.tentative"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL:
+ *
+ * The event is visible to only certain people.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL "http://schemas.google.com/g/2005#event.confidential"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_DEFAULT:
+ *
+ * The event's visibility is inherited from the preferences of its owner.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_VISIBILITY_DEFAULT "http://schemas.google.com/g/2005#event.default"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_PRIVATE:
+ *
+ * The event is visible to very few people.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_VISIBILITY_PRIVATE "http://schemas.google.com/g/2005#event.private"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_PUBLIC:
+ *
+ * The event is visible to most people.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_VISIBILITY_PUBLIC "http://schemas.google.com/g/2005#event.public"
+
+/**
+ * GDATA_GD_EVENT_TRANSPARENCY_OPAQUE:
+ *
+ * The event consumes time in calendars; its time will be marked as busy in a free/busy search.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_TRANSPARENCY_OPAQUE "http://schemas.google.com/g/2005#event.opaque"
+
+/**
+ * GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT:
+ *
+ * The event does not consume time in calendars; its time will be not marked as busy in a free/busy search.
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT "http://schemas.google.com/g/2005#event.transparent"
+
#define GDATA_TYPE_GD_WHEN (gdata_gd_when_get_type ())
#define GDATA_GD_WHEN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_WHEN, GDataGDWhen))
#define GDATA_GD_WHEN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_WHEN, GDataGDWhenClass))
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c b/gdata/services/calendar/gdata-calendar-calendar.c
index 425422a..425aedd 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -97,7 +97,8 @@ gdata_calendar_calendar_class_init (GDataCalendarCalendarClass *klass)
/**
* GDataCalendarCalendar:timezone:
*
- * The timezone in which the calendar's times are given.
+ * The timezone in which the calendar's times are given. This is a timezone name in tz database notation: <ulink type="http"
+ * url="http://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones">reference</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_TIMEZONE,
g_param_spec_string ("timezone",
@@ -156,7 +157,8 @@ gdata_calendar_calendar_class_init (GDataCalendarCalendarClass *klass)
/**
* GDataCalendarCalendar:access-level:
*
- * Indicates what level of access the authenticated user has to the calendar.
+ * Indicates what level of access the authenticated user has to the calendar. For example: %GDATA_CALENDAR_ACCESS_ROLE_READ or
+ * %GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY.
**/
g_object_class_install_property (gobject_class, PROP_ACCESS_LEVEL,
g_param_spec_string ("access-level",
diff --git a/gdata/services/calendar/gdata-calendar-event.c b/gdata/services/calendar/gdata-calendar-event.c
index 9a00a4c..69b59f6 100644
--- a/gdata/services/calendar/gdata-calendar-event.c
+++ b/gdata/services/calendar/gdata-calendar-event.c
@@ -121,7 +121,7 @@ gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
/**
* GDataCalendarEvent:status:
*
- * The scheduling status of the event.
+ * The scheduling status of the event. For example: %GDATA_GD_EVENT_STATUS_CANCELED or %GDATA_GD_EVENT_STATUS_CONFIRMED.
*
* For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdEventStatus">
* GData specification</ulink>.
@@ -137,7 +137,7 @@ gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
/**
* GDataCalendarEvent:visibility:
*
- * The event's visibility to calendar users.
+ * The event's visibility to calendar users. For example: %GDATA_GD_EVENT_VISIBILITY_PUBLIC or %GDATA_GD_EVENT_VISIBILITY_DEFAULT.
*
* For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdVisibility">
* GData specification</ulink>.
@@ -151,7 +151,8 @@ gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
/**
* GDataCalendarEvent:transparency:
*
- * How the event is marked as consuming time on a calendar.
+ * How the event is marked as consuming time on a calendar. For example: %GDATA_GD_EVENT_TRANSPARENCY_OPAQUE or
+ * %GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT.
*
* For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdTransparency">
* GData specification</ulink>.
diff --git a/gdata/services/calendar/gdata-calendar-feed.c b/gdata/services/calendar/gdata-calendar-feed.c
index 2e8b5de..9cd82ff 100644
--- a/gdata/services/calendar/gdata-calendar-feed.c
+++ b/gdata/services/calendar/gdata-calendar-feed.c
@@ -66,7 +66,8 @@ gdata_calendar_feed_class_init (GDataCalendarFeedClass *klass)
/**
* GDataCalendarFeed:timezone:
*
- * The timezone in which the feed's times are given.
+ * The timezone in which the feed's times are given. This is a timezone name in tz database notation: <ulink type="http"
+ * url="http://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones">reference</ulink>.
*
* Since: 0.3.0
**/
diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
index 005b0e5..453faf7 100644
--- a/gdata/tests/calendar.c
+++ b/gdata/tests/calendar.c
@@ -243,8 +243,8 @@ test_insert_simple (gconstpointer service)
category = gdata_category_new ("http://schemas.google.com/g/2005#event", "http://schemas.google.com/g/2005#kind", NULL);
gdata_entry_add_category (GDATA_ENTRY (event), category);
g_object_unref (category);
- gdata_calendar_event_set_transparency (event, "http://schemas.google.com/g/2005#event.opaque");
- gdata_calendar_event_set_status (event, "http://schemas.google.com/g/2005#event.confirmed");
+ gdata_calendar_event_set_transparency (event, GDATA_GD_EVENT_TRANSPARENCY_OPAQUE);
+ gdata_calendar_event_set_status (event, GDATA_GD_EVENT_STATUS_CONFIRMED);
where = gdata_gd_where_new (NULL, "Rolling Lawn Courts", NULL);
gdata_calendar_event_add_place (event, where);
g_object_unref (where);
diff --git a/gdata/tests/general.c b/gdata/tests/general.c
index 7308a04..78c1856 100644
--- a/gdata/tests/general.c
+++ b/gdata/tests/general.c
@@ -681,7 +681,7 @@ test_access_rule_get_xml (void)
"<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'>writer</title>"
+ "<title type='text'>none</title>"
"<id>an-id</id>"
"<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
"<gAcl:role value='none'/>"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]