/** * gdata_contacts_service_insert_group_async: * @self: a #GDataContactsService * @group: the #GDataContactsGroup to insert * @cancellable: (allow-none): optional #GCancellable object, or %NULL * @callback: a #GAsyncReadyCallback to call when insertion is finished * @user_data: (closure): data to pass to the @callback function * * Inserts a new contact group described by @group. The user must be authenticated to use this function. @self and @group 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 #GDataContactsGroup representing the inserted group and to check for possible * errors. * * For more details, see gdata_contacts_service_insert_group(), which is the synchronous version of this function, and * gdata_service_insert_entry_async(), which is the base asynchronous insertion function. * * Since: 0.7.0 **/ void gdata_contacts_service_insert_group_async (GDataContactsService *self, GDataContactsGroup *group, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { gchar *request_uri; g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (self)); g_return_if_fail (GDATA_IS_CONTACTS_GROUP (group)); g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL); gdata_service_insert_entry_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_ENTRY (group), cancellable, callback, user_data); g_free (request_uri); }
/** * gdata_tasks_service_insert_tasklist_async: * @self: a #GDataTasksService * @tasklist: #GDataTasksTasklist to insert * @cancellable: (allow-none): optional #GCancellable object, or %NULL * @callback: a #GAsyncReadyCallback to call when insertion is finished * @user_data: (closure): data to pass to the @callback function * * 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. * * Since: 0.15.0 */ void gdata_tasks_service_insert_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { gchar *request_uri; g_return_if_fail (GDATA_IS_TASKS_SERVICE (self)); g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist)); g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/users/@me/lists", NULL); gdata_service_insert_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, GDATA_ENTRY (tasklist), cancellable, callback, user_data); g_free (request_uri); }
/** * gdata_calendar_service_insert_event_async: * @self: a #GDataCalendarService * @event: the #GDataCalendarEvent to insert * @cancellable: (allow-none): optional #GCancellable object, or %NULL * @callback: a #GAsyncReadyCallback to call when insertion is finished * @user_data: (closure): data to pass to the @callback function * * Inserts @event by uploading it to the online calendar service. @self and @event 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 #GDataCalendarEvent representing the inserted event and to check for possible * errors. * * For more details, see gdata_calendar_service_insert_event(), which is the synchronous version of this function, and * gdata_service_insert_entry_async(), which is the base asynchronous insertion function. * * Since: 0.8.0 * Deprecated: 0.17.2: Use * gdata_calendar_service_insert_calendar_event_async() instead to be able to * specify the calendar to add the event to; otherwise the default calendar * will be used. */ void gdata_calendar_service_insert_event_async (GDataCalendarService *self, GDataCalendarEvent *event, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { gchar *uri; g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self)); g_return_if_fail (GDATA_IS_CALENDAR_EVENT (event)); g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); uri = build_events_uri (NULL); gdata_service_insert_entry_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), uri, GDATA_ENTRY (event), cancellable, callback, user_data); g_free (uri); }