[jsonrpc-glib] output-stream: add documentation for write_message
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib] output-stream: add documentation for write_message
- Date: Sun, 14 Jan 2018 03:28:42 +0000 (UTC)
commit fda22f53f76828e8423f7aa644f54ccc62e24821
Author: Christian Hergert <chergert redhat com>
Date: Sat Jan 13 18:14:50 2018 -0800
output-stream: add documentation for write_message
src/jsonrpc-output-stream.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
---
diff --git a/src/jsonrpc-output-stream.c b/src/jsonrpc-output-stream.c
index f48b001..c7a9d77 100644
--- a/src/jsonrpc-output-stream.c
+++ b/src/jsonrpc-output-stream.c
@@ -313,6 +313,21 @@ jsonrpc_output_stream_write_message_async_cb (GObject *object,
jsonrpc_output_stream_pump (self);
}
+/**
+ * jsonrpc_output_stream_write_message_async:
+ * @self: a #JsonrpcOutputStream
+ * @message: (transfer none): a #GVariant
+ * @cancellable: (nullable): a #GCancellable or %NULL
+ * @callback: (nullable): a #GAsyncReadyCallback or %NULL
+ * @user_data: closure data for @callback
+ *
+ * Asynchronously sends a message to the peer.
+ *
+ * This asynchronous operation will complete once the message has
+ * been buffered, and there is no guarantee the peer received it.
+ *
+ * Since: 3.26
+ */
void
jsonrpc_output_stream_write_message_async (JsonrpcOutputStream *self,
GVariant *message,
@@ -374,6 +389,20 @@ jsonrpc_output_stream_write_message_sync_cb (GObject *object,
g_task_return_boolean (task, TRUE);
}
+/**
+ * jsonrpc_output_stream_write_message:
+ * @self: a #JsonrpcOutputStream
+ * @message: (transfer none): a #GVariant
+ * @cancellable: (nullable): a #GCancellable or %NULL
+ * @error: a location for a #GError, or %NULL
+ *
+ * Synchronously sends a message to the peer.
+ *
+ * This operation will complete once the message has been buffered. There
+ * is no guarantee the peer received it.
+ *
+ * Since: 3.26
+ */
gboolean
jsonrpc_output_stream_write_message (JsonrpcOutputStream *self,
GVariant *message,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]