gdbus-codegen: Fix up example to not use non-existant method

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen 2011-05-24 07:34:30 -04:00
parent ab18737ead
commit 3f569d2b5b

View File

@ -671,7 +671,7 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
</para>
<informalexample><programlisting><![CDATA[
static gboolean
on_handle_hello_world (MyAppFrobber *object,
on_handle_hello_world (MyAppFrobber *interface,
GDBusMethodInvocation *invocation,
const gchar *greeting,
gpointer user_data)
@ -680,7 +680,7 @@ on_handle_hello_world (MyAppFrobber *object,
{
gchar *response;
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);
}
else
@ -695,10 +695,10 @@ on_handle_hello_world (MyAppFrobber *object,
[...]
object = my_app_frobber_skeleton_new ();
my_app_frobber_set_verbose (object, TRUE);
interface = my_app_frobber_skeleton_new ();
my_app_frobber_set_verbose (interface, TRUE);
g_signal_connect (object,
g_signal_connect (interface,
"handle-hello-world",
G_CALLBACK (on_handle_hello_world),
some_user_data);
@ -706,10 +706,13 @@ on_handle_hello_world (MyAppFrobber *object,
[...]
error = NULL;
id = g_dbus_interface_register_object (G_DBUS_INTERFACE (object),
if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (interface),
connection,
"/path/of/object",
&error);
"/path/of/dbus_object",
&error))
{
/* handle error */
}
]]></programlisting></informalexample>
<para>
To facilitate atomic changesets (multiple properties changing at