summaryrefslogtreecommitdiff
path: root/gdata/services
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2011-06-18 18:31:28 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2011-06-18 18:31:40 +0100
commitfafa68352959512861bcbc8c9d3f0295a70e767c (patch)
tree31bf1d90f4c825f2a280201f8df7d6236180f405 /gdata/services
parent75ededc68bdc77d522156c3fbcb2b2e4cd93e102 (diff)
downloadlibgdata-fafa68352959512861bcbc8c9d3f0295a70e767c.tar.gz
introspection: Add GDestroyNotify to progress callbacks
All query_async functions that take a progress callback should have a GDestroyNotify parameter for freeing the progress callback data, since there is no suitable (scope) annotation. This breaks API by changing the signatures for: • gdata_access_handler_get_rules_async() • gdata_service_query_async() • gdata_calendar_service_query_all_calendars_async() • gdata_calendar_service_query_own_calendars_async() • gdata_calendar_service_query_events_async() • gdata_contacts_service_query_contacts_async() • gdata_contacts_service_query_groups_async() • gdata_documents_service_query_documents_async() • gdata_picasaweb_service_query_all_albums_async() • gdata_picasaweb_service_query_files_async() • gdata_youtube_service_query_standard_feed_async() • gdata_youtube_service_query_videos_async() • gdata_youtube_service_query_related_async() Closes: bgo#649728
Diffstat (limited to 'gdata/services')
-rw-r--r--gdata/services/calendar/gdata-calendar-service.c27
-rw-r--r--gdata/services/calendar/gdata-calendar-service.h6
-rw-r--r--gdata/services/contacts/gdata-contacts-service.c20
-rw-r--r--gdata/services/contacts/gdata-contacts-service.h2
-rw-r--r--gdata/services/documents/gdata-documents-service.c10
-rw-r--r--gdata/services/documents/gdata-documents-service.h1
-rw-r--r--gdata/services/picasaweb/gdata-picasaweb-service.c23
-rw-r--r--gdata/services/picasaweb/gdata-picasaweb-service.h2
-rw-r--r--gdata/services/youtube/gdata-youtube-service.c30
-rw-r--r--gdata/services/youtube/gdata-youtube-service.h3
10 files changed, 90 insertions, 34 deletions
diff --git a/gdata/services/calendar/gdata-calendar-service.c b/gdata/services/calendar/gdata-calendar-service.c
index e90b80f4..240416ad 100644
--- a/gdata/services/calendar/gdata-calendar-service.c
+++ b/gdata/services/calendar/gdata-calendar-service.c
@@ -325,12 +325,14 @@ gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataQue
}
/**
- * gdata_calendar_service_query_all_calendars_async: (skip)
+ * gdata_calendar_service_query_all_calendars_async:
* @self: a #GDataCalendarService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -340,10 +342,13 @@ gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataQue
*
* For more details, see gdata_calendar_service_query_all_calendars(), which is the synchronous version of
* this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
**/
void
gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
gchar *request_uri;
@@ -364,7 +369,7 @@ gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GD
request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/calendar/feeds/default/allcalendars/full", NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
- cancellable, progress_callback, progress_user_data, callback, user_data);
+ cancellable, progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
g_free (request_uri);
}
@@ -414,12 +419,14 @@ gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQue
}
/**
- * gdata_calendar_service_query_own_calendars_async: (skip)
+ * gdata_calendar_service_query_own_calendars_async:
* @self: a #GDataCalendarService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -429,10 +436,13 @@ gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQue
*
* For more details, see gdata_calendar_service_query_own_calendars(), which is the synchronous version of
* this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
**/
void
gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
gchar *request_uri;
@@ -453,7 +463,7 @@ gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GD
request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/calendar/feeds/default/owncalendars/full", NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
- cancellable, progress_callback, progress_user_data, callback, user_data);
+ cancellable, progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
g_free (request_uri);
}
@@ -508,13 +518,15 @@ gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCa
}
/**
- * gdata_calendar_service_query_events_async: (skip)
+ * gdata_calendar_service_query_events_async:
* @self: a #GDataCalendarService
* @calendar: a #GDataCalendarCalendar
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when the query is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -526,11 +538,12 @@ gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCa
* For more details, see gdata_calendar_service_query_events(), which is the synchronous version of this function, and gdata_service_query_async(),
* which is the base asynchronous query function.
*
- * Since: 0.8.0
+ * Since: 0.9.1
**/
void
gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
const gchar *uri;
@@ -561,7 +574,7 @@ gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCale
/* Execute the query */
gdata_service_query_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), uri, query, GDATA_TYPE_CALENDAR_EVENT, cancellable,
- progress_callback, progress_user_data, callback, user_data);
+ progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
}
/**
diff --git a/gdata/services/calendar/gdata-calendar-service.h b/gdata/services/calendar/gdata-calendar-service.h
index 4c3ce4f5..473574ba 100644
--- a/gdata/services/calendar/gdata-calendar-service.h
+++ b/gdata/services/calendar/gdata-calendar-service.h
@@ -68,21 +68,21 @@ GDataFeed *gdata_calendar_service_query_all_calendars (GDataCalendarService *sel
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
- GAsyncReadyCallback callback, gpointer user_data);
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
GDataFeed *gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
- GAsyncReadyCallback callback, gpointer user_data);
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
GDataFeed *gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
- GAsyncReadyCallback callback, gpointer user_data);
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
#include <gdata/services/calendar/gdata-calendar-event.h>
diff --git a/gdata/services/contacts/gdata-contacts-service.c b/gdata/services/contacts/gdata-contacts-service.c
index fa2cdd06..89bc7125 100644
--- a/gdata/services/contacts/gdata-contacts-service.c
+++ b/gdata/services/contacts/gdata-contacts-service.c
@@ -268,12 +268,14 @@ gdata_contacts_service_query_contacts (GDataContactsService *self, GDataQuery *q
}
/**
- * gdata_contacts_service_query_contacts_async: (skip)
+ * gdata_contacts_service_query_contacts_async:
* @self: a #GDataContactsService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when the query is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -283,11 +285,12 @@ gdata_contacts_service_query_contacts (GDataContactsService *self, GDataQuery *q
* 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.
*
- * Since: 0.2.0
+ * Since: 0.9.1
**/
void
gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
gchar *request_uri;
@@ -308,7 +311,8 @@ gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQu
request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/contacts/default/full", NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
- GDATA_TYPE_CONTACTS_CONTACT, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_CONTACTS_CONTACT, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
g_free (request_uri);
}
@@ -427,12 +431,14 @@ gdata_contacts_service_query_groups (GDataContactsService *self, GDataQuery *que
}
/**
- * gdata_contacts_service_query_groups_async: (skip)
+ * gdata_contacts_service_query_groups_async:
* @self: a #GDataContactsService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when the query is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -442,11 +448,12 @@ gdata_contacts_service_query_groups (GDataContactsService *self, GDataQuery *que
* For more details, see gdata_contacts_service_query_groups(), which is the synchronous version of this function, and gdata_service_query_async(),
* which is the base asynchronous query function.
*
- * Since: 0.7.0
+ * Since: 0.9.1
**/
void
gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
gchar *request_uri;
@@ -467,7 +474,8 @@ gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuer
request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
- GDATA_TYPE_CONTACTS_GROUP, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_CONTACTS_GROUP, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
g_free (request_uri);
}
diff --git a/gdata/services/contacts/gdata-contacts-service.h b/gdata/services/contacts/gdata-contacts-service.h
index 36abbd35..23a4459c 100644
--- a/gdata/services/contacts/gdata-contacts-service.h
+++ b/gdata/services/contacts/gdata-contacts-service.h
@@ -71,6 +71,7 @@ GDataFeed *gdata_contacts_service_query_contacts (GDataContactsService *self, GD
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
#include <gdata/services/contacts/gdata-contacts-contact.h>
@@ -87,6 +88,7 @@ GDataFeed *gdata_contacts_service_query_groups (GDataContactsService *self, GDat
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
GDataContactsGroup *gdata_contacts_service_insert_group (GDataContactsService *self, GDataContactsGroup *group,
diff --git a/gdata/services/documents/gdata-documents-service.c b/gdata/services/documents/gdata-documents-service.c
index c0b407ed..5c002589 100644
--- a/gdata/services/documents/gdata-documents-service.c
+++ b/gdata/services/documents/gdata-documents-service.c
@@ -372,12 +372,14 @@ gdata_documents_service_query_documents (GDataDocumentsService *self, GDataDocum
}
/**
- * gdata_documents_service_query_documents_async: (skip)
+ * gdata_documents_service_query_documents_async:
* @self: a #GDataDocumentsService
* @query: (allow-none): a #GDataDocumentsQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -387,11 +389,12 @@ gdata_documents_service_query_documents (GDataDocumentsService *self, GDataDocum
* For more details, see gdata_documents_service_query_documents(), which is the synchronous version of this function,
* and gdata_service_query_async(), which is the base asynchronous query function.
*
- * Since: 0.4.0
+ * Since: 0.9.1
**/
void
gdata_documents_service_query_documents_async (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
gchar *request_uri;
@@ -412,7 +415,8 @@ gdata_documents_service_query_documents_async (GDataDocumentsService *self, GDat
request_uri = g_strconcat (_gdata_service_get_scheme (), "://docs.google.com/feeds/documents/private/full", NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_documents_authorization_domain (), request_uri, GDATA_QUERY (query),
- GDATA_TYPE_DOCUMENTS_ENTRY, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_DOCUMENTS_ENTRY, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
g_free (request_uri);
}
diff --git a/gdata/services/documents/gdata-documents-service.h b/gdata/services/documents/gdata-documents-service.h
index 6c20f0b9..0a3a809b 100644
--- a/gdata/services/documents/gdata-documents-service.h
+++ b/gdata/services/documents/gdata-documents-service.h
@@ -90,6 +90,7 @@ GDataDocumentsFeed *gdata_documents_service_query_documents (GDataDocumentsServi
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_documents_service_query_documents_async (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
#include <gdata/services/documents/gdata-documents-document.h>
diff --git a/gdata/services/picasaweb/gdata-picasaweb-service.c b/gdata/services/picasaweb/gdata-picasaweb-service.c
index 9276148d..a5907ff0 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-service.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-service.c
@@ -315,13 +315,15 @@ gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuer
}
/**
- * gdata_picasaweb_service_query_all_albums_async: (skip)
+ * gdata_picasaweb_service_query_all_albums_async:
* @self: a #GDataPicasaWebService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @username: (allow-none): the username of the user whose albums you wish to retrieve, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -332,12 +334,12 @@ gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuer
* For more details, see gdata_picasaweb_service_query_all_albums(), which is the synchronous version of
* this function, and gdata_service_query_async(), which is the base asynchronous query function.
*
- * Since: 0.4.0
+ * Since: 0.9.1
**/
void
gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
- GAsyncReadyCallback callback, gpointer user_data)
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
{
gchar *uri;
@@ -364,7 +366,7 @@ gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDa
/* Schedule the async query */
gdata_service_query_async (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), uri, query, GDATA_TYPE_PICASAWEB_ALBUM, cancellable,
- progress_callback, progress_user_data, callback, user_data);
+ progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
g_free (uri);
}
@@ -428,13 +430,15 @@ gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWeb
}
/**
- * gdata_picasaweb_service_query_files_async: (skip)
+ * gdata_picasaweb_service_query_files_async:
* @self: a #GDataPicasaWebService
* @album: (allow-none): a #GDataPicasaWebAlbum from which to retrieve the files, or %NULL
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when the query is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -445,12 +449,12 @@ gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWeb
* For more details, see gdata_picasaweb_service_query_files(), which is the synchronous version of this function, and gdata_service_query_async(),
* which is the base asynchronous query function.
*
- * Since: 0.8.0
+ * Since: 0.9.1
**/
void
gdata_picasaweb_service_query_files_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable,
- GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback,
- gpointer user_data)
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
{
const gchar *request_uri;
GError *child_error = NULL;
@@ -469,7 +473,8 @@ gdata_picasaweb_service_query_files_async (GDataPicasaWebService *self, GDataPic
}
gdata_service_query_async (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), request_uri, GDATA_QUERY (query),
- GDATA_TYPE_PICASAWEB_FILE, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_PICASAWEB_FILE, cancellable, progress_callback, progress_user_data, destroy_progress_user_data,
+ callback, user_data);
}
/**
diff --git a/gdata/services/picasaweb/gdata-picasaweb-service.h b/gdata/services/picasaweb/gdata-picasaweb-service.h
index 72e1545e..b5eddece 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-service.h
+++ b/gdata/services/picasaweb/gdata-picasaweb-service.h
@@ -77,6 +77,7 @@ GDataFeed *gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
GDataFeed *gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query,
@@ -84,6 +85,7 @@ GDataFeed *gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDa
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_picasaweb_service_query_files_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
#include <gdata/services/picasaweb/gdata-picasaweb-file.h>
diff --git a/gdata/services/youtube/gdata-youtube-service.c b/gdata/services/youtube/gdata-youtube-service.c
index db8df088..57bbdd35 100644
--- a/gdata/services/youtube/gdata-youtube-service.c
+++ b/gdata/services/youtube/gdata-youtube-service.c
@@ -578,13 +578,15 @@ gdata_youtube_service_query_standard_feed (GDataYouTubeService *self, GDataYouTu
}
/**
- * gdata_youtube_service_query_standard_feed_async: (skip)
+ * gdata_youtube_service_query_standard_feed_async:
* @self: a #GDataService
* @feed_type: the feed type to query, from #GDataYouTubeStandardFeedType
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -595,10 +597,13 @@ gdata_youtube_service_query_standard_feed (GDataYouTubeService *self, GDataYouTu
*
* When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
* to get the results of the operation.
+ *
+ * Since: 0.9.1
**/
void
gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
@@ -607,7 +612,8 @@ gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDat
g_return_if_fail (callback != NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_youtube_authorization_domain (), standard_feed_type_to_feed_uri (feed_type), query,
- GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data, destroy_progress_user_data,
+ callback, user_data);
}
/**
@@ -641,12 +647,14 @@ gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query
}
/**
- * gdata_youtube_service_query_videos_async: (skip)
+ * gdata_youtube_service_query_videos_async:
* @self: a #GDataService
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -657,10 +665,13 @@ gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query
*
* When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
* to get the results of the operation.
+ *
+ * Since: 0.9.1
**/
void
gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
@@ -669,7 +680,8 @@ gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery
g_return_if_fail (callback != NULL);
gdata_service_query_async (GDATA_SERVICE (self), get_youtube_authorization_domain (), "https://gdata.youtube.com/feeds/api/videos", query,
- GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data, destroy_progress_user_data,
+ callback, user_data);
}
/**
@@ -723,13 +735,15 @@ gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVide
}
/**
- * gdata_youtube_service_query_related_async: (skip)
+ * gdata_youtube_service_query_related_async:
* @self: a #GDataService
* @video: a #GDataYouTubeVideo for which to find related videos
* @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
* @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): 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.
* @callback: a #GAsyncReadyCallback to call when authentication is finished
* @user_data: (closure): data to pass to the @callback function
*
@@ -740,10 +754,13 @@ gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVide
*
* When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
* to get the results of the operation.
+ *
+ * Since: 0.9.1
**/
void
gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data)
{
GDataLink *related_link;
@@ -767,7 +784,8 @@ gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTu
uri = _gdata_service_fix_uri_scheme (gdata_link_get_uri (related_link));
gdata_service_query_async (GDATA_SERVICE (self), get_youtube_authorization_domain (), uri, query,
- GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data, callback, user_data);
+ GDATA_TYPE_YOUTUBE_VIDEO, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
g_free (uri);
}
diff --git a/gdata/services/youtube/gdata-youtube-service.h b/gdata/services/youtube/gdata-youtube-service.h
index 102dab53..4a4f534b 100644
--- a/gdata/services/youtube/gdata-youtube-service.h
+++ b/gdata/services/youtube/gdata-youtube-service.h
@@ -118,6 +118,7 @@ GDataFeed *gdata_youtube_service_query_standard_feed (GDataYouTubeService *self,
void gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
GCancellable *cancellable,
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
GDataFeed *gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query,
@@ -125,6 +126,7 @@ GDataFeed *gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQ
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
GDataFeed *gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
@@ -132,6 +134,7 @@ GDataFeed *gdata_youtube_service_query_related (GDataYouTubeService *self, GData
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
GAsyncReadyCallback callback, gpointer user_data);
GDataUploadStream *gdata_youtube_service_upload_video (GDataYouTubeService *self, GDataYouTubeVideo *video, const gchar *slug,