GDataCalendarEvent

GDataCalendarEvent — GData Calendar event object

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/services/calendar/gdata-calendar-event.h>

                    GDataCalendarEvent;
                    GDataCalendarEventClass;
GDataCalendarEvent * gdata_calendar_event_new           (const gchar *id);
GList *             gdata_calendar_event_get_people     (GDataCalendarEvent *self);
void                gdata_calendar_event_add_person     (GDataCalendarEvent *self,
                                                         GDataGDWho *who);
GList *             gdata_calendar_event_get_places     (GDataCalendarEvent *self);
void                gdata_calendar_event_add_place      (GDataCalendarEvent *self,
                                                         GDataGDWhere *where);
GList *             gdata_calendar_event_get_times      (GDataCalendarEvent *self);
gboolean            gdata_calendar_event_get_primary_time
                                                        (GDataCalendarEvent *self,
                                                         GTimeVal *start_time,
                                                         GTimeVal *end_time,
                                                         GDataGDWhen **when);
void                gdata_calendar_event_add_time       (GDataCalendarEvent *self,
                                                         GDataGDWhen *when);
const gchar *       gdata_calendar_event_get_recurrence (GDataCalendarEvent *self);
void                gdata_calendar_event_set_recurrence (GDataCalendarEvent *self,
                                                         const gchar *recurrence);
void                gdata_calendar_event_get_original_event_details
                                                        (GDataCalendarEvent *self,
                                                         gchar **event_id,
                                                         gchar **event_uri);
gboolean            gdata_calendar_event_is_exception   (GDataCalendarEvent *self);
gboolean            gdata_calendar_event_get_anyone_can_add_self
                                                        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_anyone_can_add_self
                                                        (GDataCalendarEvent *self,
                                                         gboolean anyone_can_add_self);
gboolean            gdata_calendar_event_get_guests_can_invite_others
                                                        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_guests_can_invite_others
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_invite_others);
gboolean            gdata_calendar_event_get_guests_can_modify
                                                        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_guests_can_modify
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_modify);
gboolean            gdata_calendar_event_get_guests_can_see_guests
                                                        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_guests_can_see_guests
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_see_guests);
guint               gdata_calendar_event_get_sequence   (GDataCalendarEvent *self);
void                gdata_calendar_event_set_sequence   (GDataCalendarEvent *self,
                                                         guint sequence);
const gchar *       gdata_calendar_event_get_status     (GDataCalendarEvent *self);
void                gdata_calendar_event_set_status     (GDataCalendarEvent *self,
                                                         const gchar *status);
const gchar *       gdata_calendar_event_get_transparency
                                                        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_transparency
                                                        (GDataCalendarEvent *self,
                                                         const gchar *transparency);
const gchar *       gdata_calendar_event_get_uid        (GDataCalendarEvent *self);
void                gdata_calendar_event_set_uid        (GDataCalendarEvent *self,
                                                         const gchar *uid);
const gchar *       gdata_calendar_event_get_visibility (GDataCalendarEvent *self);
void                gdata_calendar_event_set_visibility (GDataCalendarEvent *self,
                                                         const gchar *visibility);
void                gdata_calendar_event_get_edited     (GDataCalendarEvent *self,
                                                         GTimeVal *edited);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataEntry
               +----GDataCalendarEvent

Properties

  "anyone-can-add-self"      gboolean              : Read / Write
  "edited"                   GTimeVal*             : Read
  "guests-can-invite-others" gboolean              : Read / Write
  "guests-can-modify"        gboolean              : Read / Write
  "guests-can-see-guests"    gboolean              : Read / Write
  "original-event-id"        gchar*                : Read
  "original-event-uri"       gchar*                : Read
  "recurrence"               gchar*                : Read / Write
  "sequence"                 guint                 : Read / Write
  "status"                   gchar*                : Read / Write
  "transparency"             gchar*                : Read / Write
  "uid"                      gchar*                : Read / Write
  "visibility"               gchar*                : Read / Write

Description

GDataCalendarEvent is a subclass of GDataEntry to represent an event on a calendar from Google Calendar.

For more details of Google Calendar's GData API, see the online documentation.

Details

GDataCalendarEvent

typedef struct _GDataCalendarEvent GDataCalendarEvent;

All the fields in the GDataCalendarEvent structure are private and should never be accessed directly.


GDataCalendarEventClass

typedef struct {
} GDataCalendarEventClass;

All the fields in the GDataCalendarEventClass structure are private and should never be accessed directly.


