## GDataTasksService

GDataTasksService — GData Tasks service object

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataTasksService * | gdata_tasks_service_new ()
GDataAuthorizationDomain * | gdata_tasks_service_get_primary_authorization_domain ()
GDataFeed * | gdata_tasks_service_query_all_tasklists ()
void | gdata_tasks_service_query_all_tasklists_async ()
GDataFeed * | gdata_tasks_service_query_tasks ()
void | gdata_tasks_service_query_tasks_async ()
GDataTasksTask * | gdata_tasks_service_insert_task ()
void | gdata_tasks_service_insert_task_async ()
GDataTasksTasklist * | gdata_tasks_service_insert_tasklist ()
void | gdata_tasks_service_insert_tasklist_async ()
gboolean | gdata_tasks_service_delete_task ()
void | gdata_tasks_service_delete_task_async ()
gboolean | gdata_tasks_service_delete_tasklist ()
void | gdata_tasks_service_delete_tasklist_async ()
GDataTasksTask * | gdata_tasks_service_update_task ()
void | gdata_tasks_service_update_task_async ()
GDataTasksTasklist * | gdata_tasks_service_update_tasklist ()
void | gdata_tasks_service_update_tasklist_async ()

## Types and Values

| GDataTasksService
| GDataTasksServiceClass

## Object Hierarchy

        GObject
        ╰── GDataService
            ╰── GDataTasksService

## Includes

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

## Description

GDataTasksService is a subclass of GDataService for communicating with the API of Google Tasks. It supports querying for, inserting, editing and deleting tasks from tasklists, as well as operations on the tasklists themselves.

For more details of Google Tasks API, see the online documentation.

## Functions

### gdata_tasks_service_new ()

    GDataTasksService *
    gdata_tasks_service_new (GDataAuthorizer *authorizer);

Creates a new GDataTasksService using the given GDataAuthorizer. If `authorizer` is `NULL`, all requests are made as an unauthenticated user.

#### Parameters

authorizer | a GDataAuthorizer to authorize the service's requests, or `NULL`. | [allow-none]

#### Returns

a new GDataTasksService, or `NULL`; unref with `g_object_unref()`

Since: 0.15.0

### gdata_tasks_service_get_primary_authorization_domain ()

    GDataAuthorizationDomain *
    gdata_tasks_service_get_primary_authorization_domain
                                   (void);

The primary GDataAuthorizationDomain for interacting with Google Tasks. This will not normally need to be used, as it's used internally by the GDataTasksService methods. However, if using the plain GDataService methods to implement custom queries or requests which libgdata does not support natively, then this domain may be needed to authorize the requests.

The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.

#### Returns

the service's authorization domain.

[transfer none]

Since: 0.15.0

### gdata_tasks_service_query_all_tasklists ()

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

Queries the service to return a list of all tasklists from the authenticated account which match the given `query` . It will return all tasklists the user has read access to.

For more details, see `gdata_service_query()`.

#### Parameters

self | a GDataTasksService |
query | a GDataQuery with the query parameters, or `NULL`. | [allow-none]
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
progress_callback | a GDataQueryProgressCallback to call when an entry is loaded, or `NULL`. | [allow-none][scope call][closure progress_user_data]
progress_user_data | data to pass to the `progress_callback` function. | [closure]
error | a GError, or `NULL`. | [allow-none]

#### Returns

