1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
5  *
6  * GData Client is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * GData Client is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with GData Client.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef GDATA_CALENDAR_EVENT_H
21 #define GDATA_CALENDAR_EVENT_H
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gdata/gdata-entry.h>
27 #include <gdata/gdata-types.h>
28 #include <gdata/gd/gdata-gd-when.h>
29 #include <gdata/gd/gdata-gd-where.h>
30 #include <gdata/gd/gdata-gd-who.h>
31 
32 G_BEGIN_DECLS
33 
34 #define GDATA_TYPE_CALENDAR_EVENT		(gdata_calendar_event_get_type ())
35 #define GDATA_CALENDAR_EVENT(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEvent))
36 #define GDATA_CALENDAR_EVENT_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventClass))
37 #define GDATA_IS_CALENDAR_EVENT(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_EVENT))
38 #define GDATA_IS_CALENDAR_EVENT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_EVENT))
39 #define GDATA_CALENDAR_EVENT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventClass))
40 
41 typedef struct _GDataCalendarEventPrivate	GDataCalendarEventPrivate;
42 
43 /**
44  * GDataCalendarEvent:
45  *
46  * All the fields in the #GDataCalendarEvent structure are private and should never be accessed directly.
47  */
48 typedef struct {
49 	GDataEntry parent;
50 	GDataCalendarEventPrivate *priv;
51 } GDataCalendarEvent;
52 
53 /**
54  * GDataCalendarEventClass:
55  *
56  * All the fields in the #GDataCalendarEventClass structure are private and should never be accessed directly.
57  */
58 typedef struct {
59 	/*< private >*/
60 	GDataEntryClass parent;
61 
62 	/*< private >*/
63 	/* Padding for future expansion */
64 	void (*_g_reserved0) (void);
65 	void (*_g_reserved1) (void);
66 } GDataCalendarEventClass;
67 
68 GType gdata_calendar_event_get_type (void) G_GNUC_CONST;
69 
70 GDataCalendarEvent *gdata_calendar_event_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
71 
72 gint64 gdata_calendar_event_get_edited (GDataCalendarEvent *self);
73 const gchar *gdata_calendar_event_get_status (GDataCalendarEvent *self) G_GNUC_PURE;
74 void gdata_calendar_event_set_status (GDataCalendarEvent *self, const gchar *status);
75 const gchar *gdata_calendar_event_get_visibility (GDataCalendarEvent *self) G_GNUC_PURE;
76 void gdata_calendar_event_set_visibility (GDataCalendarEvent *self, const gchar *visibility);
77 const gchar *gdata_calendar_event_get_transparency (GDataCalendarEvent *self) G_GNUC_PURE;
78 void gdata_calendar_event_set_transparency (GDataCalendarEvent *self, const gchar *transparency);
79 const gchar *gdata_calendar_event_get_uid (GDataCalendarEvent *self) G_GNUC_PURE;
80 void gdata_calendar_event_set_uid (GDataCalendarEvent *self, const gchar *uid);
81 guint gdata_calendar_event_get_sequence (GDataCalendarEvent *self) G_GNUC_PURE;
82 void gdata_calendar_event_set_sequence (GDataCalendarEvent *self, guint sequence);
83 gboolean gdata_calendar_event_get_guests_can_modify (GDataCalendarEvent *self) G_GNUC_PURE;
84 void gdata_calendar_event_set_guests_can_modify (GDataCalendarEvent *self, gboolean guests_can_modify);
85 gboolean gdata_calendar_event_get_guests_can_invite_others (GDataCalendarEvent *self) G_GNUC_PURE;
86 void gdata_calendar_event_set_guests_can_invite_others (GDataCalendarEvent *self, gboolean guests_can_invite_others);
87 gboolean gdata_calendar_event_get_guests_can_see_guests (GDataCalendarEvent *self) G_GNUC_PURE;
88 void gdata_calendar_event_set_guests_can_see_guests (GDataCalendarEvent *self, gboolean guests_can_see_guests);
89 gboolean gdata_calendar_event_get_anyone_can_add_self (GDataCalendarEvent *self) G_GNUC_PURE;
90 void gdata_calendar_event_set_anyone_can_add_self (GDataCalendarEvent *self, gboolean anyone_can_add_self);
91 void gdata_calendar_event_add_person (GDataCalendarEvent *self, GDataGDWho *who);
92 GList *gdata_calendar_event_get_people (GDataCalendarEvent *self) G_GNUC_PURE;
93 void gdata_calendar_event_add_place (GDataCalendarEvent *self, GDataGDWhere *where);
94 GList *gdata_calendar_event_get_places (GDataCalendarEvent *self) G_GNUC_PURE;
95 void gdata_calendar_event_add_time (GDataCalendarEvent *self, GDataGDWhen *when);
96 GList *gdata_calendar_event_get_times (GDataCalendarEvent *self) G_GNUC_PURE;
97 gboolean gdata_calendar_event_get_primary_time (GDataCalendarEvent *self, gint64 *start_time, gint64 *end_time, GDataGDWhen **when);
98 const gchar *gdata_calendar_event_get_recurrence (GDataCalendarEvent *self) G_GNUC_PURE;
99 void gdata_calendar_event_set_recurrence (GDataCalendarEvent *self, const gchar *recurrence);
100 void gdata_calendar_event_get_original_event_details (GDataCalendarEvent *self, gchar **event_id, gchar **event_uri);
101 gboolean gdata_calendar_event_is_exception (GDataCalendarEvent *self) G_GNUC_PURE;
102 
103 G_END_DECLS
104 
105 #endif /* !GDATA_CALENDAR_EVENT_H */
106