8 #define DBUS_NAME "com.profusion"
9 #define OBJECT_PATH "/com/profusion/test"
10 #define IFACE_NAME "com.Profusion.Test"
12 static E_DBus_Connection *conn = NULL;
15 _cb_resp(void *data, DBusMessage *msg, DBusError *error)
20 if (dbus_error_is_set(error))
22 printf("dbus error\nName: %s\nDescription: %s\n", error->name,
24 ecore_main_loop_quit();
28 dbus_error_init(&new_error);
29 dbus_message_get_args(msg, &new_error, DBUS_TYPE_INT32, &size,
31 if (dbus_error_is_set(&new_error))
32 printf("dbus error\nName: %s\nDescription: %s\n", new_error.name,
34 else printf("size = %d\n", size);
36 ecore_main_loop_quit();
40 main(int argc, char *argv[])
42 char *string = "lalala";
46 conn = e_dbus_bus_get(DBUS_BUS_SESSION);
48 msg = dbus_message_new_method_call(DBUS_NAME, OBJECT_PATH,
49 IFACE_NAME, "string_len_async");
50 dbus_message_append_args(msg, DBUS_TYPE_STRING, &string, DBUS_TYPE_INVALID);
51 e_dbus_message_send(conn, msg, _cb_resp, -1, NULL);
52 dbus_message_unref(msg);
54 ecore_main_loop_begin();