[glib] gdbus-codegen: Fix up example to not use non-existant method
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdbus-codegen: Fix up example to not use non-existant method
- Date: Tue, 24 May 2011 11:35:18 +0000 (UTC)
commit 3f569d2b5b00d5f65c8332bb54588d701937d1e2
Author: David Zeuthen <davidz redhat com>
Date: Tue May 24 07:34:30 2011 -0400
gdbus-codegen: Fix up example to not use non-existant method
Signed-off-by: David Zeuthen <davidz redhat com>
docs/reference/gio/gdbus-codegen.xml | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/docs/reference/gio/gdbus-codegen.xml b/docs/reference/gio/gdbus-codegen.xml
index 5f1590d..a5b8068 100644
--- a/docs/reference/gio/gdbus-codegen.xml
+++ b/docs/reference/gio/gdbus-codegen.xml
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]