</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)
{
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
[...]
- 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);
[...]
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