Enlightenment CVS committal
Author : sebastid
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/bin
Modified Files:
ecore_dbus_test.c ecore_dbus_test.h
Log Message:
Update for lates ecore_dbus changes.
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/bin/ecore_dbus_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_dbus_test.c 25 Jul 2006 14:12:21 -0000 1.4
+++ ecore_dbus_test.c 25 Jul 2006 16:02:44 -0000 1.5
@@ -54,10 +54,7 @@
event = ev;
printf("_ecore_dbus_event_server_add\n");
- ret = ecore_dbus_message_new_method_call(event->server,
"org.freedesktop.DBus" /*destination*/,
- "/org/freedesktop/DBus" /*path*/,
- "org.freedesktop.DBus"
/*interface*/,
- "Hello" /*method*/, NULL /*fmt*/);
+ ret = ecore_dbus_method_hello(event->server);
printf("ret: %d\n", ret);
return 0;
}
@@ -78,7 +75,31 @@
Ecore_DBus_Event_Server_Data *event;
event = ev;
- printf("_ecore_dbus_event_server_data\n");
+ if (!event->method) return 0;
+ printf("_ecore_dbus_event_server_data %s\n", event->method);
+ if (!strcmp(event->method, "org.freedesktop.DBus.Hello"))
+ {
+ printf("List names\n");
+ ecore_dbus_method_list_names(event->server);
+ }
+ else if (!strcmp(event->method, "org.freedesktop.DBus.ListNames"))
+ {
+ Ecore_List *names;
+
+ printf("Got names\n");
+ names = ecore_dbus_message_body_field_get(event->message, 0);
+ if (names)
+ {
+ char *name;
+ ecore_list_goto_first(names);
+ while ((name = ecore_list_next(names)))
+ {
+ printf("Name: %s\n", name);
+ }
+ ecore_list_destroy(names);
+ }
+ ecore_main_loop_quit();
+ }
return 0;
}
#else
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/bin/ecore_dbus_test.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ecore_dbus_test.h 20 Jul 2006 16:48:32 -0000 1.1
+++ ecore_dbus_test.h 25 Jul 2006 16:02:44 -0000 1.2
@@ -7,9 +7,11 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#ifdef BUILD_ECORE_DBUS
#include "Ecore.h"
+#include "Ecore_Data.h"
#include "Ecore_DBus.h"
#endif
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs