GDataContactsService

GDataContactsService — GData Contacts service object

Stability Level

Unstable, unless otherwise indicated

Synopsis


#include <gdata/services/contacts/gdata-contacts-service.h>

                    GDataContactsService;
                    GDataContactsServiceClass;
GDataContactsService * gdata_contacts_service_new       (const gchar *client_id);
GDataFeed *         gdata_contacts_service_query_contacts
                                                        (GDataContactsService *self,
                                                         GDataQuery *query,
                                                         GCancellable *cancellable,
                                                         GDataQueryProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GError **error);
void                gdata_contacts_service_query_contacts_async
                                                        (GDataContactsService *self,
                                                         GDataQuery *query,
                                                         GCancellable *cancellable,
                                                         GDataQueryProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GDataContactsContact * gdata_contacts_service_insert_contact
                                                        (GDataContactsService *self,
                                                         GDataContactsContact *contact,
                                                         GCancellable *cancellable,
                                                         GError **error);
GDataContactsContact * gdata_contacts_service_update_contact
                                                        (GDataContactsService *self,
                                                         GDataContactsContact *contact,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GDataService
         +----GDataContactsService

Description

GDataContactsService is a subclass of GDataService for communicating with the GData API of Google Contacts. It supports querying for, inserting, editing and deleting contacts from a Google address book.

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

Details

GDataContactsService

typedef struct _GDataContactsService GDataContactsService;

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


GDataContactsServiceClass

typedef struct {
} GDataContactsServiceClass;

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


gdata_contacts_service_new ()

GDataContactsService * gdata_contacts_service_new       (const gchar *client_id);

Creates a new GDataContactsService. The client_id must be unique for your application, and as registered with Google.

client_id :

your application's client ID

Returns :

a new GDataContactsService, or NULL

Since 0.2.0


gdata_contacts_service_query_contacts ()

GDataFeed *         gdata_contacts_service_query_contacts
                                                        (GDataContactsService *self,
                                                         GDataQuery *query,
                                                         GCancellable *cancellable,
                                                         GDataQueryProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GError **error);

Queries the service to return a list of contacts matching the given query.

For more details, see gdata_service_query().

self :

a GDataContactsService

query :

a GDataQuery with the query parameters, or NULL

cancellable :

optional GCancellable object, or NULL

progress_callback :

a GDataQueryProgressCallback to call when an entry is loaded, or NULL

progress_user_data :

data to pass to the progress_callback function

error :

a GError, or NULL

Returns :

a GDataFeed of query results; unref with g_object_unref()

Since 0.2.0


gdata_contacts_service_query_contacts_async ()

void                gdata_contacts_service_query_contacts_async
                                                        (GDataContactsService *self,
                                                         GDataQuery *query,
                                                         GCancellable *cancellable,
                                                         GDataQueryProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Queries the service to return a list of contacts matching the given query. self and query are all reffed when this function is called, so can safely be unreffed after this function returns.

For more details, see gdata_contacts_service_query_contacts(), which is the synchronous version of this function, and gdata_service_query_async(), which is the base asynchronous query function.

self :

a GDataContactsService

query :

a GDataQuery with the query parameters, or NULL

cancellable :

optional GCancellable object, or NULL

progress_callback :

a GDataQueryProgressCallback to call when an entry is loaded, or NULL

progress_user_data :

data to pass to the progress_callback function

callback :

a GAsyncReadyCallback to call when authentication is finished

user_data :

data to pass to the callback function

Since 0.2.0


gdata_contacts_service_insert_contact ()

GDataContactsContact * gdata_contacts_service_insert_contact
                                                        (GDataContactsService *self,
                                                         GDataContactsContact *contact,
                                                         GCancellable *cancellable,
                                                         GError **error);

Inserts contact by uploading it to the online contacts service.

For more details, see gdata_service_insert_entry().

self :

a GDataContactsService

contact :

the GDataContactsContact to insert

cancellable :

optional GCancellable object, or NULL

error :

a GError, or NULL

Returns :

an updated GDataContactsContact, or NULL

Since 0.2.0


gdata_contacts_service_update_contact ()

GDataContactsContact * gdata_contacts_service_update_contact
                                                        (GDataContactsService *self,
                                                         GDataContactsContact *contact,
                                                         GCancellable *cancellable,
                                                         GError **error);

Updates contact on the online contacts service.

For more details, see gdata_service_update_entry().

self :

a GDataContactsService

contact :

the GDataContactsContact to update

cancellable :

optional GCancellable object, or NULL

error :

a GError, or NULL

Returns :

an updated GDataContactsContact, or NULL

Since 0.4.0