1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2009–2010 <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_CONTACTS_SERVICE_H
21 #define GDATA_CONTACTS_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 
29 G_BEGIN_DECLS
30 
31 #define GDATA_TYPE_CONTACTS_SERVICE		(gdata_contacts_service_get_type ())
32 #define GDATA_CONTACTS_SERVICE(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsService))
33 #define GDATA_CONTACTS_SERVICE_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsServiceClass))
34 #define GDATA_IS_CONTACTS_SERVICE(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CONTACTS_SERVICE))
35 #define GDATA_IS_CONTACTS_SERVICE_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CONTACTS_SERVICE))
36 #define GDATA_CONTACTS_SERVICE_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsServiceClass))
37 
38 typedef struct _GDataContactsServicePrivate	GDataContactsServicePrivate;
39 
40 /**
41  * GDataContactsService:
42  *
43  * All the fields in the #GDataContactsService structure are private and should never be accessed directly.
44  *
45  * Since: 0.2.0
46  */
47 typedef struct {
48 	GDataService parent;
49 } GDataContactsService;
50 
51 /**
52  * GDataContactsServiceClass:
53  *
54  * All the fields in the #GDataContactsServiceClass structure are private and should never be accessed directly.
55  *
56  * Since: 0.2.0
57  */
58 typedef struct {
59 	/*< private >*/
60 	GDataServiceClass parent;
61 
62 	/*< private >*/
63 	/* Padding for future expansion */
64 	void (*_g_reserved0) (void);
65 	void (*_g_reserved1) (void);
66 	void (*_g_reserved2) (void);
67 	void (*_g_reserved3) (void);
68 	void (*_g_reserved4) (void);
69 	void (*_g_reserved5) (void);
70 } GDataContactsServiceClass;
71 
72 GType gdata_contacts_service_get_type (void) G_GNUC_CONST;
73 
74 GDataContactsService *gdata_contacts_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
75 
76 GDataAuthorizationDomain *gdata_contacts_service_get_primary_authorization_domain (void) G_GNUC_CONST;
77 
78 GDataFeed *gdata_contacts_service_query_contacts (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
79                                                   GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
80                                                   GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
81 void gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
82                                                   GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
83                                                   GDestroyNotify destroy_progress_user_data,
84                                                   GAsyncReadyCallback callback, gpointer user_data);
85 
86 #include <gdata/services/contacts/gdata-contacts-contact.h>
87 
88 GDataContactsContact *gdata_contacts_service_insert_contact (GDataContactsService *self, GDataContactsContact *contact,
89                                                              GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
90 void gdata_contacts_service_insert_contact_async (GDataContactsService *self, GDataContactsContact *contact, GCancellable *cancellable,
91                                                   GAsyncReadyCallback callback, gpointer user_data);
92 
93 #include <gdata/services/contacts/gdata-contacts-group.h>
94 
95 GDataFeed *gdata_contacts_service_query_groups (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
96                                                 GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
97                                                 GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
98 void gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
99                                                 GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
100                                                 GDestroyNotify destroy_progress_user_data,
101                                                 GAsyncReadyCallback callback, gpointer user_data);
102 
103 GDataContactsGroup *gdata_contacts_service_insert_group (GDataContactsService *self, GDataContactsGroup *group,
104                                                          GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
105 void gdata_contacts_service_insert_group_async (GDataContactsService *self, GDataContactsGroup *group, GCancellable *cancellable,
106                                                 GAsyncReadyCallback callback, gpointer user_data);
107 
108 G_END_DECLS
109 
110 #endif /* !GDATA_CONTACTS_SERVICE_H */
111