gdata_calendar_event_new ()

GDataCalendarEvent * gdata_calendar_event_new           (const gchar *id);

Creates a new GDataCalendarEvent with the given ID and default properties.

id :

the event's ID, or NULL

Returns :

a new GDataCalendarEvent; unref with g_object_unref()

gdata_calendar_event_get_people ()

GList *             gdata_calendar_event_get_people     (GDataCalendarEvent *self);

Gets a list of the people attending the event.

self :

a GDataCalendarEvent

Returns :

a GList of GDataGDWhos, or NULL

Since 0.2.0


gdata_calendar_event_add_person ()

void                gdata_calendar_event_add_person     (GDataCalendarEvent *self,
                                                         GDataGDWho *who);

Adds the person who to the event as a guest (attendee, organiser, performer, etc.), and increments its reference count.

Duplicate people will not be added to the list.

self :

a GDataCalendarEvent

who :

a GDataGDWho to add

gdata_calendar_event_get_places ()

GList *             gdata_calendar_event_get_places     (GDataCalendarEvent *self);

Gets a list of the locations associated with the event.

self :

a GDataCalendarEvent

Returns :

a GList of GDataGDWheres, or NULL

Since 0.2.0


gdata_calendar_event_add_place ()

void                gdata_calendar_event_add_place      (GDataCalendarEvent *self,
                                                         GDataGDWhere *where);

Adds the place where to the event as a location and increments its reference count.

Duplicate places will not be added to the list.

self :

a GDataCalendarEvent

where :

a GDataGDWhere to add

gdata_calendar_event_get_times ()

GList *             gdata_calendar_event_get_times      (GDataCalendarEvent *self);

Gets a list of the time periods associated with the event.

self :

a GDataCalendarEvent

Returns :

a GList of GDataGDWhens, or NULL

Since 0.2.0


gdata_calendar_event_get_primary_time ()

gboolean            gdata_calendar_event_get_primary_time
                                                        (GDataCalendarEvent *self,
                                                         GTimeVal *start_time,
                                                         GTimeVal *end_time,
                                                         GDataGDWhen **when);

Gets the first time period associated with the event, conveniently returning just its start and end times if required.

If there are no time periods, or more than one time period, associated with the event, FALSE will be returned, and the parameters will remain unmodified.

self :

a GDataCalendarEvent

start_time :

a GTimeVal for the start time, or NULL

end_time :

a GTimeVal for the end time, or NULL

when :

a GDataGDWhen for the primary time structure, or NULL

Returns :

TRUE if there is only one time period associated with the event, FALSE otherwise

Since 0.2.0


gdata_calendar_event_add_time ()

void                gdata_calendar_event_add_time       (GDataCalendarEvent *self,
                                                         GDataGDWhen *when);

Adds when to the event as a time period when the event happens, and increments its reference count.

Duplicate times will not be added to the list.

self :

a GDataCalendarEvent

when :

a GDataGDWhen to add

Since 0.2.0


gdata_calendar_event_get_recurrence ()

const gchar *       gdata_calendar_event_get_recurrence (GDataCalendarEvent *self);

Gets the "recurrence" property.

self :

a GDataCalendarEvent

Returns :

the event recurrence patterns, or NULL

Since 0.3.0


gdata_calendar_event_set_recurrence ()

void                gdata_calendar_event_set_recurrence (GDataCalendarEvent *self,
                                                         const gchar *recurrence);

Sets the "recurrence" property to the new recurrence, recurrence.

Set recurrence to NULL to unset the property in the event.

self :

a GDataCalendarEvent

recurrence :

a new event recurrence, or NULL

Since 0.3.0


gdata_calendar_event_get_original_event_details ()

void                gdata_calendar_event_get_original_event_details
                                                        (GDataCalendarEvent *self,
                                                         gchar **event_id,
                                                         gchar **event_uri);

Gets details of the original event, if this event is an exception to a recurring event. The original event's ID and the URI of the event's XML are returned in event_id and event_uri, respectively.

If this event is not an exception to a recurring event, event_id and event_uri will be set to NULL. See gdata_calendar_event_is_exception() to determine more simply whether an event is an exception to a recurring event.

If both event_id and event_uri are NULL, this function is a no-op. Otherwise, they should both be freed with g_free().

self :

a GDataCalendarEvent

event_id :

return location for the original event's ID, or NULL

event_uri :

return location for the original event's URI, or NULL

Since 0.3.0


