diff options
author | Havoc Pennington <hp@redhat.com> | 2003-09-04 00:21:36 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-09-04 00:21:36 +0000 |
commit | 636be6f92d4d8effd392ad1f894738849ec7af76 (patch) | |
tree | 963e3d848ca3c3f78e07d1d92aaa3288558eb496 /glib/test-dbus-glib.c | |
parent | 0453b2be603d4a8fcd12be3097b7eadc25838018 (diff) |
2003-09-03 Havoc Pennington <hp@pobox.com>
* test/glib/Makefile.am: add this with random glib-linked test
programs
* glib/Makefile.am: remove the random test programs from here,
leave only the unit tests
* glib/dbus-gobject.c (_dbus_gobject_test): add test for
uscore/javacaps conversion, and fix
(get_object_property, set_object_property): change to .NET
convention for mapping props to methods, set_FooBar/get_FooBar,
since one language has such a convention we may as well copy it.
Plus real methods in either getFooBar or get_foo_bar style won't
collide with this convention.
Diffstat (limited to 'glib/test-dbus-glib.c')
-rw-r--r-- | glib/test-dbus-glib.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/glib/test-dbus-glib.c b/glib/test-dbus-glib.c deleted file mode 100644 index beda0a7a..00000000 --- a/glib/test-dbus-glib.c +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu" -*- */ -#include "dbus-glib.h" -#include <stdio.h> - -int -main (int argc, char **argv) -{ - DBusConnection *connection; - DBusMessage *message, *reply; - GMainLoop *loop; - DBusError error; - - if (argc < 2) - { - g_printerr ("Give the server address as an argument\n"); - return 1; - } - - loop = g_main_loop_new (NULL, FALSE); - - dbus_error_init (&error); - connection = dbus_connection_open (argv[1], &error); - if (connection == NULL) - { - g_printerr ("Failed to open connection to %s: %s\n", argv[1], - error.message); - dbus_error_free (&error); - return 1; - } - - dbus_connection_setup_with_g_main (connection, NULL); - - message = dbus_message_new_method_call (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS, - DBUS_PATH_ORG_FREEDESKTOP_DBUS, - DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS, - "Hello"); - - dbus_error_init (&error); - reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error); - if (reply == NULL) - { - g_printerr ("Error on hello message: %s\n", error.message); - dbus_error_free (&error); - return 1; - } - - g_print ("reply received\n"); - - g_main_loop_run (loop); - - return 0; -} |