mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
gdbus-codegen: Fix up example to not use non-existant method
Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
ab18737ead
commit
3f569d2b5b
@ -671,7 +671,7 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
|
|||||||
</para>
|
</para>
|
||||||
<informalexample><programlisting><![CDATA[
|
<informalexample><programlisting><![CDATA[
|
||||||
static gboolean
|
static gboolean
|
||||||
on_handle_hello_world (MyAppFrobber *object,
|
on_handle_hello_world (MyAppFrobber *interface,
|
||||||
GDBusMethodInvocation *invocation,
|
GDBusMethodInvocation *invocation,
|
||||||
const gchar *greeting,
|
const gchar *greeting,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -680,7 +680,7 @@ on_handle_hello_world (MyAppFrobber *object,
|
|||||||
{
|
{
|
||||||
gchar *response;
|
gchar *response;
|
||||||
response = g_strdup_printf ("Word! You said `%s'.", greeting);
|
response = g_strdup_printf ("Word! You said `%s'.", greeting);
|
||||||
my_app_complete_hello_world (object, invocation, response);
|
my_app_complete_hello_world (interface, invocation, response);
|
||||||
g_free (response);
|
g_free (response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -695,10 +695,10 @@ on_handle_hello_world (MyAppFrobber *object,
|
|||||||
|
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
object = my_app_frobber_skeleton_new ();
|
interface = my_app_frobber_skeleton_new ();
|
||||||
my_app_frobber_set_verbose (object, TRUE);
|
my_app_frobber_set_verbose (interface, TRUE);
|
||||||
|
|
||||||
g_signal_connect (object,
|
g_signal_connect (interface,
|
||||||
"handle-hello-world",
|
"handle-hello-world",
|
||||||
G_CALLBACK (on_handle_hello_world),
|
G_CALLBACK (on_handle_hello_world),
|
||||||
some_user_data);
|
some_user_data);
|
||||||
@ -706,10 +706,13 @@ on_handle_hello_world (MyAppFrobber *object,
|
|||||||
[...]
|
[...]
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
id = g_dbus_interface_register_object (G_DBUS_INTERFACE (object),
|
if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (interface),
|
||||||
connection,
|
connection,
|
||||||
"/path/of/object",
|
"/path/of/dbus_object",
|
||||||
&error);
|
&error))
|
||||||
|
{
|
||||||
|
/* handle error */
|
||||||
|
}
|
||||||
]]></programlisting></informalexample>
|
]]></programlisting></informalexample>
|
||||||
<para>
|
<para>
|
||||||
To facilitate atomic changesets (multiple properties changing at
|
To facilitate atomic changesets (multiple properties changing at
|
||||||
|
Loading…
x
Reference in New Issue
Block a user