gdata_calendar_event_is_exception ()

gboolean            gdata_calendar_event_is_exception   (GDataCalendarEvent *self);

Determines whether the event is an exception to a recurring event. If it is, details of the original event can be retrieved using gdata_calendar_event_get_original_event_details().

self :

a GDataCalendarEvent

Returns :

TRUE if the event is an exception, FALSE otherwise

Since 0.3.0


gdata_calendar_event_get_anyone_can_add_self ()

gboolean            gdata_calendar_event_get_anyone_can_add_self
                                                        (GDataCalendarEvent *self);

Gets the "anyone-can-add-self" property.

self :

a GDataCalendarEvent

Returns :

TRUE if anyone can add themselves as an attendee to the event, FALSE otherwise

gdata_calendar_event_set_anyone_can_add_self ()

void                gdata_calendar_event_set_anyone_can_add_self
                                                        (GDataCalendarEvent *self,
                                                         gboolean anyone_can_add_self);

Sets the "anyone-can-add-self" property to anyone_can_add_self.

self :

a GDataCalendarEvent

anyone_can_add_self :

TRUE if anyone can add themselves as an attendee to the event, FALSE otherwise

gdata_calendar_event_get_guests_can_invite_others ()

gboolean            gdata_calendar_event_get_guests_can_invite_others
                                                        (GDataCalendarEvent *self);

Gets the "guests-can-invite-others" property.

self :

a GDataCalendarEvent

Returns :

TRUE if attendees can invite others to the event, FALSE otherwise

gdata_calendar_event_set_guests_can_invite_others ()

void                gdata_calendar_event_set_guests_can_invite_others
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_invite_others);

Sets the "guests-can-invite-others" property to guests_can_invite_others.

self :

a GDataCalendarEvent

guests_can_invite_others :

TRUE if attendees can invite others to the event, FALSE otherwise

gdata_calendar_event_get_guests_can_modify ()

gboolean            gdata_calendar_event_get_guests_can_modify
                                                        (GDataCalendarEvent *self);

Gets the "guests-can-modify" property.

self :

a GDataCalendarEvent

Returns :

TRUE if attendees can modify the original event, FALSE otherwise

gdata_calendar_event_set_guests_can_modify ()

void                gdata_calendar_event_set_guests_can_modify
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_modify);

Sets the "guests-can-modify" property to guests_can_modify.

self :

a GDataCalendarEvent

guests_can_modify :

TRUE if attendees can modify the original event, FALSE otherwise

gdata_calendar_event_get_guests_can_see_guests ()

gboolean            gdata_calendar_event_get_guests_can_see_guests
                                                        (GDataCalendarEvent *self);

Gets the "guests-can-see-guests" property.

self :

a GDataCalendarEvent

Returns :

TRUE if attendees can see who's attending the event, FALSE otherwise

gdata_calendar_event_set_guests_can_see_guests ()

void                gdata_calendar_event_set_guests_can_see_guests
                                                        (GDataCalendarEvent *self,
                                                         gboolean guests_can_see_guests);

Sets the "guests-can-see-guests" property to guests_can_see_guests.

self :

a GDataCalendarEvent

guests_can_see_guests :

TRUE if attendees can see who's attending the event, FALSE otherwise

gdata_calendar_event_get_sequence ()

guint               gdata_calendar_event_get_sequence   (GDataCalendarEvent *self);

Gets the "sequence" property.

self :

a GDataCalendarEvent

Returns :

the event's sequence number

gdata_calendar_event_set_sequence ()

void                gdata_calendar_event_set_sequence   (GDataCalendarEvent *self,
                                                         guint sequence);

Sets the "sequence" property to the new sequence number, sequence.

self :

a GDataCalendarEvent

sequence :

a new sequence number, or NULL

gdata_calendar_event_get_status ()

const gchar *       gdata_calendar_event_get_status     (GDataCalendarEvent *self);

Gets the "status" property.

self :

a GDataCalendarEvent

Returns :

the event status, or NULL

Since 0.2.0


gdata_calendar_event_set_status ()

void                gdata_calendar_event_set_status     (GDataCalendarEvent *self,
                                                         const gchar *status);

Sets the "status" property to the new status, status.

Set status to NULL to unset the property in the event.

self :

a GDataCalendarEvent

status :

a new event status, or NULL

Since 0.2.0


gdata_calendar_event_get_transparency ()

const gchar *       gdata_calendar_event_get_transparency
                                                        (GDataCalendarEvent *self);

