mention inline use of floating variants

This commit is contained in:
Matthias Clasen 2010-05-11 23:18:48 -04:00
parent ab2ff1a307
commit a63d3bb868
2 changed files with 72 additions and 7 deletions

View File

@ -2365,7 +2365,7 @@ purge_all_filters (GDBusConnection *connection)
/**
* g_dbus_connection_remove_filter:
* @connection: a #GDBusConnection
* @filer_id: an identifier obtained from g_dbus_connection_add_filter()
* @filter_id: an identifier obtained from g_dbus_connection_add_filter()
*
* Removes a filter.
*
@ -4153,6 +4153,24 @@ add_call_flags (GDBusMessage *message,
* not compatible with the D-Bus protocol, the operation fails with
* %G_IO_ERROR_INVALID_ARGUMENT.
*
* If the @parameters #GVariant is floating, it is consumed. This allows
* convenient 'inline' use of g_variant_new(), e.g.:
* |[
* g_dbus_connection_call (connection,
* "org.freedesktop.StringThings",
* "/org/freedesktop/StringThings",
* "org.freedesktop.StringThings",
* "TwoStrings",
* g_variant_new ("(ss)",
* "Thing One",
* "Thing Two"),
* G_DBUS_CALL_FLAGS_NONE,
* -1,
* NULL,
* (GAsyncReadyCallback) two_strings_done,
* NULL);
* ]|
*
* This is an asynchronous method. When the operation is finished, @callback will be invoked
* in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
* of the thread you are calling this method from. You can then call
@ -4303,6 +4321,23 @@ g_dbus_connection_call_finish (GDBusConnection *connection,
* contains a value not compatible with the D-Bus protocol, the operation
* fails with %G_IO_ERROR_INVALID_ARGUMENT.
*
* If the @parameters #GVariant is floating, it is consumed.
* This allows convenient 'inline' use of g_variant_new(), e.g.:
* |[
* g_dbus_connection_call_sync (connection,
* "org.freedesktop.StringThings",
* "/org/freedesktop/StringThings",
* "org.freedesktop.StringThings",
* "TwoStrings",
* g_variant_new ("(ss)",
* "Thing One",
* "Thing Two"),
* G_DBUS_CALL_FLAGS_NONE,
* -1,
* NULL,
* &amp;error);
* ]|
*
* The calling thread is blocked until a reply is received. See
* g_dbus_connection_call() for the asynchronous version of
* this method.

View File

@ -1381,12 +1381,28 @@ validate_method_return (const char *method_name,
* compatible with the D-Bus protocol, the operation fails with
* %G_IO_ERROR_INVALID_ARGUMENT.
*
* This is an asynchronous method. When the operation is finished, @callback will be invoked
* in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
* of the thread you are calling this method from. You can then call
* g_dbus_proxy_call_finish() to get the result of the operation.
* See g_dbus_proxy_call_sync() for the
* synchronous version of this method.
* If the @parameters #GVariant is floating, it is consumed. This allows
* convenient 'inline' use of g_variant_new(), e.g.:
* |[
* g_dbus_proxy_call (proxy,
* "TwoStrings",
* g_variant_new ("(ss)",
* "Thing One",
* "Thing Two"),
* G_DBUS_CALL_FLAGS_NONE,
* -1,
* NULL,
* (GAsyncReadyCallback) two_strings_done,
* &amp;data);
* ]|
*
* This is an asynchronous method. When the operation is finished,
* @callback will be invoked in the
* <link linkend="g-main-context-push-thread-default">thread-default
* main loop</link> of the thread you are calling this method from.
* You can then call g_dbus_proxy_call_finish() to get the result of
* the operation. See g_dbus_proxy_call_sync() for the synchronous
* version of this method.
*
* Since: 2.26
*/
@ -1517,6 +1533,20 @@ g_dbus_proxy_call_finish (GDBusProxy *proxy,
* compatible with the D-Bus protocol, the operation fails with
* %G_IO_ERROR_INVALID_ARGUMENT.
*
* If the @parameters #GVariant is floating, it is consumed. This allows
* convenient 'inline' use of g_variant_new(), e.g.:
* |[
* g_dbus_proxy_call_sync (proxy,
* "TwoStrings",
* g_variant_new ("(ss)",
* "Thing One",
* "Thing Two"),
* G_DBUS_CALL_FLAGS_NONE,
* -1,
* NULL,
* &amp;error);
* ]|
*
* The calling thread is blocked until a reply is received. See
* g_dbus_proxy_call() for the asynchronous version of this
* method.