X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbind%2Fdbtest.c;h=d00486a497fdfae409a7e6294580a06d6f9c1bb0;hb=3046b81b19788dd9d97adc48afea59ecdc87411d;hp=9a3ae869290d8e53d2c21eac25af47e13c5eb475;hpb=28d2e961940e5b242e008f23bf9b2d68ab555cfa;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/dbind/dbtest.c b/dbind/dbtest.c index 9a3ae86..d00486a 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -1,9 +1,7 @@ #include #include #include -#define DBUS_API_SUBJECT_TO_CHANGE #include -#include /* Wow! dbus is unpleasant to use */ @@ -341,7 +339,7 @@ void test_marshalling () fprintf (stderr, "Marshalling ok\n"); } -void test_teamspaces (DBindContext *ctx) +void test_teamspaces (DBusConnection *bus) { GArray *spaces; DBusError error; @@ -353,9 +351,14 @@ void test_teamspaces (DBindContext *ctx) } TeamSpace; dbus_error_init (&error); - if (!dbind_context_method_call (ctx, NULL, DESKICE_PATH, DESKICE_NAMESPACE, - "GetTeamList", &error, - "=>a(sss)", &spaces)) { + if (!dbind_method_call_reentrant (bus, + NULL, + DESKICE_PATH, + DESKICE_NAMESPACE, + "GetTeamList", + &error, + "=>a(sss)", + &spaces)) { fprintf (stderr, "Error getting team spaces %s: %s\n", error.name, error.message); dbus_error_free (&error); @@ -375,8 +378,6 @@ void test_teamspaces (DBindContext *ctx) dbind_any_free_ptr ("a(sss)", spaces); } -extern dbind_find_c_alignment (char *type); - void test_helpers () { dbind_find_c_alignment ("(sss)"); @@ -387,17 +388,16 @@ void test_helpers () int main (int argc, char **argv) { - DBindContext *ctx; + DBusConnection *bus; + DBusError err; + + dbus_error_init (&err); - ctx = dbind_create_context (DBUS_BUS_SESSION, NULL); - if (!ctx) - return 1; + bus = dbus_bus_get (DBUS_BUS_SESSION, &err); test_helpers (); test_marshalling (); - test_teamspaces (ctx); - - dbind_context_free (ctx); + test_teamspaces (bus); return 0; }