[gcab] Annotate callback/delegate scope target argument
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] Annotate callback/delegate scope target argument
- Date: Fri, 18 Jan 2013 00:03:57 +0000 (UTC)
commit 750dff3afeecd91277e319b4ca413ebb1c12cb3e
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Fri Jan 18 00:41:17 2013 +0100
Annotate callback/delegate scope target argument
libgcab/gcab-cabinet.c | 20 ++++++++++----------
libgcab/gcab-cabinet.h | 4 ++--
libgcab/gcab-file.h | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/libgcab/gcab-cabinet.c b/libgcab/gcab-cabinet.c
index 104b53d..757c7bd 100644
--- a/libgcab/gcab-cabinet.c
+++ b/libgcab/gcab-cabinet.c
@@ -137,9 +137,9 @@ gcab_cabinet_get_folders (GCabCabinet *self)
* gcab_cabinet_write:
* @cabinet: a #GCabCabinet
* @stream: a #GOutputStream also #GSeekable
- * @file_callback: (allow-none) (scope call): report current file being saved
- * @progress_callback: (allow-none) (scope call): report saving progress
- * @callback_data: (closure): user data to pass to callbacks
+ * @file_callback: (allow-none) (scope call) (closure user_data): report current file being saved
+ * @progress_callback: (allow-none) (scope call) (closure user_data): report saving progress
+ * @user_data: (closure): user data to pass to callbacks
* @cancellable: (allow-none): optional #GCancellable object,
* %NULL to ignore
* @error: (allow-none): #GError to set on error, or %NULL
@@ -153,7 +153,7 @@ gcab_cabinet_write (GCabCabinet *self,
GOutputStream *out,
GCabFileCallback file_callback,
GFileProgressCallback progress_callback,
- gpointer callback_data,
+ gpointer user_data,
GCancellable *cancellable,
GError **error)
{
@@ -204,7 +204,7 @@ gcab_cabinet_write (GCabCabinet *self,
for (l = files; l != NULL; l = l->next) {
file = GCAB_FILE (l->data);
if (file_callback)
- file_callback (file, callback_data);
+ file_callback (file, user_data);
g_clear_object (&in);
in = G_INPUT_STREAM (g_file_read (file->file, cancellable, error));
@@ -356,10 +356,10 @@ end:
* gcab_cabinet_extract:
* @cabinet: a #GCabCabinet
* @path: the path to extract files
- * @file_callback: (allow-none) (scope call): an optionnal #GCabFile callback,
+ * @file_callback: (allow-none) (scope call) (closure user_data): an optionnal #GCabFile callback,
* return %FALSE to filter out or skip files.
- * @progress_callback: (allow-none) (scope call): a progress callback
- * @callback_data: callback data
+ * @progress_callback: (allow-none) (scope call) (closure user_data): a progress callback
+ * @user_data: (closure): callback data
* @cancellable: (allow-none): optional #GCancellable object,
* %NULL to ignore
* @error: (allow-none): #GError to set on error, or %NULL
@@ -373,7 +373,7 @@ gcab_cabinet_extract (GCabCabinet *self,
GFile *path,
GCabFileCallback file_callback,
GFileProgressCallback progress_callback,
- gpointer callback_data,
+ gpointer user_data,
GCancellable *cancellable,
GError **error)
{
@@ -388,7 +388,7 @@ gcab_cabinet_extract (GCabCabinet *self,
for (i = 0; i < self->folders->len; ++i) {
GCabFolder *folder = g_ptr_array_index (self->folders, i);
if (!gcab_folder_extract (folder, path, self->cheader.res_data,
- file_callback, progress_callback, callback_data,
+ file_callback, progress_callback, user_data,
cancellable, error)) {
success = FALSE;
break;
diff --git a/libgcab/gcab-cabinet.h b/libgcab/gcab-cabinet.h
index e6208d1..066645f 100644
--- a/libgcab/gcab-cabinet.h
+++ b/libgcab/gcab-cabinet.h
@@ -64,14 +64,14 @@ gboolean gcab_cabinet_write (GCabCabinet *cabinet,
GOutputStream *stream,
GCabFileCallback file_callback,
GFileProgressCallback progress_callback,
- gpointer callback_data,
+ gpointer user_data,
GCancellable *cancellable,
GError **error);
gboolean gcab_cabinet_extract (GCabCabinet *cabinet,
GFile *path,
GCabFileCallback file_callback,
GFileProgressCallback progress_callback,
- gpointer callback_data,
+ gpointer user_data,
GCancellable *cancellable,
GError **error);
diff --git a/libgcab/gcab-file.h b/libgcab/gcab-file.h
index f6c2562..c92ef82 100644
--- a/libgcab/gcab-file.h
+++ b/libgcab/gcab-file.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
typedef struct _GCabFileClass GCabFileClass;
typedef struct _GCabFile GCabFile;
-typedef gboolean (*GCabFileCallback) (GCabFile *current, gpointer data);
+typedef gboolean (*GCabFileCallback) (GCabFile *current, gpointer user_data);
GType gcab_file_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]