[gnio] Add API docs for GAsyncInitable
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnio] Add API docs for GAsyncInitable
- Date: Thu, 7 May 2009 11:07:36 -0400 (EDT)
commit c8b2315c93a8922621fbe02a3e228407cfffab90
Author: Alexander Larsson <alexl redhat com>
Date: Thu May 7 17:07:03 2009 +0200
Add API docs for GAsyncInitable
---
gio/gasyncinitable.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 74 insertions(+), 3 deletions(-)
diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c
index bd5e200..5b0d478 100644
--- a/gio/gasyncinitable.c
+++ b/gio/gasyncinitable.c
@@ -99,9 +99,9 @@ g_async_initable_base_init (gpointer g_iface)
/**
* g_async_initable_init_async:
* @initable: a #GAsyncInitable.
- * @io_priority: the <link linkend="io-priority">I/O priority</link>
+ * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the operation.
- * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: the data to pass to callback function
*
@@ -232,6 +232,25 @@ g_async_initable_real_init_finish (GAsyncInitable *initable,
return TRUE; /* Errors handled by base impl */
}
+/**
+ * g_async_initable_new_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link>
+ * of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ * @first_property_name: the name of the first property, followed by
+ * the value, and other property value pairs, and ended by %NULL.
+ *
+ * Helper function for constructing #GAsyncInitiable object. This is
+ * similar to g_object_new() but also initializes the object asyncronously.
+ *
+ * When the initialization is finished, @callback will be called. You can then call
+ * g_async_initable_new_finish() to get new object and check for any errors.
+ *
+ * Since: 2.22
+ **/
void
g_async_initable_new_async (GType object_type,
int io_priority,
@@ -251,6 +270,25 @@ g_async_initable_new_async (GType object_type,
va_end (var_args);
}
+/**
+ * g_async_initable_newv_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @n_parameters: the number of parameters in @parameters
+ * @parameters: the parameters to use to construct the object
+ * @io_priority: the <link linkend="io-priority">I/O priority</link>
+ * of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ *
+ * Helper function for constructing #GAsyncInitiable object. This is
+ * similar to g_object_newv() but also initializes the object asyncronously.
+ *
+ * When the initialization is finished, @callback will be called. You can then call
+ * g_async_initable_new_finish() to get new object and check for any errors.
+ *
+ * Since: 2.22
+ **/
void
g_async_initable_newv_async (GType object_type,
guint n_parameters,
@@ -271,6 +309,26 @@ g_async_initable_newv_async (GType object_type,
callback, user_data);
}
+/**
+ * g_async_initable_new_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @first_property_name: the name of the first property, followed by
+ * the value, and other property value pairs, and ended by %NULL.
+ * @var_args: The var args list generated from @first_property_name.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link>
+ * of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ *
+ * Helper function for constructing #GAsyncInitiable object. This is
+ * similar to g_object_new_valist() but also initializes the object asyncronously.
+ *
+ * When the initialization is finished, @callback will be called. You can then call
+ * g_async_initable_new_finish() to get new object and check for any errors.
+ *
+ * Since: 2.22
+ **/
void
g_async_initable_new_valist_async (GType object_type,
const gchar *first_property_name,
@@ -293,7 +351,20 @@ g_async_initable_new_valist_async (GType object_type,
callback, user_data);
g_object_unref (obj); /* Passed ownership to async call */
}
-
+/**
+ * g_async_initable_new_finish:
+ * @initable: the #GAsyncInitable from the callback
+ * @res: the #GAsyncResult.from the callback
+ * @error: a #GError location to store the error occuring, or %NULL to
+ * ignore.
+ *
+ * Finishes the async construction for the various g_async_initable_new calls,
+ * returning the created object or %NULL on error.
+ *
+ * Returns: a newly created #GObject, or %NULL on error. Free with g_object_unref().
+ *
+ * Since: 2.22
+ **/
GObject *
g_async_initable_new_finish (GAsyncInitable *initable,
GAsyncResult *res,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]