![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#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
);
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.
typedef struct _GDataContactsService GDataContactsService;
All the fields in the GDataContactsService structure are private and should never be accessed directly.
Since 0.2.0
typedef struct { } GDataContactsServiceClass;
All the fields in the GDataContactsServiceClass structure are private and should never be accessed directly.
Since 0.2.0
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.
|
your application's client ID |
Returns : |
a new GDataContactsService, or NULL
|
Since 0.2.0
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()
.
|
a GDataContactsService |
|
a GDataQuery with the query parameters, or NULL
|
|
optional GCancellable object, or NULL
|
|
a GDataQueryProgressCallback to call when an entry is loaded, or NULL
|
|
data to pass to the progress_callback function
|
|
a GError, or NULL
|
Returns : |
a GDataFeed of query results; unref with g_object_unref()
|
Since 0.2.0
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.
|
a GDataContactsService |
|
a GDataQuery with the query parameters, or NULL
|
|
optional GCancellable object, or NULL
|
|
a GDataQueryProgressCallback to call when an entry is loaded, or NULL
|
|
data to pass to the progress_callback function
|
|
a GAsyncReadyCallback to call when authentication is finished |
|
data to pass to the callback function
|
Since 0.2.0
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()
.
|
a GDataContactsService |
|
the GDataContactsContact to insert |
|
optional GCancellable object, or NULL
|
|
a GError, or NULL
|
Returns : |
an updated GDataContactsContact, or NULL
|
Since 0.2.0
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()
.
|
a GDataContactsService |
|
the GDataContactsContact to update |
|
optional GCancellable object, or NULL
|
|
a GError, or NULL
|
Returns : |
an updated GDataContactsContact, or NULL
|
Since 0.4.0