1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2009, 2015 <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_SERVICE_H
21 #define GDATA_CALENDAR_SERVICE_H
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gdata/gdata-service.h>
27 #include <gdata/gdata-query.h>
28 #include <gdata/services/calendar/gdata-calendar-calendar.h>
29 
30 G_BEGIN_DECLS
31 
32 #define GDATA_TYPE_CALENDAR_SERVICE		(gdata_calendar_service_get_type ())
33 #define GDATA_CALENDAR_SERVICE(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarService))
34 #define GDATA_CALENDAR_SERVICE_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarServiceClass))
35 #define GDATA_IS_CALENDAR_SERVICE(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_SERVICE))
36 #define GDATA_IS_CALENDAR_SERVICE_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_SERVICE))
37 #define GDATA_CALENDAR_SERVICE_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarServiceClass))
38 
39 typedef struct _GDataCalendarServicePrivate	GDataCalendarServicePrivate;
40 
41 /**
42  * GDataCalendarService:
43  *
44  * All the fields in the #GDataCalendarService structure are private and should never be accessed directly.
45  */
46 typedef struct {
47 	GDataService parent;
48 } GDataCalendarService;
49 
50 /**
51  * GDataCalendarServiceClass:
52  *
53  * All the fields in the #GDataCalendarServiceClass structure are private and should never be accessed directly.
54  */
55 typedef struct {
56 	/*< private >*/
57 	GDataServiceClass parent;
58 
59 	/*< private >*/
60 	/* Padding for future expansion */
61 	void (*_g_reserved0) (void);
62 	void (*_g_reserved1) (void);
63 	void (*_g_reserved2) (void);
64 	void (*_g_reserved3) (void);
65 	void (*_g_reserved4) (void);
66 	void (*_g_reserved5) (void);
67 } GDataCalendarServiceClass;
68 
69 GType gdata_calendar_service_get_type (void) G_GNUC_CONST;
70 
71 GDataCalendarService *gdata_calendar_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
72 
73 GDataAuthorizationDomain *gdata_calendar_service_get_primary_authorization_domain (void) G_GNUC_CONST;
74 
75 GDataFeed *gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
76                                                        GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
77                                                        GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
78 void gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
79                                                        GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
80                                                        GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
81 
82 GDataFeed *gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
83                                                        GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
84                                                        GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
85 void gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
86                                                        GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
87                                                        GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
88 
89 GDataFeed *gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
90                                                 GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
91                                                 GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
92 void gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
93                                                 GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
94                                                 GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
95 
96 #include <gdata/services/calendar/gdata-calendar-event.h>
97 
98 #ifndef LIBGDATA_DISABLE_DEPRECATED
99 GDataCalendarEvent *
100 gdata_calendar_service_insert_event (GDataCalendarService *self,
101                                      GDataCalendarEvent *event,
102                                      GCancellable *cancellable,
103                                      GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED_FOR(gdata_calendar_service_insert_calendar_event);
104 void
105 gdata_calendar_service_insert_event_async (GDataCalendarService *self,
106                                            GDataCalendarEvent *event,
107                                            GCancellable *cancellable,
108                                            GAsyncReadyCallback callback,
109                                            gpointer user_data)
110                                            G_GNUC_DEPRECATED_FOR (gdata_calendar_service_insert_calendar_event_async);
111 #endif /* !LIBGDATA_DISABLE_DEPRECATED */
112 
113 GDataCalendarEvent *
114 gdata_calendar_service_insert_calendar_event (GDataCalendarService *self,
115                                               GDataCalendarCalendar *calendar,
116                                               GDataCalendarEvent *event,
117                                               GCancellable *cancellable,
118                                               GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
119 void
120 gdata_calendar_service_insert_calendar_event_async (GDataCalendarService *self,
121                                                     GDataCalendarCalendar *calendar,
122                                                     GDataCalendarEvent *event,
123                                                     GCancellable *cancellable,
124                                                     GAsyncReadyCallback callback,
125                                                     gpointer user_data);
126 
127 G_END_DECLS
128 
129 #endif /* !GDATA_CALENDAR_SERVICE_H */
130