a GDataFeed of query results; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_query_all_tasklists_async ()

    void
    gdata_tasks_service_query_all_tasklists_async
                                   (GDataTasksService *self,
                                    GDataQuery *query,
                                    GCancellable *cancellable,
                                    GDataQueryProgressCallback progress_callback,
                                    gpointer progress_user_data,
                                    GDestroyNotify destroy_progress_user_data,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Queries the service to return a list of all tasklists from the authenticated account which match 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_tasks_service_query_all_tasklists()`, which is the synchronous version of this function, and `gdata_service_query_async()`, which is the base asynchronous query function.

#### Parameters

self | a GDataTasksService |
query | a GDataQuery with the query parameters, or `NULL`. | [allow-none]
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
progress_callback | a GDataQueryProgressCallback to call when an entry is loaded, or `NULL`. | [allow-none][closure progress_user_data]
progress_user_data | data to pass to the `progress_callback` function. | [closure]
destroy_progress_user_data | the function to call when `progress_callback` will not be called any more, or `NULL`. This function will be called with `progress_user_data` as a parameter and can be used to free any memory allocated for it. | [allow-none]
callback | a GAsyncReadyCallback to call when authentication is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_query_tasks ()

    GDataFeed *
    gdata_tasks_service_query_tasks (GDataTasksService *self,
                                     GDataTasksTasklist *tasklist,
                                     GDataQuery *query,
                                     GCancellable *cancellable,
                                     GDataQueryProgressCallback progress_callback,
                                     gpointer progress_user_data,
                                     GError **error);

Queries the service to return a list of tasks in the given `tasklist` , which match `query` .

For more details, see `gdata_service_query()`.

#### Parameters

self | a GDataTasksService |
tasklist | a GDataTasksTasklist |
query | a GDataQuery with the query parameters, or `NULL`. | [allow-none]
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
progress_callback | a GDataQueryProgressCallback to call when an entry is loaded, or `NULL`. | [allow-none][scope call][closure progress_user_data]
progress_user_data | data to pass to the `progress_callback` function. | [closure]
error | a GError, or `NULL`. | [allow-none]

#### Returns

a GDataFeed of query results; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_query_tasks_async ()

    void
    gdata_tasks_service_query_tasks_async (GDataTasksService *self,
                                           GDataTasksTasklist *tasklist,
                                           GDataQuery *query,
                                           GCancellable *cancellable,
                                           GDataQueryProgressCallback progress_callback,
                                           gpointer progress_user_data,
                                           GDestroyNotify destroy_progress_user_data,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

Queries the service to return a list of tasks in the given `tasklist` , which match `query` . `self` , `tasklist` and `query` are all reffed when this function is called, so can safely be unreffed after this function returns.

Get the results of the query using `gdata_service_query_finish()` in the `callback` .

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

#### Parameters

self | a GDataTasksService |
tasklist | a GDataTasksTasklist |
query | a GDataQuery with the query parameters, or `NULL`. | [allow-none]
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
progress_callback | a GDataQueryProgressCallback to call when an entry is loaded, or `NULL`. | [allow-none][closure progress_user_data]
progress_user_data | data to pass to the `progress_callback` function. | [closure]
destroy_progress_user_data | the function to call when `progress_callback` will not be called any more, or `NULL`. This function will be called with `progress_user_data` as a parameter and can be used to free any memory allocated for it. | [allow-none]
callback | a GAsyncReadyCallback to call when the query is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_insert_task ()

    GDataTasksTask *
    gdata_tasks_service_insert_task (GDataTasksService *self,
                                     GDataTasksTask *task,
                                     GDataTasksTasklist *tasklist,
                                     GCancellable *cancellable,
                                     GError **error);

Inserts `task` by uploading it to the online tasks service into tasklist `tasklist` . It is safe to unref `tasklist` after function returns.

For more details, see `gdata_service_insert_entry()`.

#### Parameters

self | a GDataTasksService |
task | the GDataTasksTask to insert |
tasklist | GDataTasksTasklist to insert into |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

an updated GDataTasksTask, or `NULL`; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_insert_task_async ()

    void
    gdata_tasks_service_insert_task_async (GDataTasksService *self,
                                           GDataTasksTask *task,
                                           GDataTasksTasklist *tasklist,
                                           GCancellable *cancellable,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

Inserts `task` by uploading it to the online tasks service into tasklist `tasklist` . `self` , `task` and `tasklist` are all reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_insert_entry_finish()` to obtain a GDataTasksTask representing the inserted task and to check for possible errors.

For more details, see `gdata_tasks_service_insert_task()`, which is the synchronous version of this function, and `gdata_service_insert_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
task | the GDataTasksTask to insert |
tasklist | GDataTasksTasklist to insert into |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_insert_tasklist ()

    GDataTasksTasklist *
    gdata_tasks_service_insert_tasklist (GDataTasksService *self,
                                         GDataTasksTasklist *tasklist,
                                         GCancellable *cancellable,
                                         GError **error);

Inserts `tasklist` by uploading it to the online tasks service.

For more details, see `gdata_service_insert_entry()`.

#### Parameters

self | a GDataTasksService |
tasklist | GDataTasksTasklist to insert |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

an updated GDataTasksTasklist, or `NULL`; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_insert_tasklist_async ()

    void
    gdata_tasks_service_insert_tasklist_async
                                   (GDataTasksService *self,
                                    GDataTasksTasklist *tasklist,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Inserts `tasklist` by uploading it to the online tasks service. `self` and `tasklist` are both reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_insert_entry_finish()` to obtain a GDataTasksTasklist representing the inserted tasklist and to check for possible errors.

For more details, see `gdata_tasks_service_insert_tasklist()`, which is the synchronous version of this function, and `gdata_service_insert_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
tasklist | GDataTasksTasklist to insert |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_delete_task ()

    gboolean
    gdata_tasks_service_delete_task (GDataTasksService *self,
                                     GDataTasksTask *task,
                                     GCancellable *cancellable,
                                     GError **error);

Delete `task` from online tasks service.

For more details, see `gdata_service_delete_entry()`.

#### Parameters

self | a GDataTasksService |
task | the GDataTasksTask to delete |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

`TRUE` on success, `FALSE` otherwise

Since: 0.15.0

### gdata_tasks_service_delete_task_async ()

    void
    gdata_tasks_service_delete_task_async (GDataTasksService *self,
                                           GDataTasksTask *task,
                                           GCancellable *cancellable,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

Deletes `task` from online tasks service. `self` and `task` are both reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_delete_entry_finish()` to finish deleting task and to check for possible errors.

For more details, see `gdata_tasks_service_delete_task()`, which is the synchronous version of this function, and `gdata_service_delete_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
task | GDataTasksTask to delete |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_delete_tasklist ()

    gboolean
    gdata_tasks_service_delete_tasklist (GDataTasksService *self,
                                         GDataTasksTasklist *tasklist,
                                         GCancellable *cancellable,
                                         GError **error);

Delete `tasklist` from online tasks service.

For more details, see `gdata_service_delete_entry()`.

#### Parameters

self | a GDataTasksService |
tasklist | the GDataTasksTasklist to delete |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

`TRUE` on success, `FALSE` otherwise

Since: 0.15.0

### gdata_tasks_service_delete_tasklist_async ()

    void
    gdata_tasks_service_delete_tasklist_async
                                   (GDataTasksService *self,
                                    GDataTasksTasklist *tasklist,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Deletes `tasklist` from online tasks service. `self` and `tasklist` are both reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_delete_entry_finish()` to finish deleting tasklist and to check for possible errors.

For more details, see `gdata_tasks_service_delete_tasklist()`, which is the synchronous version of this function, and `gdata_service_delete_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
tasklist | GDataTasksTasklist to delete |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_update_task ()

    GDataTasksTask *
    gdata_tasks_service_update_task (GDataTasksService *self,
                                     GDataTasksTask *task,
                                     GCancellable *cancellable,
                                     GError **error);

Update `task` in online tasks service.

For more details, see `gdata_service_update_entry()`.

#### Parameters

self | a GDataTasksService |
task | the GDataTasksTask to update |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

an updated GDataTasksTask, or `NULL`; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_update_task_async ()

    void
    gdata_tasks_service_update_task_async (GDataTasksService *self,
                                           GDataTasksTask *task,
                                           GCancellable *cancellable,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

Updates `task` to online tasks service. `self` and `task` are both reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_update_entry_finish()` to obtain a GDataTasksTask representing the updated task and to check for possible errors.

For more details, see `gdata_tasks_service_update_task()`, which is the synchronous version of this function, and `gdata_service_update_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
task | GDataTasksTask to update |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

### gdata_tasks_service_update_tasklist ()

    GDataTasksTasklist *
    gdata_tasks_service_update_tasklist (GDataTasksService *self,
                                         GDataTasksTasklist *tasklist,
                                         GCancellable *cancellable,
                                         GError **error);

Update `tasklist` in online tasks service.

For more details, see `gdata_service_update_entry()`.

#### Parameters

self | a GDataTasksService |
tasklist | the GDataTasksTasklist to update |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
error | a GError, or `NULL`. | [allow-none]

#### Returns

an updated GDataTasksTasklist, or `NULL`; unref with `g_object_unref()`.

[transfer full]

Since: 0.15.0

### gdata_tasks_service_update_tasklist_async ()

    void
    gdata_tasks_service_update_tasklist_async
                                   (GDataTasksService *self,
                                    GDataTasksTasklist *tasklist,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Updates `tasklist` from online tasks service. `self` and `tasklist` are both reffed when this function is called, so can safely be unreffed after this function returns.

`callback` should call `gdata_service_update_entry_finish()` to obtain a GDataTasksTasklist representing the updated task and to check for possible errors.

For more details, see `gdata_tasks_service_update_tasklist()`, which is the synchronous version of this function, and `gdata_service_update_entry_async()`, which is the base asynchronous insertion function.

#### Parameters

self | a GDataTasksService |
tasklist | GDataTasksTasklist to update |
cancellable | optional GCancellable object, or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when insertion is finished |
user_data | data to pass to the `callback` function. | [closure]

Since: 0.15.0

## Types and Values

### GDataTasksService

    typedef struct _GDataTasksService GDataTasksService;

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

Since: 0.15.0

### GDataTasksServiceClass

    typedef struct {
    } GDataTasksServiceClass;

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

Since: 0.15.0