[glib] Add GI annotations to GPollable{Input|Output}Stream
- From: Pavel Holejsovsky <pholejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add GI annotations to GPollable{Input|Output}Stream
- Date: Wed, 29 Dec 2010 15:14:08 +0000 (UTC)
commit 571104bcc384c30054b507cab8e9d9a5f1166c45
Author: Pavel Holejsovsky <pholejs src gnome org>
Date: Tue Dec 28 16:53:48 2010 +0100
Add GI annotations to GPollable{Input|Output}Stream
gio/gpollableinputstream.c | 13 +++++++------
gio/gpollableoutputstream.c | 12 +++++++-----
2 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/gio/gpollableinputstream.c b/gio/gpollableinputstream.c
index d6937d8..912eaea 100644
--- a/gio/gpollableinputstream.c
+++ b/gio/gpollableinputstream.c
@@ -115,9 +115,9 @@ g_pollable_input_stream_is_readable (GPollableInputStream *stream)
}
/**
- * g_pollable_input_stream_create_source:
+ * g_pollable_input_stream_create_source: (skip)
* @stream: a #GPollableInputStream.
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
*
* Creates a #GSource that triggers when @stream can be read, or
* @cancellable is triggered or an error occurs. The callback on the
@@ -128,7 +128,7 @@ g_pollable_input_stream_is_readable (GPollableInputStream *stream)
* triggers, so you should use g_pollable_input_stream_read_nonblocking()
* rather than g_input_stream_read() from the callback.
*
- * Returns: a new #GSource
+ * Returns: (transfer full): a new #GSource
*
* Since: 2.28
*/
@@ -165,7 +165,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
* @buffer: a buffer to read data into (which should be at least @size
* bytes long).
* @size: the number of bytes you want to read
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
* @error: #GError for error reporting, or %NULL to ignore.
*
* Attempts to read up to @size bytes from @stream into @buffer, as
@@ -180,6 +180,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
* may happen if you call this method after a source triggers due
* to having been cancelled.
*
+ * Virtual: read_nonblocking
* Return value: the number of bytes read, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK).
*/
@@ -275,7 +276,7 @@ static GSourceFuncs pollable_source_funcs =
};
/**
- * g_pollable_source_new:
+ * g_pollable_source_new: (skip)
* @pollable_stream: the stream associated with the new source
*
* Utility method for #GPollableInputStream and #GPollableOutputStream
@@ -284,7 +285,7 @@ static GSourceFuncs pollable_source_funcs =
* anything on its own; use g_source_add_child_source() to add other
* sources to it to cause it to trigger.
*
- * Return value: the new #GSource.
+ * Return value: (transfer full): the new #GSource.
*
* Since: 2.28
*/
diff --git a/gio/gpollableoutputstream.c b/gio/gpollableoutputstream.c
index b4efb3f..7879e88 100644
--- a/gio/gpollableoutputstream.c
+++ b/gio/gpollableoutputstream.c
@@ -116,9 +116,9 @@ g_pollable_output_stream_is_writable (GPollableOutputStream *stream)
}
/**
- * g_pollable_output_stream_create_source:
+ * g_pollable_output_stream_create_source: (skip)
* @stream: a #GPollableOutputStream.
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
*
* Creates a #GSource that triggers when @stream can be written, or
* @cancellable is triggered or an error occurs. The callback on the
@@ -129,7 +129,7 @@ g_pollable_output_stream_is_writable (GPollableOutputStream *stream)
* triggers, so you should use g_pollable_output_stream_write_nonblocking()
* rather than g_output_stream_write() from the callback.
*
- * Returns: a new #GSource
+ * Returns: (transfer full): a new #GSource
*
* Since: 2.28
*/
@@ -163,9 +163,10 @@ g_pollable_output_stream_default_write_nonblocking (GPollableOutputStream *stre
/**
* g_pollable_output_stream_write_nonblocking:
* @stream: a #GPollableOutputStream
- * @buffer: a buffer to write data from
+ * @buffer: (array length=size) (element-type guint8): a buffer to write
+ * data from
* @size: the number of bytes you want to write
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
* @error: #GError for error reporting, or %NULL to ignore.
*
* Attempts to write up to @size bytes from @buffer to @stream, as
@@ -180,6 +181,7 @@ g_pollable_output_stream_default_write_nonblocking (GPollableOutputStream *stre
* may happen if you call this method after a source triggers due
* to having been cancelled.
*
+ * Virtual: write_nonblocking
* Return value: the number of bytes written, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK).
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]