Gets the "transparency" property.

self :

a GDataCalendarEvent

Returns :

the event transparency, or NULL

gdata_calendar_event_set_transparency ()

void                gdata_calendar_event_set_transparency
                                                        (GDataCalendarEvent *self,
                                                         const gchar *transparency);

Sets the "transparency" property to the new transparency, transparency.

Set transparency to NULL to unset the property in the event.

self :

a GDataCalendarEvent

transparency :

a new event transparency, or NULL

gdata_calendar_event_get_uid ()

const gchar *       gdata_calendar_event_get_uid        (GDataCalendarEvent *self);

Gets the "uid" property.

self :

a GDataCalendarEvent

Returns :

the event's UID, or NULL

gdata_calendar_event_set_uid ()

void                gdata_calendar_event_set_uid        (GDataCalendarEvent *self,
                                                         const gchar *uid);

Sets the "uid" property to the new UID, uid.

Set uid to NULL to unset the property in the event.

self :

a GDataCalendarEvent

uid :

a new event UID, or NULL

gdata_calendar_event_get_visibility ()

const gchar *       gdata_calendar_event_get_visibility (GDataCalendarEvent *self);

Gets the "visibility" property.

self :

a GDataCalendarEvent

Returns :

the event visibility, or NULL

gdata_calendar_event_set_visibility ()

void                gdata_calendar_event_set_visibility (GDataCalendarEvent *self,
                                                         const gchar *visibility);

Sets the "visibility" property to the new visibility, visibility.

Set visibility to NULL to unset the property in the event.

self :

a GDataCalendarEvent

visibility :

a new event visibility, or NULL

gdata_calendar_event_get_edited ()

void                gdata_calendar_event_get_edited     (GDataCalendarEvent *self,
                                                         GTimeVal *edited);

Gets the "edited" property and puts it in edited. If the property is unset, both fields in the GTimeVal will be set to 0.

self :

a GDataCalendarEvent

edited :

a GTimeVal

Property Details

The "anyone-can-add-self" property

  "anyone-can-add-self"      gboolean              : Read / Write

Indicates whether anyone can add themselves to the attendee list of the event.

Default value: FALSE


The "edited" property

  "edited"                   GTimeVal*             : Read

The last time the event was edited. If the event has not been edited yet, the content indicates the time it was created.

For more information, see the Atom Publishing Protocol specification.


The "guests-can-invite-others" property

  "guests-can-invite-others" gboolean              : Read / Write

Indicates whether event attendees may invite other people to the event.

For more information, see the GData specification.

Default value: FALSE


The "guests-can-modify" property

  "guests-can-modify"        gboolean              : Read / Write

Indicates whether event attendees may modify the original event, so that changes are visible to organizer and other attendees. Otherwise, any changes made by attendees will be restricted to that attendee's calendar.

For more information, see the GData specification.

Default value: FALSE


The "guests-can-see-guests" property

  "guests-can-see-guests"    gboolean              : Read / Write

Indicates whether event attendees can see other people invited to the event.

For more information, see the GData specification.

Default value: FALSE


The "original-event-id" property

  "original-event-id"        gchar*                : Read

The event ID for the original event, if this event is an exception to a recurring event.

Default value: NULL

Since 0.3.0


The "original-event-uri" property

  "original-event-uri"       gchar*                : Read

The event URI for the original event, if this event is an exception to a recurring event.

Default value: NULL

Since 0.3.0


The "recurrence" property

  "recurrence"               gchar*                : Read / Write

Represents the dates and times when a recurring event takes place. The returned string is in iCal format, as a list of properties.

For more information, see the GData specification.

Default value: NULL

Since 0.3.0


The "sequence" property

  "sequence"                 guint                 : Read / Write

The revision sequence number of the event as defined in Section 4.8.7.4 of RFC 2445.

Default value: 0


The "status" property

  "status"                   gchar*                : Read / Write

The scheduling status of the event.

For more information, see the GData specification.

Default value: NULL

Since 0.2.0


The "transparency" property

  "transparency"             gchar*                : Read / Write

How the event is marked as consuming time on a calendar.

For more information, see the GData specification.

Default value: NULL


The "uid" property

  "uid"                      gchar*                : Read / Write

The globally unique identifier (UID) of the event as defined in Section 4.8.4.7 of RFC 2445.

Default value: NULL


The "visibility" property

  "visibility"               gchar*                : Read / Write

The event's visibility to calendar users.

For more information, see the GData specification.

Default value: NULL