Add doc files to dist and fix version number in NEWS.
[mmediamanager.git] / test / clients / test-dbus-register.c
blob4999116b308a6545d8c639ed375a563aa89a1f5d
1 #include <glib.h>
2 #include <glib-object.h>
3 #include <dbus/dbus-glib.h>
5 int main (int argc, char **argv)
7 DBusGProxy *proxy;
8 DBusGConnection *connection;
9 GError *error = NULL;
11 g_type_init ();
12 g_thread_init (NULL);
13 dbus_g_thread_init ();
15 connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
16 if (!connection) {
17 g_warning ("Error getting connection to the bus");
18 g_error_free (error);
19 return 0;
21 proxy = dbus_g_proxy_new_for_name (connection,
22 "org.gnome.MediaManager",
23 "/org/gnome/MediaManager/Manager",
24 "org.gnome.MediaManager.Manager");
25 if (!proxy) {
26 g_warning ("Error creating proxy");
27 g_error_free (error);
28 return 0;
30 dbus_g_proxy_call (proxy, "RegisterApp", &error,
31 G_TYPE_STRING, "org.Foo.Bar",
32 G_TYPE_STRING, "/org/Foo/Bar",
33 G_TYPE_INVALID, G_TYPE_INVALID);
34 return 0;