summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2013-04-23 11:40:05 -0300
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-04-23 12:36:29 -0300
commit4e3804041f8e865e007b2a6a0d45a05f39500c3b (patch)
treea493b9c8f8a610d2667651f3ba81819ed16fbe8c /src
parent4cf68bf728b5a858ce1c0efac25ded1a49ba8d9d (diff)
Rename edbus->eldbus
git grep -l edbus2 | while read f; do sed -i 's/edbus2/eldbus/g' "$f"; done find . -name '*edbus2*' -exec rename edbus2 eldbus {} \; git grep -l "EDBUS" | while read f; do sed -i 's/EDBUS/ELDBUS/g' "$f"; done git grep -l "EDBus" | while read f; do sed -i 's/EDBus/Eldbus/g' "$f"; done git grep -l "edbus (v2)" | while read f; do sed -i 's/edbus (v2)/eldbus/g' "$f"; done git grep -l "Edbus" | while read f; do sed -i 's/Edbus/Eldbus/g' "$f"; done git grep -l "edbus" | while read f; do sed -i 's/edbus/eldbus/g' "$f"; done find . -name '*edbus*' -exec rename edbus eldbus {} \; find . -name '*EDBus*' -exec rename EDBus Eldbus {} \;
Diffstat (limited to '')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/Makefile_EDBus.am85
-rw-r--r--src/Makefile_Eldbus.am85
-rw-r--r--src/bin/efreet/efreetd_dbus.c120
-rw-r--r--src/bin/eldbus/client.c (renamed from src/bin/edbus/client.c)2
-rw-r--r--src/bin/eldbus/codegen.h (renamed from src/bin/edbus/codegen.h)0
-rw-r--r--src/bin/eldbus/dbus.c (renamed from src/bin/edbus/dbus.c)0
-rw-r--r--src/bin/eldbus/parser.c (renamed from src/bin/edbus/parser.c)0
-rw-r--r--src/bin/eldbus/source_client.c (renamed from src/bin/edbus/source_client.c)224
-rw-r--r--src/bin/eldbus/utils.c (renamed from src/bin/edbus/utils.c)34
-rw-r--r--src/bin/ethumb_client/ethumbd.c288
-rw-r--r--src/examples/edbus/banshee.c241
-rw-r--r--src/examples/edbus/complex-types-server.c393
-rw-r--r--src/examples/edbus/complex-types.c284
-rw-r--r--src/examples/edbus/server.c247
-rw-r--r--src/examples/edbus/simple-signal-emit.c86
-rw-r--r--src/examples/eldbus/Makefile.am (renamed from src/examples/edbus/Makefile.am)16
-rw-r--r--src/examples/eldbus/Makefile.examples (renamed from src/examples/edbus/Makefile.examples)2
-rw-r--r--src/examples/eldbus/banshee.c241
-rw-r--r--src/examples/eldbus/client.c (renamed from src/examples/edbus/client.c)96
-rw-r--r--src/examples/eldbus/complex-types-client-eina-value.c (renamed from src/examples/edbus/complex-types-client-eina-value.c)92
-rw-r--r--src/examples/eldbus/complex-types-server.c393
-rw-r--r--src/examples/eldbus/complex-types.c284
-rw-r--r--src/examples/eldbus/connman-list-services.c (renamed from src/examples/edbus/connman-list-services.c)52
-rw-r--r--src/examples/eldbus/ofono-dial.c (renamed from src/examples/edbus/ofono-dial.c)36
-rw-r--r--src/examples/eldbus/server.c247
-rw-r--r--src/examples/eldbus/simple-signal-emit.c86
-rw-r--r--src/lib/edbus/EDBus.h222
-rw-r--r--src/lib/edbus/edbus_connection.h139
-rw-r--r--src/lib/edbus/edbus_freedesktop.c82
-rw-r--r--src/lib/edbus/edbus_freedesktop.h143
-rw-r--r--src/lib/edbus/edbus_message_eina_value.h36
-rw-r--r--src/lib/edbus/edbus_message_helper.c31
-rw-r--r--src/lib/edbus/edbus_message_helper.h22
-rw-r--r--src/lib/edbus/edbus_object.c676
-rw-r--r--src/lib/edbus/edbus_object.h127
-rw-r--r--src/lib/edbus/edbus_pending.h34
-rw-r--r--src/lib/edbus/edbus_private.h87
-rw-r--r--src/lib/edbus/edbus_proxy.h147
-rw-r--r--src/lib/edbus/edbus_service.h219
-rw-r--r--src/lib/edbus/edbus_signal_handler.h99
-rw-r--r--src/lib/efreet/efreet_cache.c106
-rw-r--r--src/lib/eldbus/Eldbus.h222
-rw-r--r--src/lib/eldbus/eldbus_connection.h139
-rw-r--r--src/lib/eldbus/eldbus_core.c (renamed from src/lib/edbus/edbus_core.c)640
-rw-r--r--src/lib/eldbus/eldbus_freedesktop.c82
-rw-r--r--src/lib/eldbus/eldbus_freedesktop.h143
-rw-r--r--src/lib/eldbus/eldbus_message.c (renamed from src/lib/edbus/edbus_message.c)278
-rw-r--r--src/lib/eldbus/eldbus_message.h (renamed from src/lib/edbus/edbus_message.h)148
-rw-r--r--src/lib/eldbus/eldbus_message_eina_value.h36
-rw-r--r--src/lib/eldbus/eldbus_message_from_eina_value.c (renamed from src/lib/edbus/edbus_message_from_eina_value.c)76
-rw-r--r--src/lib/eldbus/eldbus_message_helper.c31
-rw-r--r--src/lib/eldbus/eldbus_message_helper.h22
-rw-r--r--src/lib/eldbus/eldbus_message_to_eina_value.c (renamed from src/lib/edbus/edbus_message_to_eina_value.c)90
-rw-r--r--src/lib/eldbus/eldbus_object.c676
-rw-r--r--src/lib/eldbus/eldbus_object.h127
-rw-r--r--src/lib/eldbus/eldbus_pending.c (renamed from src/lib/edbus/edbus_pending.c)148
-rw-r--r--src/lib/eldbus/eldbus_pending.h34
-rw-r--r--src/lib/eldbus/eldbus_private.h87
-rw-r--r--src/lib/eldbus/eldbus_private_types.h (renamed from src/lib/edbus/edbus_private_types.h)94
-rw-r--r--src/lib/eldbus/eldbus_proxy.c (renamed from src/lib/edbus/edbus_proxy.c)464
-rw-r--r--src/lib/eldbus/eldbus_proxy.h147
-rw-r--r--src/lib/eldbus/eldbus_service.c (renamed from src/lib/edbus/edbus_service.c)570
-rw-r--r--src/lib/eldbus/eldbus_service.h219
-rw-r--r--src/lib/eldbus/eldbus_signal_handler.c (renamed from src/lib/edbus/edbus_signal_handler.c)142
-rw-r--r--src/lib/eldbus/eldbus_signal_handler.h99
-rw-r--r--src/lib/ethumb_client/ethumb_client.c190
-rw-r--r--src/tests/edbus/edbus_suite.h8
-rw-r--r--src/tests/eldbus/eldbus_suite.c (renamed from src/tests/edbus/edbus_suite.c)20
-rw-r--r--src/tests/eldbus/eldbus_suite.h8
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_init.c (renamed from src/tests/edbus/edbus_test_edbus_init.c)72
71 files changed, 5410 insertions, 5410 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a903eed962..4821ebf934 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@ include Makefile_Ecore_Evas.am
42include Makefile_Ecore_Audio.am 42include Makefile_Ecore_Audio.am
43include Makefile_Embryo.am 43include Makefile_Embryo.am
44include Makefile_Eio.am 44include Makefile_Eio.am
45include Makefile_EDBus.am 45include Makefile_Eldbus.am
46include Makefile_Efreet.am 46include Makefile_Efreet.am
47include Makefile_Eeze.am 47include Makefile_Eeze.am
48include Makefile_EPhysics.am 48include Makefile_EPhysics.am
@@ -71,7 +71,7 @@ examples/eet \
71examples/evas \ 71examples/evas \
72examples/ecore \ 72examples/ecore \
73examples/eio \ 73examples/eio \
74examples/edbus \ 74examples/eldbus \
75examples/ephysics \ 75examples/ephysics \
76examples/edje \ 76examples/edje \
77examples/emotion \ 77examples/emotion \
diff --git a/src/Makefile_EDBus.am b/src/Makefile_EDBus.am
deleted file mode 100644
index 6f5dbd49e1..0000000000
--- a/src/Makefile_EDBus.am
+++ /dev/null
@@ -1,85 +0,0 @@
1
2### Library
3
4lib_LTLIBRARIES += lib/edbus/libedbus2.la
5
6installed_edbusmainheadersdir = $(includedir)/edbus-@VMAJ@
7dist_installed_edbusmainheaders_DATA = \
8lib/edbus/EDBus.h \
9lib/edbus/edbus_connection.h \
10lib/edbus/edbus_freedesktop.h \
11lib/edbus/edbus_message.h \
12lib/edbus/edbus_object.h \
13lib/edbus/edbus_pending.h \
14lib/edbus/edbus_proxy.h \
15lib/edbus/edbus_service.h \
16lib/edbus/edbus_signal_handler.h \
17lib/edbus/edbus_message_helper.h \
18lib/edbus/edbus_message_eina_value.h
19
20lib_edbus_libedbus2_la_SOURCES = \
21lib/edbus/edbus_private.h \
22lib/edbus/edbus_private_types.h \
23lib/edbus/edbus_proxy.c \
24lib/edbus/edbus_core.c \
25lib/edbus/edbus_message.c \
26lib/edbus/edbus_object.c \
27lib/edbus/edbus_pending.c \
28lib/edbus/edbus_freedesktop.c \
29lib/edbus/edbus_service.c \
30lib/edbus/edbus_signal_handler.c \
31lib/edbus/edbus_message_helper.c \
32lib/edbus/edbus_message_to_eina_value.c \
33lib/edbus/edbus_message_from_eina_value.c
34
35lib_edbus_libedbus2_la_CPPFLAGS = \
36-include $(top_builddir)/config.h \
37@EDBUS_CFLAGS@
38lib_edbus_libedbus2_la_LIBADD = @EDBUS_LIBS@
39lib_edbus_libedbus2_la_DEPENDENCIES = @EDBUS_INTERNAL_LIBS@
40lib_edbus_libedbus2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
41
42### Binary
43
44bin_PROGRAMS += bin/edbus/edbus-codegen
45
46bin_edbus_edbus_codegen_SOURCES = \
47bin/edbus/codegen.h \
48bin/edbus/utils.c \
49bin/edbus/parser.c \
50bin/edbus/dbus.c \
51bin/edbus/source_client.c \
52bin/edbus/client.c
53
54bin_edbus_edbus_codegen_CPPFLAGS = \
55-DPACKAGE_BIN_DIR=\"$(bindir)\" \
56-DPACKAGE_LIB_DIR=\"$(libdir)\" \
57-DPACKAGE_DATA_DIR=\"$(datadir)/edbus\" \
58@EDBUS_CFLAGS@
59
60if HAVE_WIN32
61bin_edbus_edbus_codegen_LDADD = -L$(top_builddir)/src/lib/evil @USE_EDBUS_LIBS@
62else
63bin_edbus_edbus_codegen_LDADD = @USE_EDBUS_LIBS@
64endif
65bin_edbus_edbus_codegen_DEPENDENCIES = @USE_EDBUS_INTERNAL_LIBS@
66
67### Unit tests
68
69if EFL_ENABLE_TESTS
70
71check_PROGRAMS += tests/edbus/edbus_suite
72TESTS += tests/edbus/edbus_suite
73
74tests_edbus_edbus_suite_SOURCES = \
75tests/edbus/edbus_suite.c \
76tests/edbus/edbus_test_edbus_init.c \
77tests/edbus/edbus_suite.h
78
79tests_edbus_edbus_suite_CPPFLAGS = @CHECK_CFLAGS@ @EDBUS_CFLAGS@ \
80-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edbus\"
81
82tests_edbus_edbus_suite_LDADD = @CHECK_LIBS@ @USE_EDBUS_LIBS@
83tests_edbus_edbus_suite_DEPENDENCIES = @USE_EDBUS_INTERNAL_LIBS@
84
85endif
diff --git a/src/Makefile_Eldbus.am b/src/Makefile_Eldbus.am
new file mode 100644
index 0000000000..b736e99303
--- /dev/null
+++ b/src/Makefile_Eldbus.am
@@ -0,0 +1,85 @@
1
2### Library
3
4lib_LTLIBRARIES += lib/eldbus/libeldbus.la
5
6installed_eldbusmainheadersdir = $(includedir)/eldbus-@VMAJ@
7dist_installed_eldbusmainheaders_DATA = \
8lib/eldbus/Eldbus.h \
9lib/eldbus/eldbus_connection.h \
10lib/eldbus/eldbus_freedesktop.h \
11lib/eldbus/eldbus_message.h \
12lib/eldbus/eldbus_object.h \
13lib/eldbus/eldbus_pending.h \
14lib/eldbus/eldbus_proxy.h \
15lib/eldbus/eldbus_service.h \
16lib/eldbus/eldbus_signal_handler.h \
17lib/eldbus/eldbus_message_helper.h \
18lib/eldbus/eldbus_message_eina_value.h
19
20lib_eldbus_libeldbus_la_SOURCES = \
21lib/eldbus/eldbus_private.h \
22lib/eldbus/eldbus_private_types.h \
23lib/eldbus/eldbus_proxy.c \
24lib/eldbus/eldbus_core.c \
25lib/eldbus/eldbus_message.c \
26lib/eldbus/eldbus_object.c \
27lib/eldbus/eldbus_pending.c \
28lib/eldbus/eldbus_freedesktop.c \
29lib/eldbus/eldbus_service.c \
30lib/eldbus/eldbus_signal_handler.c \
31lib/eldbus/eldbus_message_helper.c \
32lib/eldbus/eldbus_message_to_eina_value.c \
33lib/eldbus/eldbus_message_from_eina_value.c
34
35lib_eldbus_libeldbus_la_CPPFLAGS = \
36-include $(top_builddir)/config.h \
37@ELDBUS_CFLAGS@
38lib_eldbus_libeldbus_la_LIBADD = @ELDBUS_LIBS@
39lib_eldbus_libeldbus_la_DEPENDENCIES = @ELDBUS_INTERNAL_LIBS@
40lib_eldbus_libeldbus_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
41
42### Binary
43
44bin_PROGRAMS += bin/eldbus/eldbus-codegen
45
46bin_eldbus_eldbus_codegen_SOURCES = \
47bin/eldbus/codegen.h \
48bin/eldbus/utils.c \
49bin/eldbus/parser.c \
50bin/eldbus/dbus.c \
51bin/eldbus/source_client.c \
52bin/eldbus/client.c
53
54bin_eldbus_eldbus_codegen_CPPFLAGS = \
55-DPACKAGE_BIN_DIR=\"$(bindir)\" \
56-DPACKAGE_LIB_DIR=\"$(libdir)\" \
57-DPACKAGE_DATA_DIR=\"$(datadir)/eldbus\" \
58@ELDBUS_CFLAGS@
59
60if HAVE_WIN32
61bin_eldbus_eldbus_codegen_LDADD = -L$(top_builddir)/src/lib/evil @USE_ELDBUS_LIBS@
62else
63bin_eldbus_eldbus_codegen_LDADD = @USE_ELDBUS_LIBS@
64endif
65bin_eldbus_eldbus_codegen_DEPENDENCIES = @USE_ELDBUS_INTERNAL_LIBS@
66
67### Unit tests
68
69if EFL_ENABLE_TESTS
70
71check_PROGRAMS += tests/eldbus/eldbus_suite
72TESTS += tests/eldbus/eldbus_suite
73
74tests_eldbus_eldbus_suite_SOURCES = \
75tests/eldbus/eldbus_suite.c \
76tests/eldbus/eldbus_test_eldbus_init.c \
77tests/eldbus/eldbus_suite.h
78
79tests_eldbus_eldbus_suite_CPPFLAGS = @CHECK_CFLAGS@ @ELDBUS_CFLAGS@ \
80-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eldbus\"
81
82tests_eldbus_eldbus_suite_LDADD = @CHECK_LIBS@ @USE_ELDBUS_LIBS@
83tests_eldbus_eldbus_suite_DEPENDENCIES = @USE_ELDBUS_INTERNAL_LIBS@
84
85endif
diff --git a/src/bin/efreet/efreetd_dbus.c b/src/bin/efreet/efreetd_dbus.c
index 0b305ea6f4..82a66c179f 100644
--- a/src/bin/efreet/efreetd_dbus.c
+++ b/src/bin/efreet/efreetd_dbus.c
@@ -3,7 +3,7 @@
3#endif 3#endif
4 4
5#include <Ecore.h> 5#include <Ecore.h>
6#include <EDBus.h> 6#include <Eldbus.h>
7 7
8#include "efreetd.h" 8#include "efreetd.h"
9#include "efreetd_cache.h" 9#include "efreetd_cache.h"
@@ -19,8 +19,8 @@ enum
19 EFREET_SIGNAL_DESKTOP_CACHE_UPDATE 19 EFREET_SIGNAL_DESKTOP_CACHE_UPDATE
20}; 20};
21 21
22static EDBus_Connection *conn; 22static Eldbus_Connection *conn;
23static EDBus_Service_Interface *iface; 23static Eldbus_Service_Interface *iface;
24 24
25static Ecore_Timer *_shutdown = NULL; 25static Ecore_Timer *_shutdown = NULL;
26static int clients = 0; 26static int clients = 0;
@@ -33,7 +33,7 @@ do_shutdown(void *data EINA_UNUSED)
33} 33}
34 34
35static void 35static void
36disconnected(void *context EINA_UNUSED, EDBus_Connection *connection EINA_UNUSED, void *event_info EINA_UNUSED) 36disconnected(void *context EINA_UNUSED, Eldbus_Connection *connection EINA_UNUSED, void *event_info EINA_UNUSED)
37{ 37{
38 INF("disconnected"); 38 INF("disconnected");
39 quit(); 39 quit();
@@ -44,7 +44,7 @@ client_name_owner_changed_cb(void *data EINA_UNUSED, const char *bus, const char
44{ 44{
45 if (new_id[0]) 45 if (new_id[0])
46 return; 46 return;
47 edbus_name_owner_changed_callback_del(conn, bus, 47 eldbus_name_owner_changed_callback_del(conn, bus,
48 client_name_owner_changed_cb, NULL); 48 client_name_owner_changed_cb, NULL);
49 clients--; 49 clients--;
50 if (clients <= 0) 50 if (clients <= 0)
@@ -55,13 +55,13 @@ client_name_owner_changed_cb(void *data EINA_UNUSED, const char *bus, const char
55 } 55 }
56} 56}
57 57
58static EDBus_Message * 58static Eldbus_Message *
59do_register(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message *message) 59do_register(const Eldbus_Service_Interface *ifc EINA_UNUSED, const Eldbus_Message *message)
60{ 60{
61 EDBus_Message *reply; 61 Eldbus_Message *reply;
62 const char *lang; 62 const char *lang;
63 63
64 if (!edbus_message_arguments_get(message, "s", &lang)) 64 if (!eldbus_message_arguments_get(message, "s", &lang))
65 { 65 {
66 ERR("Error getting arguments."); 66 ERR("Error getting arguments.");
67 return NULL; 67 return NULL;
@@ -72,28 +72,28 @@ do_register(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message
72 if (_shutdown) ecore_timer_del(_shutdown); 72 if (_shutdown) ecore_timer_del(_shutdown);
73 _shutdown = NULL; 73 _shutdown = NULL;
74 74
75 edbus_name_owner_changed_callback_add(conn, 75 eldbus_name_owner_changed_callback_add(conn,
76 edbus_message_sender_get(message), 76 eldbus_message_sender_get(message),
77 client_name_owner_changed_cb, NULL, 77 client_name_owner_changed_cb, NULL,
78 EINA_FALSE); 78 EINA_FALSE);
79 reply = edbus_message_method_return_new(message); 79 reply = eldbus_message_method_return_new(message);
80 edbus_message_arguments_append(reply, "b", cache_desktop_exists()); 80 eldbus_message_arguments_append(reply, "b", cache_desktop_exists());
81 return reply; 81 return reply;
82} 82}
83 83
84static EDBus_Message * 84static Eldbus_Message *
85add_desktop_dirs(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message *message) 85add_desktop_dirs(const Eldbus_Service_Interface *ifc EINA_UNUSED, const Eldbus_Message *message)
86{ 86{
87 EDBus_Message_Iter *array = NULL; 87 Eldbus_Message_Iter *array = NULL;
88 const char *dir; 88 const char *dir;
89 89
90 if (!edbus_message_arguments_get(message, "as", &array)) 90 if (!eldbus_message_arguments_get(message, "as", &array))
91 { 91 {
92 ERR("Error getting arguments."); 92 ERR("Error getting arguments.");
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 while (edbus_message_iter_get_and_next(array, 's', &dir)) 96 while (eldbus_message_iter_get_and_next(array, 's', &dir))
97 { 97 {
98 cache_desktop_dir_add(dir); 98 cache_desktop_dir_add(dir);
99 } 99 }
@@ -101,19 +101,19 @@ add_desktop_dirs(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Mes
101 return NULL; 101 return NULL;
102} 102}
103 103
104static EDBus_Message * 104static Eldbus_Message *
105add_icon_dirs(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message *message) 105add_icon_dirs(const Eldbus_Service_Interface *ifc EINA_UNUSED, const Eldbus_Message *message)
106{ 106{
107 EDBus_Message_Iter *array = NULL; 107 Eldbus_Message_Iter *array = NULL;
108 const char *dir; 108 const char *dir;
109 109
110 if (!edbus_message_arguments_get(message, "as", &array)) 110 if (!eldbus_message_arguments_get(message, "as", &array))
111 { 111 {
112 ERR("Error getting arguments."); 112 ERR("Error getting arguments.");
113 return NULL; 113 return NULL;
114 } 114 }
115 115
116 while (edbus_message_iter_get_and_next(array, 's', &dir)) 116 while (eldbus_message_iter_get_and_next(array, 's', &dir))
117 { 117 {
118 cache_icon_dir_add(dir); 118 cache_icon_dir_add(dir);
119 } 119 }
@@ -121,12 +121,12 @@ add_icon_dirs(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Messag
121 return NULL; 121 return NULL;
122} 122}
123 123
124static EDBus_Message * 124static Eldbus_Message *
125build_desktop_cache(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message *message EINA_UNUSED) 125build_desktop_cache(const Eldbus_Service_Interface *ifc EINA_UNUSED, const Eldbus_Message *message EINA_UNUSED)
126{ 126{
127 const char *lang; 127 const char *lang;
128 128
129 if (!edbus_message_arguments_get(message, "s", &lang)) 129 if (!eldbus_message_arguments_get(message, "s", &lang))
130 { 130 {
131 ERR("Error getting arguments."); 131 ERR("Error getting arguments.");
132 return NULL; 132 return NULL;
@@ -137,19 +137,19 @@ build_desktop_cache(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_
137 return NULL; 137 return NULL;
138} 138}
139 139
140static EDBus_Message * 140static Eldbus_Message *
141add_icon_exts(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Message *message) 141add_icon_exts(const Eldbus_Service_Interface *ifc EINA_UNUSED, const Eldbus_Message *message)
142{ 142{
143 EDBus_Message_Iter *array = NULL; 143 Eldbus_Message_Iter *array = NULL;
144 const char *ext; 144 const char *ext;
145 145
146 if (!edbus_message_arguments_get(message, "as", &array)) 146 if (!eldbus_message_arguments_get(message, "as", &array))
147 { 147 {
148 ERR("Error getting arguments."); 148 ERR("Error getting arguments.");
149 return NULL; 149 return NULL;
150 } 150 }
151 151
152 while (edbus_message_iter_get_and_next(array, 's', &ext)) 152 while (eldbus_message_iter_get_and_next(array, 's', &ext))
153 { 153 {
154 cache_icon_ext_add(ext); 154 cache_icon_ext_add(ext);
155 } 155 }
@@ -157,60 +157,60 @@ add_icon_exts(const EDBus_Service_Interface *ifc EINA_UNUSED, const EDBus_Messag
157 return NULL; 157 return NULL;
158} 158}
159 159
160static const EDBus_Signal signals[] = { 160static const Eldbus_Signal signals[] = {
161 [EFREET_SIGNAL_ICON_CACHE_UPDATE] = {"IconCacheUpdate", EDBUS_ARGS({ "b", "update" }), 0}, 161 [EFREET_SIGNAL_ICON_CACHE_UPDATE] = {"IconCacheUpdate", ELDBUS_ARGS({ "b", "update" }), 0},
162 [EFREET_SIGNAL_DESKTOP_CACHE_UPDATE] = {"DesktopCacheUpdate", EDBUS_ARGS({ "b", "update" }), 0}, 162 [EFREET_SIGNAL_DESKTOP_CACHE_UPDATE] = {"DesktopCacheUpdate", ELDBUS_ARGS({ "b", "update" }), 0},
163 { NULL, NULL, 0 } 163 { NULL, NULL, 0 }
164}; 164};
165 165
166static const EDBus_Method methods[] = { 166static const Eldbus_Method methods[] = {
167 { 167 {
168 "Register", EDBUS_ARGS({"s", "lang info"}), EDBUS_ARGS({"b", "cache exists"}), 168 "Register", ELDBUS_ARGS({"s", "lang info"}), ELDBUS_ARGS({"b", "cache exists"}),
169 do_register, 0 169 do_register, 0
170 }, 170 },
171 { 171 {
172 "AddDesktopDirs", EDBUS_ARGS({"as", "dirs"}), NULL, 172 "AddDesktopDirs", ELDBUS_ARGS({"as", "dirs"}), NULL,
173 add_desktop_dirs, EDBUS_METHOD_FLAG_NOREPLY 173 add_desktop_dirs, ELDBUS_METHOD_FLAG_NOREPLY
174 }, 174 },
175 { 175 {
176 "BuildDesktopCache", EDBUS_ARGS({"s", "lang info"}), NULL, 176 "BuildDesktopCache", ELDBUS_ARGS({"s", "lang info"}), NULL,
177 build_desktop_cache, EDBUS_METHOD_FLAG_NOREPLY 177 build_desktop_cache, ELDBUS_METHOD_FLAG_NOREPLY
178 }, 178 },
179 { 179 {
180 "AddIconDirs", EDBUS_ARGS({"as", "dirs"}), NULL, 180 "AddIconDirs", ELDBUS_ARGS({"as", "dirs"}), NULL,
181 add_icon_dirs, EDBUS_METHOD_FLAG_NOREPLY 181 add_icon_dirs, ELDBUS_METHOD_FLAG_NOREPLY
182 }, 182 },
183 { 183 {
184 "AddIconExts", EDBUS_ARGS({"as", "exts"}), NULL, 184 "AddIconExts", ELDBUS_ARGS({"as", "exts"}), NULL,
185 add_icon_exts, EDBUS_METHOD_FLAG_NOREPLY 185 add_icon_exts, ELDBUS_METHOD_FLAG_NOREPLY
186 }, 186 },
187 { NULL, NULL, NULL, NULL, 0 } 187 { NULL, NULL, NULL, NULL, 0 }
188}; 188};
189 189
190static const EDBus_Service_Interface_Desc desc = { 190static const Eldbus_Service_Interface_Desc desc = {
191 INTERFACE, methods, signals, NULL, NULL, NULL 191 INTERFACE, methods, signals, NULL, NULL, NULL
192}; 192};
193 193
194static void 194static void
195on_name_request(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 195on_name_request(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
196{ 196{
197 unsigned int reply; 197 unsigned int reply;
198 198
199 if (edbus_message_error_get(msg, NULL, NULL)) 199 if (eldbus_message_error_get(msg, NULL, NULL))
200 { 200 {
201 ERR("error on on_name_request"); 201 ERR("error on on_name_request");
202 quit(); 202 quit();
203 return; 203 return;
204 } 204 }
205 205
206 if (!edbus_message_arguments_get(msg, "u", &reply)) 206 if (!eldbus_message_arguments_get(msg, "u", &reply))
207 { 207 {
208 ERR("error getting arguments on on_name_request"); 208 ERR("error getting arguments on on_name_request");
209 quit(); 209 quit();
210 return; 210 return;
211 } 211 }
212 212
213 if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER) 213 if (reply != ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)
214 { 214 {
215 ERR("error name already in use"); 215 ERR("error name already in use");
216 quit(); 216 quit();
@@ -223,40 +223,40 @@ on_name_request(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending
223void 223void
224send_signal_icon_cache_update(Eina_Bool update) 224send_signal_icon_cache_update(Eina_Bool update)
225{ 225{
226 edbus_service_signal_emit(iface, EFREET_SIGNAL_ICON_CACHE_UPDATE, update); 226 eldbus_service_signal_emit(iface, EFREET_SIGNAL_ICON_CACHE_UPDATE, update);
227} 227}
228 228
229void 229void
230send_signal_desktop_cache_update(Eina_Bool update) 230send_signal_desktop_cache_update(Eina_Bool update)
231{ 231{
232 edbus_service_signal_emit(iface, EFREET_SIGNAL_DESKTOP_CACHE_UPDATE, update); 232 eldbus_service_signal_emit(iface, EFREET_SIGNAL_DESKTOP_CACHE_UPDATE, update);
233} 233}
234 234
235Eina_Bool 235Eina_Bool
236dbus_init(void) 236dbus_init(void)
237{ 237{
238 if (!edbus_init()) return EINA_FALSE; 238 if (!eldbus_init()) return EINA_FALSE;
239 239
240 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION); 240 conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
241 if (!conn) goto conn_error; 241 if (!conn) goto conn_error;
242 242
243 edbus_connection_event_callback_add(conn, 243 eldbus_connection_event_callback_add(conn,
244 EDBUS_CONNECTION_EVENT_DISCONNECTED, disconnected, NULL); 244 ELDBUS_CONNECTION_EVENT_DISCONNECTED, disconnected, NULL);
245 iface = edbus_service_interface_register(conn, PATH, &desc); 245 iface = eldbus_service_interface_register(conn, PATH, &desc);
246 edbus_name_request(conn, BUS, EDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE, 246 eldbus_name_request(conn, BUS, ELDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE,
247 on_name_request, NULL); 247 on_name_request, NULL);
248 248
249 return EINA_TRUE; 249 return EINA_TRUE;
250conn_error: 250conn_error:
251 edbus_shutdown(); 251 eldbus_shutdown();
252 return EINA_FALSE; 252 return EINA_FALSE;
253} 253}
254 254
255Eina_Bool 255Eina_Bool
256dbus_shutdown(void) 256dbus_shutdown(void)
257{ 257{
258 edbus_connection_unref(conn); 258 eldbus_connection_unref(conn);
259 edbus_shutdown(); 259 eldbus_shutdown();
260 return EINA_TRUE; 260 return EINA_TRUE;
261 261
262} 262}
diff --git a/src/bin/edbus/client.c b/src/bin/eldbus/client.c
index 742a294e27..feca0841de 100644
--- a/src/bin/edbus/client.c
+++ b/src/bin/eldbus/client.c
@@ -1,7 +1,7 @@
1#include "codegen.h" 1#include "codegen.h"
2 2
3static const Ecore_Getopt optdesc = { 3static const Ecore_Getopt optdesc = {
4 "edbus_codegen", 4 "eldbus_codegen",
5 "%prog [options] <file.xml>", 5 "%prog [options] <file.xml>",
6 "1.0", 6 "1.0",
7 "(C) 2012 - The Enlightenment Project", 7 "(C) 2012 - The Enlightenment Project",
diff --git a/src/bin/edbus/codegen.h b/src/bin/eldbus/codegen.h
index ffcaf993ef..ffcaf993ef 100644
--- a/src/bin/edbus/codegen.h
+++ b/src/bin/eldbus/codegen.h
diff --git a/src/bin/edbus/dbus.c b/src/bin/eldbus/dbus.c
index ac9e828f57..ac9e828f57 100644
--- a/src/bin/edbus/dbus.c
+++ b/src/bin/eldbus/dbus.c
diff --git a/src/bin/edbus/parser.c b/src/bin/eldbus/parser.c
index 96a8f9e354..96a8f9e354 100644
--- a/src/bin/edbus/parser.c
+++ b/src/bin/eldbus/parser.c
diff --git a/src/bin/edbus/source_client.c b/src/bin/eldbus/source_client.c
index 6d3a34d57e..3d0bf437f4 100644
--- a/src/bin/edbus/source_client.c
+++ b/src/bin/eldbus/source_client.c
@@ -51,7 +51,7 @@ dbus_type2c_type2(const char *dbus_type, Eina_Bool with_const)
51 case 'v'://variant 51 case 'v'://variant
52 case '{'://dict 52 case '{'://dict
53 case '('://struct 53 case '('://struct
54 return "EDBus_Message_Iter *"; 54 return "Eldbus_Message_Iter *";
55 default: 55 default:
56 { 56 {
57 printf("Error type not handled: %c\n", dbus_type[0]); 57 printf("Error type not handled: %c\n", dbus_type[0]);
@@ -81,39 +81,39 @@ source_client_complex_method_call_generate(const DBus_Method *method, Eina_Strbu
81 81
82 if (method->no_reply) 82 if (method->no_reply)
83 { 83 {
84 eina_strbuf_append_printf(h, "void %s_call(EDBus_Proxy *proxy, Eina_Value *args);\n", prefix_append(method->c_name)); 84 eina_strbuf_append_printf(h, "void %s_call(Eldbus_Proxy *proxy, Eina_Value *args);\n", prefix_append(method->c_name));
85 85
86 eina_strbuf_append_printf(c_code, "\nvoid \n%s_call(EDBus_Proxy *proxy, Eina_Value *args)\n{\n", prefix_append(method->c_name)); 86 eina_strbuf_append_printf(c_code, "\nvoid \n%s_call(Eldbus_Proxy *proxy, Eina_Value *args)\n{\n", prefix_append(method->c_name));
87 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN(proxy);\n"); 87 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN(proxy);\n");
88 eina_strbuf_append_printf(c_code, " EDBus_Message *msg = edbus_proxy_method_call_new(proxy, \"%s\");\n", method->name); 88 eina_strbuf_append_printf(c_code, " Eldbus_Message *msg = eldbus_proxy_method_call_new(proxy, \"%s\");\n", method->name);
89 eina_strbuf_append_printf(c_code, " if (!edbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature)); 89 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature));
90 eina_strbuf_append_printf(c_code, " {\n"); 90 eina_strbuf_append_printf(c_code, " {\n");
91 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n"); 91 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n");
92 eina_strbuf_append_printf(c_code, " return;\n"); 92 eina_strbuf_append_printf(c_code, " return;\n");
93 eina_strbuf_append_printf(c_code, " }\n"); 93 eina_strbuf_append_printf(c_code, " }\n");
94 eina_strbuf_append_printf(c_code, " edbus_proxy_send(proxy, msg, %s, NULL, NULL, -1);\n", method->cb_name); 94 eina_strbuf_append_printf(c_code, " eldbus_proxy_send(proxy, msg, %s, NULL, NULL, -1);\n", method->cb_name);
95 eina_strbuf_append_printf(c_code, "}\n"); 95 eina_strbuf_append_printf(c_code, "}\n");
96 goto end; 96 goto end;
97 } 97 }
98 98
99 eina_strbuf_append_printf(h, "EDBus_Pending *%s_call", prefix_append(method->c_name)); 99 eina_strbuf_append_printf(h, "Eldbus_Pending *%s_call", prefix_append(method->c_name));
100 eina_strbuf_append_printf(h, "(EDBus_Proxy *proxy, %s cb, const void *data, Eina_Value *args);\n", prefix_append(method->function_cb)); 100 eina_strbuf_append_printf(h, "(Eldbus_Proxy *proxy, %s cb, const void *data, Eina_Value *args);\n", prefix_append(method->function_cb));
101 101
102 eina_strbuf_append_printf(c_code, "\nEDBus_Pending *\n%s_call(", prefix_append(method->c_name)); 102 eina_strbuf_append_printf(c_code, "\nEldbus_Pending *\n%s_call(", prefix_append(method->c_name));
103 eina_strbuf_append_printf(c_code, "EDBus_Proxy *proxy, %s cb, const void *data, Eina_Value *args)\n{\n", prefix_append(method->function_cb)); 103 eina_strbuf_append_printf(c_code, "Eldbus_Proxy *proxy, %s cb, const void *data, Eina_Value *args)\n{\n", prefix_append(method->function_cb));
104 eina_strbuf_append_printf(c_code, " EDBus_Message *msg;\n"); 104 eina_strbuf_append_printf(c_code, " Eldbus_Message *msg;\n");
105 eina_strbuf_append_printf(c_code, " EDBus_Pending *p;\n"); 105 eina_strbuf_append_printf(c_code, " Eldbus_Pending *p;\n");
106 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n"); 106 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n");
107 eina_strbuf_append_printf(c_code, " msg = edbus_proxy_method_call_new(proxy, \"%s\");\n", method->name); 107 eina_strbuf_append_printf(c_code, " msg = eldbus_proxy_method_call_new(proxy, \"%s\");\n", method->name);
108 eina_strbuf_append_printf(c_code, " if (!edbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature)); 108 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature));
109 eina_strbuf_append_printf(c_code, " {\n"); 109 eina_strbuf_append_printf(c_code, " {\n");
110 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n"); 110 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n");
111 eina_strbuf_append_printf(c_code, " return NULL;\n"); 111 eina_strbuf_append_printf(c_code, " return NULL;\n");
112 eina_strbuf_append_printf(c_code, " }\n"); 112 eina_strbuf_append_printf(c_code, " }\n");
113 eina_strbuf_append_printf(c_code, " p = edbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name); 113 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name);
114 eina_strbuf_append_printf(c_code, " if (data)\n"); 114 eina_strbuf_append_printf(c_code, " if (data)\n");
115 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__user_data\", data);\n"); 115 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__user_data\", data);\n");
116 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__proxy\", proxy);\n"); 116 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__proxy\", proxy);\n");
117 eina_strbuf_append_printf(c_code, " return p;\n"); 117 eina_strbuf_append_printf(c_code, " return p;\n");
118 eina_strbuf_append_printf(c_code, "}\n"); 118 eina_strbuf_append_printf(c_code, "}\n");
119 119
@@ -128,8 +128,8 @@ source_client_simple_method_call_no_reply_generate(const DBus_Method *method, Ei
128 Eina_Strbuf *full_signature = eina_strbuf_new(); 128 Eina_Strbuf *full_signature = eina_strbuf_new();
129 Eina_Strbuf *args_call = eina_strbuf_new(); 129 Eina_Strbuf *args_call = eina_strbuf_new();
130 130
131 eina_strbuf_append_printf(h, "void %s_call(EDBus_Proxy *proxy", prefix_append(method->c_name)); 131 eina_strbuf_append_printf(h, "void %s_call(Eldbus_Proxy *proxy", prefix_append(method->c_name));
132 eina_strbuf_append_printf(c_code, "\nvoid\n%s_call(EDBus_Proxy *proxy", prefix_append(method->c_name)); 132 eina_strbuf_append_printf(c_code, "\nvoid\n%s_call(Eldbus_Proxy *proxy", prefix_append(method->c_name));
133 133
134 EINA_INLIST_FOREACH(method->args, arg) 134 EINA_INLIST_FOREACH(method->args, arg)
135 { 135 {
@@ -143,15 +143,15 @@ source_client_simple_method_call_no_reply_generate(const DBus_Method *method, Ei
143 eina_strbuf_append_printf(h, ");\n"); 143 eina_strbuf_append_printf(h, ");\n");
144 eina_strbuf_append_printf(c_code, ")\n{\n"); 144 eina_strbuf_append_printf(c_code, ")\n{\n");
145 145
146 eina_strbuf_append_printf(c_code, " EDBus_Message *msg;\n"); 146 eina_strbuf_append_printf(c_code, " Eldbus_Message *msg;\n");
147 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN(proxy);\n"); 147 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN(proxy);\n");
148 eina_strbuf_append_printf(c_code, " msg = edbus_proxy_method_call_new(proxy, \"%s\");\n", method->name); 148 eina_strbuf_append_printf(c_code, " msg = eldbus_proxy_method_call_new(proxy, \"%s\");\n", method->name);
149 eina_strbuf_append_printf(c_code, " if (!edbus_message_arguments_append(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(args_call)); 149 eina_strbuf_append_printf(c_code, " if (!eldbus_message_arguments_append(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(args_call));
150 eina_strbuf_append_printf(c_code, " {\n"); 150 eina_strbuf_append_printf(c_code, " {\n");
151 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message.\");\n"); 151 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message.\");\n");
152 eina_strbuf_append_printf(c_code, " return;\n"); 152 eina_strbuf_append_printf(c_code, " return;\n");
153 eina_strbuf_append_printf(c_code, " }\n"); 153 eina_strbuf_append_printf(c_code, " }\n");
154 eina_strbuf_append_printf(c_code, " edbus_proxy_send(proxy, msg, NULL, NULL, -1);\n"); 154 eina_strbuf_append_printf(c_code, " eldbus_proxy_send(proxy, msg, NULL, NULL, -1);\n");
155 eina_strbuf_append_printf(c_code, "}\n"); 155 eina_strbuf_append_printf(c_code, "}\n");
156 156
157 eina_strbuf_free(full_signature); 157 eina_strbuf_free(full_signature);
@@ -165,10 +165,10 @@ source_client_simple_method_call_generate(const DBus_Method *method, Eina_Strbuf
165 Eina_Strbuf *full_signature = eina_strbuf_new(); 165 Eina_Strbuf *full_signature = eina_strbuf_new();
166 Eina_Strbuf *args_call = eina_strbuf_new(); 166 Eina_Strbuf *args_call = eina_strbuf_new();
167 167
168 eina_strbuf_append_printf(h, "EDBus_Pending *%s_call", prefix_append(method->c_name)); 168 eina_strbuf_append_printf(h, "Eldbus_Pending *%s_call", prefix_append(method->c_name));
169 eina_strbuf_append_printf(h, "(EDBus_Proxy *proxy, %s cb, const void *data", prefix_append(method->function_cb)); 169 eina_strbuf_append_printf(h, "(Eldbus_Proxy *proxy, %s cb, const void *data", prefix_append(method->function_cb));
170 eina_strbuf_append_printf(c_code, "\nEDBus_Pending *\n%s_call", prefix_append(method->c_name)); 170 eina_strbuf_append_printf(c_code, "\nEldbus_Pending *\n%s_call", prefix_append(method->c_name));
171 eina_strbuf_append_printf(c_code, "(EDBus_Proxy *proxy, %s cb, const void *data", prefix_append(method->function_cb)); 171 eina_strbuf_append_printf(c_code, "(Eldbus_Proxy *proxy, %s cb, const void *data", prefix_append(method->function_cb));
172 172
173 EINA_INLIST_FOREACH(method->args, arg) 173 EINA_INLIST_FOREACH(method->args, arg)
174 { 174 {
@@ -182,19 +182,19 @@ source_client_simple_method_call_generate(const DBus_Method *method, Eina_Strbuf
182 eina_strbuf_append_printf(h, ");\n"); 182 eina_strbuf_append_printf(h, ");\n");
183 eina_strbuf_append_printf(c_code,")\n{\n"); 183 eina_strbuf_append_printf(c_code,")\n{\n");
184 184
185 eina_strbuf_append_printf(c_code, " EDBus_Message *msg;\n"); 185 eina_strbuf_append_printf(c_code, " Eldbus_Message *msg;\n");
186 eina_strbuf_append_printf(c_code, " EDBus_Pending *p;\n"); 186 eina_strbuf_append_printf(c_code, " Eldbus_Pending *p;\n");
187 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n"); 187 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n");
188 eina_strbuf_append_printf(c_code, " msg = edbus_proxy_method_call_new(proxy, \"%s\");\n", method->name); 188 eina_strbuf_append_printf(c_code, " msg = eldbus_proxy_method_call_new(proxy, \"%s\");\n", method->name);
189 eina_strbuf_append_printf(c_code, " if (!edbus_message_arguments_append(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(args_call)); 189 eina_strbuf_append_printf(c_code, " if (!eldbus_message_arguments_append(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(args_call));
190 eina_strbuf_append_printf(c_code, " {\n"); 190 eina_strbuf_append_printf(c_code, " {\n");
191 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message.\");\n"); 191 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message.\");\n");
192 eina_strbuf_append_printf(c_code, " return NULL;\n"); 192 eina_strbuf_append_printf(c_code, " return NULL;\n");
193 eina_strbuf_append_printf(c_code, " }\n"); 193 eina_strbuf_append_printf(c_code, " }\n");
194 eina_strbuf_append_printf(c_code, " p = edbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name); 194 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name);
195 eina_strbuf_append_printf(c_code, " if (data)\n"); 195 eina_strbuf_append_printf(c_code, " if (data)\n");
196 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__user_data\", data);\n"); 196 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__user_data\", data);\n");
197 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__proxy\", proxy);\n"); 197 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__proxy\", proxy);\n");
198 eina_strbuf_append_printf(c_code, " return p;\n"); 198 eina_strbuf_append_printf(c_code, " return p;\n");
199 eina_strbuf_append_printf(c_code, "}\n"); 199 eina_strbuf_append_printf(c_code, "}\n");
200 200
@@ -205,21 +205,21 @@ source_client_simple_method_call_generate(const DBus_Method *method, Eina_Strbuf
205static void 205static void
206source_client_complex_method_callback_generate(const DBus_Method *method, Eina_Strbuf *c_code, Eina_Strbuf *h) 206source_client_complex_method_callback_generate(const DBus_Method *method, Eina_Strbuf *c_code, Eina_Strbuf *h)
207{ 207{
208 eina_strbuf_append_printf(h, "typedef void (*%s)(EDBus_Proxy *proxy, void *data, EDBus_Pending *pending, EDBus_Error_Info *error, Eina_Value *args);\n", prefix_append(method->function_cb)); 208 eina_strbuf_append_printf(h, "typedef void (*%s)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error, Eina_Value *args);\n", prefix_append(method->function_cb));
209 209
210 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const EDBus_Message *msg, EDBus_Pending *pending)\n{\n", method->cb_name); 210 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)\n{\n", method->cb_name);
211 eina_strbuf_append_printf(c_code, " void *user_data = edbus_pending_data_del(pending, \"__user_data\");\n"); 211 eina_strbuf_append_printf(c_code, " void *user_data = eldbus_pending_data_del(pending, \"__user_data\");\n");
212 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prefix_append(method->function_cb)); 212 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prefix_append(method->function_cb));
213 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n"); 213 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n");
214 eina_strbuf_append_printf(c_code, " Eina_Value *value;\n"); 214 eina_strbuf_append_printf(c_code, " Eina_Value *value;\n");
215 eina_strbuf_append_printf(c_code, " EDBus_Proxy *proxy = edbus_pending_data_del(pending, \"__proxy\");\n"); 215 eina_strbuf_append_printf(c_code, " Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, \"__proxy\");\n");
216 eina_strbuf_append_printf(c_code, " if (edbus_message_error_get(msg, &error, &error_msg))\n"); 216 eina_strbuf_append_printf(c_code, " if (eldbus_message_error_get(msg, &error, &error_msg))\n");
217 eina_strbuf_append_printf(c_code, " {\n"); 217 eina_strbuf_append_printf(c_code, " {\n");
218 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {error, error_msg};\n"); 218 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {error, error_msg};\n");
219 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info, NULL);\n"); 219 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info, NULL);\n");
220 eina_strbuf_append_printf(c_code, " return;\n"); 220 eina_strbuf_append_printf(c_code, " return;\n");
221 eina_strbuf_append_printf(c_code, " }\n"); 221 eina_strbuf_append_printf(c_code, " }\n");
222 eina_strbuf_append_printf(c_code, " value = edbus_message_to_eina_value(msg);\n"); 222 eina_strbuf_append_printf(c_code, " value = eldbus_message_to_eina_value(msg);\n");
223 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, NULL, value);\n"); 223 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, NULL, value);\n");
224 eina_strbuf_append_printf(c_code, " eina_value_free(value);\n"); 224 eina_strbuf_append_printf(c_code, " eina_value_free(value);\n");
225 eina_strbuf_append_printf(c_code, " return;\n"); 225 eina_strbuf_append_printf(c_code, " return;\n");
@@ -234,13 +234,13 @@ source_client_simple_method_callback_generate(const DBus_Method *method, Eina_St
234 Eina_Strbuf *end_cb = eina_strbuf_new(); 234 Eina_Strbuf *end_cb = eina_strbuf_new();
235 Eina_Strbuf *arguments_get = eina_strbuf_new(); 235 Eina_Strbuf *arguments_get = eina_strbuf_new();
236 236
237 eina_strbuf_append_printf(h, "typedef void (*%s)(EDBus_Proxy *proxy, void *data, EDBus_Pending *pending, EDBus_Error_Info *error", prefix_append(method->function_cb)); 237 eina_strbuf_append_printf(h, "typedef void (*%s)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error", prefix_append(method->function_cb));
238 238
239 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const EDBus_Message *msg, EDBus_Pending *pending)\n{\n", method->cb_name); 239 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)\n{\n", method->cb_name);
240 eina_strbuf_append_printf(c_code, " void *user_data = edbus_pending_data_del(pending, \"__user_data\");\n"); 240 eina_strbuf_append_printf(c_code, " void *user_data = eldbus_pending_data_del(pending, \"__user_data\");\n");
241 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prefix_append(method->function_cb)); 241 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prefix_append(method->function_cb));
242 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n"); 242 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n");
243 eina_strbuf_append_printf(c_code, " EDBus_Proxy *proxy = edbus_pending_data_del(pending, \"__proxy\");\n"); 243 eina_strbuf_append_printf(c_code, " Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, \"__proxy\");\n");
244 244
245 EINA_INLIST_FOREACH(method->args, arg) 245 EINA_INLIST_FOREACH(method->args, arg)
246 { 246 {
@@ -254,16 +254,16 @@ source_client_simple_method_callback_generate(const DBus_Method *method, Eina_St
254 } 254 }
255 eina_strbuf_append_printf(h, ");\n"); 255 eina_strbuf_append_printf(h, ");\n");
256 256
257 eina_strbuf_append_printf(c_code, " if (edbus_message_error_get(msg, &error, &error_msg))\n"); 257 eina_strbuf_append_printf(c_code, " if (eldbus_message_error_get(msg, &error, &error_msg))\n");
258 eina_strbuf_append_printf(c_code, " {\n"); 258 eina_strbuf_append_printf(c_code, " {\n");
259 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {error, error_msg};\n"); 259 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {error, error_msg};\n");
260 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info%s);\n", eina_strbuf_string_get(end_cb)); 260 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info%s);\n", eina_strbuf_string_get(end_cb));
261 eina_strbuf_append_printf(c_code, " return;\n"); 261 eina_strbuf_append_printf(c_code, " return;\n");
262 eina_strbuf_append_printf(c_code, " }\n"); 262 eina_strbuf_append_printf(c_code, " }\n");
263 263
264 eina_strbuf_append_printf(c_code, " if (!edbus_message_arguments_get(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(arguments_get)); 264 eina_strbuf_append_printf(c_code, " if (!eldbus_message_arguments_get(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(arguments_get));
265 eina_strbuf_append_printf(c_code, " {\n"); 265 eina_strbuf_append_printf(c_code, " {\n");
266 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {\"\", \"\"};\n"); 266 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {\"\", \"\"};\n");
267 eina_strbuf_append_printf(c_code, " ERR(\"Error: Getting arguments from message.\");\n"); 267 eina_strbuf_append_printf(c_code, " ERR(\"Error: Getting arguments from message.\");\n");
268 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info%s);\n", eina_strbuf_string_get(end_cb)); 268 eina_strbuf_append_printf(c_code, " cb(proxy, user_data, pending, &error_info%s);\n", eina_strbuf_string_get(end_cb));
269 eina_strbuf_append_printf(c_code, " return;\n"); 269 eina_strbuf_append_printf(c_code, " return;\n");
@@ -308,7 +308,7 @@ source_client_signal_generate(const DBus_Signal *sig, Eina_Strbuf *c_code, Eina_
308 Eina_Strbuf *string_copy = eina_strbuf_new(); 308 Eina_Strbuf *string_copy = eina_strbuf_new();
309 Eina_Strbuf *string_free = eina_strbuf_new(); 309 Eina_Strbuf *string_free = eina_strbuf_new();
310 310
311 eina_strbuf_append_printf(c_init_function, " edbus_proxy_signal_handler_add(proxy, \"%s\", %s, proxy);\n", sig->name, sig->cb_name); 311 eina_strbuf_append_printf(c_init_function, " eldbus_proxy_signal_handler_add(proxy, \"%s\", %s, proxy);\n", sig->name, sig->cb_name);
312 eina_strbuf_append_printf(c_header, "int %s;\n", sig->signal_event); 312 eina_strbuf_append_printf(c_header, "int %s;\n", sig->signal_event);
313 eina_strbuf_append_printf(h, "extern int %s;\n", sig->signal_event); 313 eina_strbuf_append_printf(h, "extern int %s;\n", sig->signal_event);
314 eina_strbuf_append_printf(c_init_function, " if (!%s)\n", sig->signal_event); 314 eina_strbuf_append_printf(c_init_function, " if (!%s)\n", sig->signal_event);
@@ -316,7 +316,7 @@ source_client_signal_generate(const DBus_Signal *sig, Eina_Strbuf *c_code, Eina_
316 316
317 eina_strbuf_append_printf(h, "typedef struct _%s\n", sig->struct_name); 317 eina_strbuf_append_printf(h, "typedef struct _%s\n", sig->struct_name);
318 eina_strbuf_append_printf(h, "{\n"); 318 eina_strbuf_append_printf(h, "{\n");
319 eina_strbuf_append_printf(h, " EDBus_Proxy *proxy;\n"); 319 eina_strbuf_append_printf(h, " Eldbus_Proxy *proxy;\n");
320 320
321 if (sig->complex) 321 if (sig->complex)
322 { 322 {
@@ -351,16 +351,16 @@ jump_simple_stuff:
351 eina_strbuf_append_printf(c_code, "}\n"); 351 eina_strbuf_append_printf(c_code, "}\n");
352 352
353 //cb function 353 //cb function
354 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const EDBus_Message *msg)\n{\n", sig->cb_name); 354 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const Eldbus_Message *msg)\n{\n", sig->cb_name);
355 eina_strbuf_append_printf(c_code, " EDBus_Proxy *proxy = data;\n"); 355 eina_strbuf_append_printf(c_code, " Eldbus_Proxy *proxy = data;\n");
356 eina_strbuf_append_printf(c_code, " %s *s_data = calloc(1, sizeof(%s));\n", sig->struct_name, sig->struct_name); 356 eina_strbuf_append_printf(c_code, " %s *s_data = calloc(1, sizeof(%s));\n", sig->struct_name, sig->struct_name);
357 eina_strbuf_append_printf(c_code, " s_data->proxy = proxy;\n"); 357 eina_strbuf_append_printf(c_code, " s_data->proxy = proxy;\n");
358 if (sig->complex) 358 if (sig->complex)
359 { 359 {
360 eina_strbuf_append_printf(c_code, " s_data->value = edbus_message_to_eina_value(msg);\n"); 360 eina_strbuf_append_printf(c_code, " s_data->value = eldbus_message_to_eina_value(msg);\n");
361 goto end_signal; 361 goto end_signal;
362 } 362 }
363 eina_strbuf_append_printf(c_code, " if (!edbus_message_arguments_get(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(parameters)); 363 eina_strbuf_append_printf(c_code, " if (!eldbus_message_arguments_get(msg, \"%s\"%s))\n", eina_strbuf_string_get(full_signature), eina_strbuf_string_get(parameters));
364 eina_strbuf_append_printf(c_code, " {\n"); 364 eina_strbuf_append_printf(c_code, " {\n");
365 eina_strbuf_append_printf(c_code, " ERR(\"Error: Getting arguments from message.\");\n"); 365 eina_strbuf_append_printf(c_code, " ERR(\"Error: Getting arguments from message.\");\n");
366 eina_strbuf_append_printf(c_code, " return;\n"); 366 eina_strbuf_append_printf(c_code, " return;\n");
@@ -381,31 +381,31 @@ static const char *
381prop_cb_get(const DBus_Property *prop) 381prop_cb_get(const DBus_Property *prop)
382{ 382{
383 if (prop->complex) 383 if (prop->complex)
384 return "EDBus_Codegen_Property_Complex_Get_Cb"; 384 return "Eldbus_Codegen_Property_Complex_Get_Cb";
385 switch (prop->type[0]) 385 switch (prop->type[0])
386 { 386 {
387 case 's': 387 case 's':
388 case 'o': 388 case 'o':
389 return "EDBus_Codegen_Property_String_Get_Cb"; 389 return "Eldbus_Codegen_Property_String_Get_Cb";
390 case 'i': 390 case 'i':
391 case 'h': 391 case 'h':
392 return "EDBus_Codegen_Property_Int32_Get_Cb"; 392 return "Eldbus_Codegen_Property_Int32_Get_Cb";
393 case 'y': 393 case 'y':
394 return "EDBus_Codegen_Property_Byte_Get_Cb"; 394 return "Eldbus_Codegen_Property_Byte_Get_Cb";
395 case 'b': 395 case 'b':
396 return "EDBus_Codegen_Property_Bool_Get_Cb"; 396 return "Eldbus_Codegen_Property_Bool_Get_Cb";
397 case 'n': 397 case 'n':
398 return "EDBus_Codegen_Property_Int16_Get_Cb"; 398 return "Eldbus_Codegen_Property_Int16_Get_Cb";
399 case 'q': 399 case 'q':
400 return "EDBus_Codegen_Property_Uint16_Get_Cb"; 400 return "Eldbus_Codegen_Property_Uint16_Get_Cb";
401 case 'u': 401 case 'u':
402 return "EDBus_Codegen_Property_Uint32_Get_Cb"; 402 return "Eldbus_Codegen_Property_Uint32_Get_Cb";
403 case 'd': 403 case 'd':
404 return "EDBus_Codegen_Property_Double_Get_Cb"; 404 return "Eldbus_Codegen_Property_Double_Get_Cb";
405 case 'x': 405 case 'x':
406 return "EDBus_Codegen_Property_Int64_Get_Cb"; 406 return "Eldbus_Codegen_Property_Int64_Get_Cb";
407 case 't': 407 case 't':
408 return "EDBus_Codegen_Property_Uint64_Get_Cb"; 408 return "Eldbus_Codegen_Property_Uint64_Get_Cb";
409 default: 409 default:
410 return "Unexpected_type"; 410 return "Unexpected_type";
411 } 411 }
@@ -423,33 +423,33 @@ static void
423source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h) 423source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h)
424{ 424{
425 //callback 425 //callback
426 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const EDBus_Message *msg, EDBus_Pending *pending)\n{\n", prop->cb_name); 426 eina_strbuf_append_printf(c_code, "\nstatic void\n%s(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)\n{\n", prop->cb_name);
427 eina_strbuf_append_printf(c_code, " void *user_data = edbus_pending_data_del(pending, \"__user_data\");\n"); 427 eina_strbuf_append_printf(c_code, " void *user_data = eldbus_pending_data_del(pending, \"__user_data\");\n");
428 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n"); 428 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n");
429 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prop_cb_get(prop)); 429 eina_strbuf_append_printf(c_code, " %s cb = data;\n", prop_cb_get(prop));
430 eina_strbuf_append_printf(c_code, " EDBus_Proxy *proxy = edbus_pending_data_del(pending, \"__proxy\");\n"); 430 eina_strbuf_append_printf(c_code, " Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, \"__proxy\");\n");
431 eina_strbuf_append_printf(c_code, " EDBus_Message_Iter *variant;\n"); 431 eina_strbuf_append_printf(c_code, " Eldbus_Message_Iter *variant;\n");
432 if (prop->complex) 432 if (prop->complex)
433 eina_strbuf_append_printf(c_code, " Eina_Value *v, stack_value;\n"); 433 eina_strbuf_append_printf(c_code, " Eina_Value *v, stack_value;\n");
434 else 434 else
435 eina_strbuf_append_printf(c_code, " %sv;\n", dbus_type2c_type(prop->type)); 435 eina_strbuf_append_printf(c_code, " %sv;\n", dbus_type2c_type(prop->type));
436 eina_strbuf_append_printf(c_code, " if (edbus_message_error_get(msg, &error, &error_msg))\n"); 436 eina_strbuf_append_printf(c_code, " if (eldbus_message_error_get(msg, &error, &error_msg))\n");
437 eina_strbuf_append_printf(c_code, " {\n"); 437 eina_strbuf_append_printf(c_code, " {\n");
438 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {error, error_msg};\n"); 438 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {error, error_msg};\n");
439 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type)); 439 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type));
440 eina_strbuf_append_printf(c_code, " return;\n"); 440 eina_strbuf_append_printf(c_code, " return;\n");
441 eina_strbuf_append_printf(c_code, " }\n"); 441 eina_strbuf_append_printf(c_code, " }\n");
442 442
443 eina_strbuf_append_printf(c_code, " if (!edbus_message_arguments_get(msg, \"v\", &variant))\n"); 443 eina_strbuf_append_printf(c_code, " if (!eldbus_message_arguments_get(msg, \"v\", &variant))\n");
444 eina_strbuf_append_printf(c_code, " {\n"); 444 eina_strbuf_append_printf(c_code, " {\n");
445 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {\"\", \"\"};\n"); 445 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {\"\", \"\"};\n");
446 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type)); 446 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type));
447 eina_strbuf_append_printf(c_code, " return;\n"); 447 eina_strbuf_append_printf(c_code, " return;\n");
448 eina_strbuf_append_printf(c_code, " }\n"); 448 eina_strbuf_append_printf(c_code, " }\n");
449 449
450 if (prop->complex) 450 if (prop->complex)
451 { 451 {
452 eina_strbuf_append_printf(c_code, " v = edbus_message_iter_struct_like_to_eina_value(variant);\n"); 452 eina_strbuf_append_printf(c_code, " v = eldbus_message_iter_struct_like_to_eina_value(variant);\n");
453 eina_strbuf_append_printf(c_code, " eina_value_struct_value_get(v, \"arg0\", &stack_value);\n"); 453 eina_strbuf_append_printf(c_code, " eina_value_struct_value_get(v, \"arg0\", &stack_value);\n");
454 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, NULL, &stack_value);\n", prop->name); 454 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, NULL, &stack_value);\n", prop->name);
455 eina_strbuf_append_printf(c_code, " eina_value_flush(&stack_value);\n"); 455 eina_strbuf_append_printf(c_code, " eina_value_flush(&stack_value);\n");
@@ -457,9 +457,9 @@ source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_co
457 } 457 }
458 else 458 else
459 { 459 {
460 eina_strbuf_append_printf(c_code, " if (!edbus_message_iter_arguments_get(variant, \"%s\", &v))\n", prop->type); 460 eina_strbuf_append_printf(c_code, " if (!eldbus_message_iter_arguments_get(variant, \"%s\", &v))\n", prop->type);
461 eina_strbuf_append_printf(c_code, " {\n"); 461 eina_strbuf_append_printf(c_code, " {\n");
462 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {\"\", \"\"};\n"); 462 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {\"\", \"\"};\n");
463 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type)); 463 eina_strbuf_append_printf(c_code, " cb(user_data, pending, \"%s\", proxy, &error_info, %s);\n", prop->name, null_or_zero(prop->type));
464 eina_strbuf_append_printf(c_code, " return;\n"); 464 eina_strbuf_append_printf(c_code, " return;\n");
465 eina_strbuf_append_printf(c_code, " }\n"); 465 eina_strbuf_append_printf(c_code, " }\n");
@@ -468,15 +468,15 @@ source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_co
468 eina_strbuf_append_printf(c_code, "}\n"); 468 eina_strbuf_append_printf(c_code, "}\n");
469 469
470 //call 470 //call
471 eina_strbuf_append_printf(h, "EDBus_Pending *%s_propget(EDBus_Proxy *proxy, %s cb, const void *data);\n", prefix_append(prop->c_name), prop_cb_get(prop)); 471 eina_strbuf_append_printf(h, "Eldbus_Pending *%s_propget(Eldbus_Proxy *proxy, %s cb, const void *data);\n", prefix_append(prop->c_name), prop_cb_get(prop));
472 472
473 eina_strbuf_append_printf(c_code, "\nEDBus_Pending *\n%s_propget(EDBus_Proxy *proxy, %s cb, const void *data)\n{\n", prefix_append(prop->c_name), prop_cb_get(prop)); 473 eina_strbuf_append_printf(c_code, "\nEldbus_Pending *\n%s_propget(Eldbus_Proxy *proxy, %s cb, const void *data)\n{\n", prefix_append(prop->c_name), prop_cb_get(prop));
474 eina_strbuf_append_printf(c_code, " EDBus_Pending *p;\n"); 474 eina_strbuf_append_printf(c_code, " Eldbus_Pending *p;\n");
475 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n"); 475 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n");
476 eina_strbuf_append_printf(c_code, " p = edbus_proxy_property_get(proxy, \"%s\", %s, cb);\n", prop->name, prop->cb_name); 476 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_property_get(proxy, \"%s\", %s, cb);\n", prop->name, prop->cb_name);
477 eina_strbuf_append_printf(c_code, " if (data)\n"); 477 eina_strbuf_append_printf(c_code, " if (data)\n");
478 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__user_data\", data);\n"); 478 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__user_data\", data);\n");
479 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__proxy\", proxy);\n"); 479 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__proxy\", proxy);\n");
480 eina_strbuf_append_printf(c_code, " return p;\n"); 480 eina_strbuf_append_printf(c_code, " return p;\n");
481 eina_strbuf_append_printf(c_code, "}\n"); 481 eina_strbuf_append_printf(c_code, "}\n");
482} 482}
@@ -485,14 +485,14 @@ static void
485source_client_property_generate_set(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h) 485source_client_property_generate_set(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h)
486{ 486{
487 //callback 487 //callback
488 eina_strbuf_append_printf(c_code, "\nstatic void\n%s_set(void *data, const EDBus_Message *msg, EDBus_Pending *pending)\n{\n", prop->cb_name); 488 eina_strbuf_append_printf(c_code, "\nstatic void\n%s_set(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)\n{\n", prop->cb_name);
489 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n"); 489 eina_strbuf_append_printf(c_code, " const char *error, *error_msg;\n");
490 eina_strbuf_append_printf(c_code, " void *user_data = edbus_pending_data_del(pending, \"__user_data\");\n"); 490 eina_strbuf_append_printf(c_code, " void *user_data = eldbus_pending_data_del(pending, \"__user_data\");\n");
491 eina_strbuf_append_printf(c_code, " EDBus_Proxy *proxy = edbus_pending_data_del(pending, \"__proxy\");\n"); 491 eina_strbuf_append_printf(c_code, " Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, \"__proxy\");\n");
492 eina_strbuf_append_printf(c_code, " EDBus_Codegen_Property_Set_Cb cb = data;\n"); 492 eina_strbuf_append_printf(c_code, " Eldbus_Codegen_Property_Set_Cb cb = data;\n");
493 eina_strbuf_append_printf(c_code, " if (edbus_message_error_get(msg, &error, &error_msg))"); 493 eina_strbuf_append_printf(c_code, " if (eldbus_message_error_get(msg, &error, &error_msg))");
494 eina_strbuf_append_printf(c_code, " {\n"); 494 eina_strbuf_append_printf(c_code, " {\n");
495 eina_strbuf_append_printf(c_code, " EDBus_Error_Info error_info = {error, error_msg};\n\n"); 495 eina_strbuf_append_printf(c_code, " Eldbus_Error_Info error_info = {error, error_msg};\n\n");
496 eina_strbuf_append_printf(c_code, " cb(user_data, \"%s\", proxy, pending, &error_info);\n", prop->name); 496 eina_strbuf_append_printf(c_code, " cb(user_data, \"%s\", proxy, pending, &error_info);\n", prop->name);
497 eina_strbuf_append_printf(c_code, " return;\n"); 497 eina_strbuf_append_printf(c_code, " return;\n");
498 eina_strbuf_append_printf(c_code, " }\n"); 498 eina_strbuf_append_printf(c_code, " }\n");
@@ -500,15 +500,15 @@ source_client_property_generate_set(const DBus_Property *prop, Eina_Strbuf *c_co
500 eina_strbuf_append_printf(c_code, "}\n"); 500 eina_strbuf_append_printf(c_code, "}\n");
501 501
502 //call 502 //call
503 eina_strbuf_append_printf(h, "EDBus_Pending *%s_propset(EDBus_Proxy *proxy, EDBus_Codegen_Property_Set_Cb cb, const void *data, const void *value);\n", prefix_append(prop->c_name)); 503 eina_strbuf_append_printf(h, "Eldbus_Pending *%s_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value);\n", prefix_append(prop->c_name));
504 504
505 eina_strbuf_append_printf(c_code, "\nEDBus_Pending *\n%s_propset(EDBus_Proxy *proxy, EDBus_Codegen_Property_Set_Cb cb, const void *data, const void *value)\n{\n", prop->c_name); 505 eina_strbuf_append_printf(c_code, "\nEldbus_Pending *\n%s_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value)\n{\n", prop->c_name);
506 eina_strbuf_append_printf(c_code, " EDBus_Pending *p;\n"); 506 eina_strbuf_append_printf(c_code, " Eldbus_Pending *p;\n");
507 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n"); 507 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);\n");
508 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);\n"); 508 eina_strbuf_append_printf(c_code, " EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);\n");
509 eina_strbuf_append_printf(c_code, " p = edbus_proxy_property_set(proxy, \"%s\", \"%s\", value, %s_set, data);\n", prop->name, prop->type, prop->cb_name); 509 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_property_set(proxy, \"%s\", \"%s\", value, %s_set, data);\n", prop->name, prop->type, prop->cb_name);
510 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__user_data\", data);\n"); 510 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__user_data\", data);\n");
511 eina_strbuf_append_printf(c_code, " edbus_pending_data_set(p, \"__proxy\", proxy);\n"); 511 eina_strbuf_append_printf(c_code, " eldbus_pending_data_set(p, \"__proxy\", proxy);\n");
512 eina_strbuf_append_printf(c_code, " return p;\n"); 512 eina_strbuf_append_printf(c_code, " return p;\n");
513 eina_strbuf_append_printf(c_code, "}\n"); 513 eina_strbuf_append_printf(c_code, "}\n");
514} 514}
@@ -545,7 +545,7 @@ source_client_generate(DBus_Object *path, const char *prefix, const char *interf
545 c_header = eina_strbuf_new(); 545 c_header = eina_strbuf_new();
546 c_code = eina_strbuf_new(); 546 c_code = eina_strbuf_new();
547 547
548 aux = string_build("EDBUS_%s_H", iface->c_name); 548 aux = string_build("ELDBUS_%s_H", iface->c_name);
549 for (i = 0; aux[i]; i++) 549 for (i = 0; aux[i]; i++)
550 aux[i] = toupper(aux[i]); 550 aux[i] = toupper(aux[i]);
551 eina_strbuf_append_printf(h, "#ifndef %s\n", aux); 551 eina_strbuf_append_printf(h, "#ifndef %s\n", aux);
@@ -554,16 +554,16 @@ source_client_generate(DBus_Object *path, const char *prefix, const char *interf
554 554
555 eina_strbuf_append_printf(h, "#include <Eina.h>\n"); 555 eina_strbuf_append_printf(h, "#include <Eina.h>\n");
556 eina_strbuf_append_printf(h, "#include <Ecore.h>\n"); 556 eina_strbuf_append_printf(h, "#include <Ecore.h>\n");
557 eina_strbuf_append_printf(h, "#include <EDBus.h>\n"); 557 eina_strbuf_append_printf(h, "#include <Eldbus.h>\n");
558 eina_strbuf_append_printf(h, "#include \"edbus_utils.h\"\n\n"); 558 eina_strbuf_append_printf(h, "#include \"eldbus_utils.h\"\n\n");
559 eina_strbuf_append_printf(h, "EDBus_Proxy *%s_proxy_get(EDBus_Connection *conn, const char *bus, const char *path);\n", prefix_append(iface->c_name)); 559 eina_strbuf_append_printf(h, "Eldbus_Proxy *%s_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path);\n", prefix_append(iface->c_name));
560 eina_strbuf_append_printf(h, "void %s_proxy_unref(EDBus_Proxy *proxy);\n", prefix_append(iface->c_name)); 560 eina_strbuf_append_printf(h, "void %s_proxy_unref(Eldbus_Proxy *proxy);\n", prefix_append(iface->c_name));
561 eina_strbuf_append_printf(h, "void %s_log_domain_set(int id);\n", prefix_append(iface->c_name)); 561 eina_strbuf_append_printf(h, "void %s_log_domain_set(int id);\n", prefix_append(iface->c_name));
562 562
563 if (interface_name && output_name) 563 if (interface_name && output_name)
564 eina_strbuf_append_printf(c_header, "#include \"%s.h\"\n\n", output_name); 564 eina_strbuf_append_printf(c_header, "#include \"%s.h\"\n\n", output_name);
565 else 565 else
566 eina_strbuf_append_printf(c_header, "#include \"edbus_%s.h\"\n\n", iface->c_name); 566 eina_strbuf_append_printf(c_header, "#include \"eldbus_%s.h\"\n\n", iface->c_name);
567 567
568 eina_strbuf_append_printf(c_header, "static int _log_main = -1;\n"); 568 eina_strbuf_append_printf(c_header, "static int _log_main = -1;\n");
569 eina_strbuf_append_printf(c_header, "#undef ERR\n"); 569 eina_strbuf_append_printf(c_header, "#undef ERR\n");
@@ -573,20 +573,20 @@ source_client_generate(DBus_Object *path, const char *prefix, const char *interf
573 eina_strbuf_append_printf(c_init_function, " _log_main = id;\n"); 573 eina_strbuf_append_printf(c_init_function, " _log_main = id;\n");
574 eina_strbuf_append_printf(c_init_function, "}\n"); 574 eina_strbuf_append_printf(c_init_function, "}\n");
575 575
576 eina_strbuf_append_printf(c_init_function, "\nvoid\n%s_proxy_unref(EDBus_Proxy *proxy)\n{\n", prefix_append(iface->c_name)); 576 eina_strbuf_append_printf(c_init_function, "\nvoid\n%s_proxy_unref(Eldbus_Proxy *proxy)\n{\n", prefix_append(iface->c_name));
577 eina_strbuf_append_printf(c_init_function, " EDBus_Object *obj = edbus_proxy_object_get(proxy);\n"); 577 eina_strbuf_append_printf(c_init_function, " Eldbus_Object *obj = eldbus_proxy_object_get(proxy);\n");
578 eina_strbuf_append_printf(c_init_function, " edbus_proxy_unref(proxy);\n"); 578 eina_strbuf_append_printf(c_init_function, " eldbus_proxy_unref(proxy);\n");
579 eina_strbuf_append_printf(c_init_function, " edbus_object_unref(obj);\n"); 579 eina_strbuf_append_printf(c_init_function, " eldbus_object_unref(obj);\n");
580 eina_strbuf_append_printf(c_init_function, "}\n"); 580 eina_strbuf_append_printf(c_init_function, "}\n");
581 581
582 eina_strbuf_append_printf(c_init_function, "\nEDBus_Proxy *\n%s_proxy_get(EDBus_Connection *conn, const char *bus, const char *path)\n{\n", prefix_append(iface->c_name)); 582 eina_strbuf_append_printf(c_init_function, "\nEldbus_Proxy *\n%s_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path)\n{\n", prefix_append(iface->c_name));
583 eina_strbuf_append_printf(c_init_function, " EDBus_Object *obj;\n"); 583 eina_strbuf_append_printf(c_init_function, " Eldbus_Object *obj;\n");
584 eina_strbuf_append_printf(c_init_function, " EDBus_Proxy *proxy;\n"); 584 eina_strbuf_append_printf(c_init_function, " Eldbus_Proxy *proxy;\n");
585 eina_strbuf_append_printf(c_init_function, " EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);\n"); 585 eina_strbuf_append_printf(c_init_function, " EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);\n");
586 eina_strbuf_append_printf(c_init_function, " EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);\n"); 586 eina_strbuf_append_printf(c_init_function, " EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);\n");
587 eina_strbuf_append_printf(c_init_function, " if (!path) path = \"%s\";\n", path->name); 587 eina_strbuf_append_printf(c_init_function, " if (!path) path = \"%s\";\n", path->name);
588 eina_strbuf_append_printf(c_init_function, " obj = edbus_object_get(conn, bus, path);\n"); 588 eina_strbuf_append_printf(c_init_function, " obj = eldbus_object_get(conn, bus, path);\n");
589 eina_strbuf_append_printf(c_init_function, " proxy = edbus_proxy_get(obj, \"%s\");\n", iface->name); 589 eina_strbuf_append_printf(c_init_function, " proxy = eldbus_proxy_get(obj, \"%s\");\n", iface->name);
590 590
591 EINA_INLIST_FOREACH(iface->methods, method) 591 EINA_INLIST_FOREACH(iface->methods, method)
592 source_client_method_generate(method, c_code, h); 592 source_client_method_generate(method, c_code, h);
@@ -605,7 +605,7 @@ source_client_generate(DBus_Object *path, const char *prefix, const char *interf
605 if (interface_name && output_name) 605 if (interface_name && output_name)
606 file_name = string_build("%s.h", output_name); 606 file_name = string_build("%s.h", output_name);
607 else 607 else
608 file_name = string_build("edbus_%s.h", iface->c_name); 608 file_name = string_build("eldbus_%s.h", iface->c_name);
609 file_write(file_name, eina_strbuf_string_get(h)); 609 file_write(file_name, eina_strbuf_string_get(h));
610 eina_strbuf_free(h); 610 eina_strbuf_free(h);
611 free(file_name); 611 free(file_name);
@@ -618,7 +618,7 @@ source_client_generate(DBus_Object *path, const char *prefix, const char *interf
618 if (interface_name && output_name) 618 if (interface_name && output_name)
619 file_name = string_build("%s.c", output_name); 619 file_name = string_build("%s.c", output_name);
620 else 620 else
621 file_name = string_build("edbus_%s.c", iface->c_name); 621 file_name = string_build("eldbus_%s.c", iface->c_name);
622 file_write(file_name, eina_strbuf_string_get(c_header)); 622 file_write(file_name, eina_strbuf_string_get(c_header));
623 eina_strbuf_free(c_header); 623 eina_strbuf_free(c_header);
624 free(file_name); 624 free(file_name);
diff --git a/src/bin/edbus/utils.c b/src/bin/eldbus/utils.c
index 47d8c77c19..a020445e1d 100644
--- a/src/bin/edbus/utils.c
+++ b/src/bin/eldbus/utils.c
@@ -132,28 +132,28 @@ string_build(const char *fmt, ...)
132} 132}
133 133
134#define UTIL_H "\ 134#define UTIL_H "\
135#ifndef EDBUS_UTILS_H\n\ 135#ifndef ELDBUS_UTILS_H\n\
136#define EDBUS_UTILS_H 1\n\ 136#define ELDBUS_UTILS_H 1\n\
137\n\ 137\n\
138typedef struct _EDBus_Error_Info\n\ 138typedef struct _Eldbus_Error_Info\n\
139{\n\ 139{\n\
140 const char *error;\n\ 140 const char *error;\n\
141 const char *message;\n\ 141 const char *message;\n\
142} EDBus_Error_Info;\n\ 142} Eldbus_Error_Info;\n\
143\n\ 143\n\
144typedef void (*EDBus_Codegen_Property_Set_Cb)(void *data, const char *propname, EDBus_Proxy *proxy, EDBus_Pending *p, EDBus_Error_Info *error_info);\n\ 144typedef void (*Eldbus_Codegen_Property_Set_Cb)(void *data, const char *propname, Eldbus_Proxy *proxy, Eldbus_Pending *p, Eldbus_Error_Info *error_info);\n\
145\n\ 145\n\
146typedef void (*EDBus_Codegen_Property_String_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, const char *value);\n\ 146typedef void (*Eldbus_Codegen_Property_String_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, const char *value);\n\
147typedef void (*EDBus_Codegen_Property_Int32_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, int value);\n\ 147typedef void (*Eldbus_Codegen_Property_Int32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int value);\n\
148typedef void (*EDBus_Codegen_Property_Byte_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned char value);\n\ 148typedef void (*Eldbus_Codegen_Property_Byte_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned char value);\n\
149typedef void (*EDBus_Codegen_Property_Bool_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, Eina_Bool value);\n\ 149typedef void (*Eldbus_Codegen_Property_Bool_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Bool value);\n\
150typedef void (*EDBus_Codegen_Property_Int16_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, short int value);\n\ 150typedef void (*Eldbus_Codegen_Property_Int16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, short int value);\n\
151typedef void (*EDBus_Codegen_Property_Uint16_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned short int value);\n\ 151typedef void (*Eldbus_Codegen_Property_Uint16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned short int value);\n\
152typedef void (*EDBus_Codegen_Property_Uint32_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned int value);\n\ 152typedef void (*Eldbus_Codegen_Property_Uint32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned int value);\n\
153typedef void (*EDBus_Codegen_Property_Double_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, double value);\n\ 153typedef void (*Eldbus_Codegen_Property_Double_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, double value);\n\
154typedef void (*EDBus_Codegen_Property_Int64_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, int64_t value);\n\ 154typedef void (*Eldbus_Codegen_Property_Int64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int64_t value);\n\
155typedef void (*EDBus_Codegen_Property_Uint64_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, uint64_t value);\n\ 155typedef void (*Eldbus_Codegen_Property_Uint64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, uint64_t value);\n\
156typedef void (*EDBus_Codegen_Property_Complex_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, Eina_Value *value);\n\ 156typedef void (*Eldbus_Codegen_Property_Complex_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Value *value);\n\
157\n\ 157\n\
158#endif\ 158#endif\
159" 159"
@@ -161,5 +161,5 @@ typedef void (*EDBus_Codegen_Property_Complex_Get_Cb)(void *data, EDBus_Pending
161Eina_Bool 161Eina_Bool
162util_h_write(void) 162util_h_write(void)
163{ 163{
164 return file_write("edbus_utils.h", UTIL_H); 164 return file_write("eldbus_utils.h", UTIL_H);
165} 165}
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index a68aed618c..11433ef0e9 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -33,7 +33,7 @@
33#include <Eina.h> 33#include <Eina.h>
34#include <Ecore_Getopt.h> 34#include <Ecore_Getopt.h>
35#include <Ecore.h> 35#include <Ecore.h>
36#include <EDBus.h> 36#include <Eldbus.h>
37#include <Ethumb.h> 37#include <Ethumb.h>
38#include <Ethumb_Client.h> 38#include <Ethumb_Client.h>
39 39
@@ -130,7 +130,7 @@ struct _Ethumbd_Object
130 int id_count; 130 int id_count;
131 int max_id; 131 int max_id;
132 int min_id; 132 int min_id;
133 EDBus_Service_Interface *iface; 133 Eldbus_Service_Interface *iface;
134}; 134};
135 135
136struct _Ethumbd_Queue 136struct _Ethumbd_Queue
@@ -154,7 +154,7 @@ struct _Ethumbd_Slave
154 154
155struct _Ethumbd 155struct _Ethumbd
156{ 156{
157 EDBus_Connection *conn; 157 Eldbus_Connection *conn;
158 Ecore_Idler *idler; 158 Ecore_Idler *idler;
159 Ethumbd_Request *processing; 159 Ethumbd_Request *processing;
160 Ethumbd_Queue queue; 160 Ethumbd_Queue queue;
@@ -194,27 +194,27 @@ const Ecore_Getopt optdesc = {
194 } 194 }
195}; 195};
196 196
197static EDBus_Message *_ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg); 197static Eldbus_Message *_ethumb_dbus_queue_add_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
198static EDBus_Message *_ethumb_dbus_queue_remove_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg); 198static Eldbus_Message *_ethumb_dbus_queue_remove_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
199static EDBus_Message *_ethumb_dbus_queue_clear_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg); 199static Eldbus_Message *_ethumb_dbus_queue_clear_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
200static EDBus_Message *_ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg); 200static Eldbus_Message *_ethumb_dbus_ethumb_setup_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
201static EDBus_Message *_ethumb_dbus_delete_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg); 201static Eldbus_Message *_ethumb_dbus_delete_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
202 202
203static const EDBus_Method _ethumb_dbus_objects_methods[] = { 203static const Eldbus_Method _ethumb_dbus_objects_methods[] = {
204 { 204 {
205 "queue_add", 205 "queue_add",
206 EDBUS_ARGS({"i", "id"}, {"ay", "file"}, {"ay", "key"}, {"ay", "thumb"}, {"ay", "thumb_key"}), 206 ELDBUS_ARGS({"i", "id"}, {"ay", "file"}, {"ay", "key"}, {"ay", "thumb"}, {"ay", "thumb_key"}),
207 EDBUS_ARGS({"i", "queue_id"}), _ethumb_dbus_queue_add_cb, 0 207 ELDBUS_ARGS({"i", "queue_id"}), _ethumb_dbus_queue_add_cb, 0
208 }, 208 },
209 { 209 {
210 "queue_remove", EDBUS_ARGS({"i", "queue_id"}), EDBUS_ARGS({"b", "result"}), 210 "queue_remove", ELDBUS_ARGS({"i", "queue_id"}), ELDBUS_ARGS({"b", "result"}),
211 _ethumb_dbus_queue_remove_cb, 0 211 _ethumb_dbus_queue_remove_cb, 0
212 }, 212 },
213 { 213 {
214 "clear_queue", NULL, NULL, _ethumb_dbus_queue_clear_cb, 0 214 "clear_queue", NULL, NULL, _ethumb_dbus_queue_clear_cb, 0
215 }, 215 },
216 { 216 {
217 "ethumb_setup", EDBUS_ARGS({"a{sv}", "array"}), EDBUS_ARGS({"b", "result"}), 217 "ethumb_setup", ELDBUS_ARGS({"a{sv}", "array"}), ELDBUS_ARGS({"b", "result"}),
218 _ethumb_dbus_ethumb_setup_cb, 0 218 _ethumb_dbus_ethumb_setup_cb, 0
219 }, 219 },
220 { 220 {
@@ -228,9 +228,9 @@ enum
228 ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED = 0, 228 ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED = 0,
229}; 229};
230 230
231static const EDBus_Signal _ethumb_dbus_objects_signals[] = { 231static const Eldbus_Signal _ethumb_dbus_objects_signals[] = {
232 [ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED] = { "generated", 232 [ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED] = { "generated",
233 EDBUS_ARGS({ "i", "id" }, { "ay", "paths" }, { "ay", "keys" }, 233 ELDBUS_ARGS({ "i", "id" }, { "ay", "paths" }, { "ay", "keys" },
234 { "b", "success" }) }, 234 { "b", "success" }) },
235 { } 235 { }
236}; 236};
@@ -851,13 +851,13 @@ _ethumb_table_del(Ethumbd *ed, int i)
851 } 851 }
852 q->nqueue -= q->table[i].nqueue; 852 q->nqueue -= q->table[i].nqueue;
853 853
854 odata = edbus_service_object_data_del(q->table[i].iface, ODATA); 854 odata = eldbus_service_object_data_del(q->table[i].iface, ODATA);
855 edbus_name_owner_changed_callback_del(ed->conn, ed->queue.table[i].client, 855 eldbus_name_owner_changed_callback_del(ed->conn, ed->queue.table[i].client,
856 _name_owner_changed_cb, odata); 856 _name_owner_changed_cb, odata);
857 //this string was not been freed previously 857 //this string was not been freed previously
858 eina_stringshare_del(ed->queue.table[i].client); 858 eina_stringshare_del(ed->queue.table[i].client);
859 free(odata); 859 free(odata);
860 edbus_service_object_unregister(q->table[i].iface); 860 eldbus_service_object_unregister(q->table[i].iface);
861 861
862 memset(&(q->table[i]), 0, sizeof(Ethumbd_Object)); 862 memset(&(q->table[i]), 0, sizeof(Ethumbd_Object));
863 for (j = 0; j < q->count; j++) 863 for (j = 0; j < q->count; j++)
@@ -894,24 +894,24 @@ _name_owner_changed_cb(void *context, const char *bus, const char *old_id, const
894 _ethumb_table_del(ed, odata->idx); 894 _ethumb_table_del(ed, odata->idx);
895} 895}
896 896
897static const EDBus_Service_Interface_Desc client_desc = { 897static const Eldbus_Service_Interface_Desc client_desc = {
898 _ethumb_dbus_objects_interface, _ethumb_dbus_objects_methods, 898 _ethumb_dbus_objects_interface, _ethumb_dbus_objects_methods,
899 _ethumb_dbus_objects_signals 899 _ethumb_dbus_objects_signals
900}; 900};
901 901
902static EDBus_Message * 902static Eldbus_Message *
903_ethumb_dbus_ethumb_new_cb(const EDBus_Service_Interface *interface, const EDBus_Message *msg) 903_ethumb_dbus_ethumb_new_cb(const Eldbus_Service_Interface *interface, const Eldbus_Message *msg)
904{ 904{
905 EDBus_Message *reply; 905 Eldbus_Message *reply;
906 EDBus_Service_Interface *iface; 906 Eldbus_Service_Interface *iface;
907 Ethumbd_Object_Data *odata; 907 Ethumbd_Object_Data *odata;
908 int i; 908 int i;
909 const char *return_path = ""; 909 const char *return_path = "";
910 const char *client; 910 const char *client;
911 Ethumbd *ed; 911 Ethumbd *ed;
912 912
913 ed = edbus_service_object_data_get(interface, DAEMON); 913 ed = eldbus_service_object_data_get(interface, DAEMON);
914 client = edbus_message_sender_get(msg); 914 client = eldbus_message_sender_get(msg);
915 if (!client) 915 if (!client)
916 goto end_new; 916 goto end_new;
917 917
@@ -926,7 +926,7 @@ _ethumb_dbus_ethumb_new_cb(const EDBus_Service_Interface *interface, const EDBus
926 ed->queue.table[i].client = eina_stringshare_add(client); 926 ed->queue.table[i].client = eina_stringshare_add(client);
927 return_path = ed->queue.table[i].path; 927 return_path = ed->queue.table[i].path;
928 928
929 iface = edbus_service_interface_register(ed->conn, return_path, &client_desc); 929 iface = eldbus_service_interface_register(ed->conn, return_path, &client_desc);
930 if (!iface) 930 if (!iface)
931 { 931 {
932 ERR("could not create dbus_object."); 932 ERR("could not create dbus_object.");
@@ -934,38 +934,38 @@ _ethumb_dbus_ethumb_new_cb(const EDBus_Service_Interface *interface, const EDBus
934 return_path = ""; 934 return_path = "";
935 goto end_new; 935 goto end_new;
936 } 936 }
937 edbus_service_object_data_set(iface, ODATA, odata); 937 eldbus_service_object_data_set(iface, ODATA, odata);
938 ed->queue.table[i].iface = iface; 938 ed->queue.table[i].iface = iface;
939 edbus_name_owner_changed_callback_add(ed->conn, client, 939 eldbus_name_owner_changed_callback_add(ed->conn, client,
940 _name_owner_changed_cb, odata, 940 _name_owner_changed_cb, odata,
941 EINA_TRUE); 941 EINA_TRUE);
942 _ethumbd_child_write_op_new(&ed->slave, i); 942 _ethumbd_child_write_op_new(&ed->slave, i);
943 _ethumbd_timeout_stop(ed); 943 _ethumbd_timeout_stop(ed);
944 944
945 end_new: 945 end_new:
946 reply = edbus_message_method_return_new(msg); 946 reply = eldbus_message_method_return_new(msg);
947 edbus_message_arguments_append(reply, "o", return_path); 947 eldbus_message_arguments_append(reply, "o", return_path);
948 return reply; 948 return reply;
949} 949}
950 950
951static const EDBus_Method _ethumb_dbus_methods[] = { 951static const Eldbus_Method _ethumb_dbus_methods[] = {
952 { 952 {
953 "new", NULL, EDBUS_ARGS({"o", "path"}), _ethumb_dbus_ethumb_new_cb, 0 953 "new", NULL, ELDBUS_ARGS({"o", "path"}), _ethumb_dbus_ethumb_new_cb, 0
954 }, 954 },
955 { } 955 { }
956}; 956};
957 957
958static const char * 958static const char *
959_ethumb_dbus_get_bytearray(EDBus_Message_Iter *iter) 959_ethumb_dbus_get_bytearray(Eldbus_Message_Iter *iter)
960{ 960{
961 int length; 961 int length;
962 const char *result; 962 const char *result;
963 963
964 if (!edbus_message_iter_fixed_array_get(iter, 'y', &result, 964 if (!eldbus_message_iter_fixed_array_get(iter, 'y', &result,
965 &length)) 965 &length))
966 { 966 {
967 ERR("not byte array element. Signature: %s", 967 ERR("not byte array element. Signature: %s",
968 edbus_message_iter_signature_get(iter)); 968 eldbus_message_iter_signature_get(iter));
969 return NULL; 969 return NULL;
970 } 970 }
971 971
@@ -976,7 +976,7 @@ _ethumb_dbus_get_bytearray(EDBus_Message_Iter *iter)
976} 976}
977 977
978static void 978static void
979_ethumb_dbus_append_bytearray(EDBus_Message_Iter *parent, EDBus_Message_Iter *array, const char *string) 979_ethumb_dbus_append_bytearray(Eldbus_Message_Iter *parent, Eldbus_Message_Iter *array, const char *string)
980{ 980{
981 int i, size; 981 int i, size;
982 982
@@ -985,23 +985,23 @@ _ethumb_dbus_append_bytearray(EDBus_Message_Iter *parent, EDBus_Message_Iter *ar
985 985
986 size = strlen(string) + 1; 986 size = strlen(string) + 1;
987 for (i = 0; i < size; i++) 987 for (i = 0; i < size; i++)
988 edbus_message_iter_basic_append(array, 'y', string[i]); 988 eldbus_message_iter_basic_append(array, 'y', string[i]);
989 edbus_message_iter_container_close(parent, array); 989 eldbus_message_iter_container_close(parent, array);
990} 990}
991 991
992static EDBus_Message * 992static Eldbus_Message *
993_ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg) 993_ethumb_dbus_queue_add_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
994{ 994{
995 EDBus_Message *reply; 995 Eldbus_Message *reply;
996 const char *file, *key, *thumb, *thumb_key; 996 const char *file, *key, *thumb, *thumb_key;
997 Ethumbd_Object_Data *odata; 997 Ethumbd_Object_Data *odata;
998 Ethumbd_Object *eobject; 998 Ethumbd_Object *eobject;
999 Ethumbd *ed; 999 Ethumbd *ed;
1000 Ethumbd_Request *request; 1000 Ethumbd_Request *request;
1001 int id = -1; 1001 int id = -1;
1002 EDBus_Message_Iter *file_iter, *key_iter, *thumb_iter, *thumb_key_iter; 1002 Eldbus_Message_Iter *file_iter, *key_iter, *thumb_iter, *thumb_key_iter;
1003 1003
1004 if (!edbus_message_arguments_get(msg, "iayayayay", &id, &file_iter, 1004 if (!eldbus_message_arguments_get(msg, "iayayayay", &id, &file_iter,
1005 &key_iter, &thumb_iter, &thumb_key_iter)) 1005 &key_iter, &thumb_iter, &thumb_key_iter))
1006 { 1006 {
1007 ERR("Error getting arguments."); 1007 ERR("Error getting arguments.");
@@ -1021,7 +1021,7 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
1021 goto end; 1021 goto end;
1022 } 1022 }
1023 1023
1024 odata = edbus_service_object_data_get(iface, ODATA); 1024 odata = eldbus_service_object_data_get(iface, ODATA);
1025 if (!odata) 1025 if (!odata)
1026 { 1026 {
1027 eina_stringshare_del(file); 1027 eina_stringshare_del(file);
@@ -1050,15 +1050,15 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
1050 _process_queue_start(ed); 1050 _process_queue_start(ed);
1051 1051
1052end: 1052end:
1053 reply = edbus_message_method_return_new(msg); 1053 reply = eldbus_message_method_return_new(msg);
1054 edbus_message_arguments_append(reply, "i", id); 1054 eldbus_message_arguments_append(reply, "i", id);
1055 return reply; 1055 return reply;
1056} 1056}
1057 1057
1058static EDBus_Message * 1058static Eldbus_Message *
1059_ethumb_dbus_queue_remove_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg) 1059_ethumb_dbus_queue_remove_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
1060{ 1060{
1061 EDBus_Message *reply; 1061 Eldbus_Message *reply;
1062 int id; 1062 int id;
1063 Ethumbd_Object_Data *odata; 1063 Ethumbd_Object_Data *odata;
1064 Ethumbd_Object *eobject; 1064 Ethumbd_Object *eobject;
@@ -1067,12 +1067,12 @@ _ethumb_dbus_queue_remove_cb(const EDBus_Service_Interface *iface, const EDBus_M
1067 Eina_Bool r = EINA_FALSE; 1067 Eina_Bool r = EINA_FALSE;
1068 Eina_List *l; 1068 Eina_List *l;
1069 1069
1070 if (!edbus_message_arguments_get(msg, "i", &id)) 1070 if (!eldbus_message_arguments_get(msg, "i", &id))
1071 { 1071 {
1072 ERR("Error getting arguments."); 1072 ERR("Error getting arguments.");
1073 goto end; 1073 goto end;
1074 } 1074 }
1075 odata = edbus_service_object_data_get(iface, ODATA); 1075 odata = eldbus_service_object_data_get(iface, ODATA);
1076 if (!odata) 1076 if (!odata)
1077 { 1077 {
1078 ERR("could not get dbus_object data."); 1078 ERR("could not get dbus_object data.");
@@ -1105,20 +1105,20 @@ _ethumb_dbus_queue_remove_cb(const EDBus_Service_Interface *iface, const EDBus_M
1105 } 1105 }
1106 1106
1107 end: 1107 end:
1108 reply = edbus_message_method_return_new(msg); 1108 reply = eldbus_message_method_return_new(msg);
1109 edbus_message_arguments_append(reply, "b", r); 1109 eldbus_message_arguments_append(reply, "b", r);
1110 return reply; 1110 return reply;
1111} 1111}
1112 1112
1113static EDBus_Message * 1113static Eldbus_Message *
1114_ethumb_dbus_queue_clear_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg) 1114_ethumb_dbus_queue_clear_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
1115{ 1115{
1116 Ethumbd_Object_Data *odata; 1116 Ethumbd_Object_Data *odata;
1117 Ethumbd_Object *eobject; 1117 Ethumbd_Object *eobject;
1118 Ethumbd *ed; 1118 Ethumbd *ed;
1119 Eina_List *l; 1119 Eina_List *l;
1120 1120
1121 odata = edbus_service_object_data_get(iface, ODATA); 1121 odata = eldbus_service_object_data_get(iface, ODATA);
1122 if (!odata) 1122 if (!odata)
1123 { 1123 {
1124 ERR("could not get dbus_object data."); 1124 ERR("could not get dbus_object data.");
@@ -1142,19 +1142,19 @@ _ethumb_dbus_queue_clear_cb(const EDBus_Service_Interface *iface, const EDBus_Me
1142 eobject->nqueue = 0; 1142 eobject->nqueue = 0;
1143 1143
1144 end: 1144 end:
1145 return edbus_message_method_return_new(msg); 1145 return eldbus_message_method_return_new(msg);
1146} 1146}
1147 1147
1148static EDBus_Message * 1148static Eldbus_Message *
1149_ethumb_dbus_delete_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg) 1149_ethumb_dbus_delete_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
1150{ 1150{
1151 EDBus_Message *reply; 1151 Eldbus_Message *reply;
1152 Ethumbd_Object_Data *odata; 1152 Ethumbd_Object_Data *odata;
1153 Ethumbd *ed; 1153 Ethumbd *ed;
1154 1154
1155 reply = edbus_message_method_return_new(msg); 1155 reply = eldbus_message_method_return_new(msg);
1156 1156
1157 odata = edbus_service_object_data_get(iface, ODATA); 1157 odata = eldbus_service_object_data_get(iface, ODATA);
1158 if (!odata) 1158 if (!odata)
1159 { 1159 {
1160 ERR("could not get dbus_object data for del_cb."); 1160 ERR("could not get dbus_object data for del_cb.");
@@ -1168,11 +1168,11 @@ _ethumb_dbus_delete_cb(const EDBus_Service_Interface *iface, const EDBus_Message
1168} 1168}
1169 1169
1170static int 1170static int
1171_ethumb_dbus_fdo_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1171_ethumb_dbus_fdo_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1172{ 1172{
1173 int fdo; 1173 int fdo;
1174 1174
1175 if (!edbus_message_iter_arguments_get(variant, "i", &fdo)) 1175 if (!eldbus_message_iter_arguments_get(variant, "i", &fdo))
1176 { 1176 {
1177 ERR("invalid param for fdo_set."); 1177 ERR("invalid param for fdo_set.");
1178 return 0; 1178 return 0;
@@ -1186,18 +1186,18 @@ _ethumb_dbus_fdo_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *va
1186} 1186}
1187 1187
1188static int 1188static int
1189_ethumb_dbus_size_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1189_ethumb_dbus_size_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1190{ 1190{
1191 EDBus_Message_Iter *st; 1191 Eldbus_Message_Iter *st;
1192 int w, h; 1192 int w, h;
1193 1193
1194 if (!edbus_message_iter_arguments_get(variant, "(ii)", &st)) 1194 if (!eldbus_message_iter_arguments_get(variant, "(ii)", &st))
1195 { 1195 {
1196 ERR("invalid param for size_set."); 1196 ERR("invalid param for size_set.");
1197 return 0; 1197 return 0;
1198 } 1198 }
1199 1199
1200 edbus_message_iter_arguments_get(st, "ii", &w, &h); 1200 eldbus_message_iter_arguments_get(st, "ii", &w, &h);
1201 DBG("setting size to: %dx%d", w, h); 1201 DBG("setting size to: %dx%d", w, h);
1202 request->setup.flags.size = 1; 1202 request->setup.flags.size = 1;
1203 request->setup.tw = w; 1203 request->setup.tw = w;
@@ -1207,11 +1207,11 @@ _ethumb_dbus_size_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *v
1207} 1207}
1208 1208
1209static int 1209static int
1210_ethumb_dbus_format_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1210_ethumb_dbus_format_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1211{ 1211{
1212 int format; 1212 int format;
1213 1213
1214 if (!edbus_message_iter_arguments_get(variant, "i", &format)) 1214 if (!eldbus_message_iter_arguments_get(variant, "i", &format))
1215 { 1215 {
1216 ERR("invalid param for format_set."); 1216 ERR("invalid param for format_set.");
1217 return 0; 1217 return 0;
@@ -1225,11 +1225,11 @@ _ethumb_dbus_format_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter
1225} 1225}
1226 1226
1227static int 1227static int
1228_ethumb_dbus_aspect_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1228_ethumb_dbus_aspect_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1229{ 1229{
1230 int aspect; 1230 int aspect;
1231 1231
1232 if (!edbus_message_iter_arguments_get(variant, "i", &aspect)) 1232 if (!eldbus_message_iter_arguments_get(variant, "i", &aspect))
1233 { 1233 {
1234 ERR("invalid param for aspect_set."); 1234 ERR("invalid param for aspect_set.");
1235 return 0; 1235 return 0;
@@ -1243,11 +1243,11 @@ _ethumb_dbus_aspect_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter
1243} 1243}
1244 1244
1245static int 1245static int
1246_ethumb_dbus_orientation_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1246_ethumb_dbus_orientation_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1247{ 1247{
1248 int orientation; 1248 int orientation;
1249 1249
1250 if (!edbus_message_iter_arguments_get(variant, "i", &orientation)) 1250 if (!eldbus_message_iter_arguments_get(variant, "i", &orientation))
1251 { 1251 {
1252 ERR("invalid param for orientation_set."); 1252 ERR("invalid param for orientation_set.");
1253 return 0; 1253 return 0;
@@ -1261,18 +1261,18 @@ _ethumb_dbus_orientation_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_
1261} 1261}
1262 1262
1263static int 1263static int
1264_ethumb_dbus_crop_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1264_ethumb_dbus_crop_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1265{ 1265{
1266 EDBus_Message_Iter *st; 1266 Eldbus_Message_Iter *st;
1267 double x, y; 1267 double x, y;
1268 1268
1269 if (!edbus_message_iter_arguments_get(variant, "(dd)", &st)) 1269 if (!eldbus_message_iter_arguments_get(variant, "(dd)", &st))
1270 { 1270 {
1271 ERR("invalid param for crop_set."); 1271 ERR("invalid param for crop_set.");
1272 return 0; 1272 return 0;
1273 } 1273 }
1274 1274
1275 edbus_message_iter_arguments_get(st, "dd", &x, &y); 1275 eldbus_message_iter_arguments_get(st, "dd", &x, &y);
1276 DBG("setting crop to: %3.2f,%3.2f", x, y); 1276 DBG("setting crop to: %3.2f,%3.2f", x, y);
1277 request->setup.flags.crop = 1; 1277 request->setup.flags.crop = 1;
1278 request->setup.cx = x; 1278 request->setup.cx = x;
@@ -1282,11 +1282,11 @@ _ethumb_dbus_crop_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *v
1282} 1282}
1283 1283
1284static int 1284static int
1285_ethumb_dbus_quality_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1285_ethumb_dbus_quality_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1286{ 1286{
1287 int quality; 1287 int quality;
1288 1288
1289 if (!edbus_message_iter_arguments_get(variant, "i", &quality)) 1289 if (!eldbus_message_iter_arguments_get(variant, "i", &quality))
1290 { 1290 {
1291 ERR("invalid param for quality_set."); 1291 ERR("invalid param for quality_set.");
1292 return 0; 1292 return 0;
@@ -1301,11 +1301,11 @@ _ethumb_dbus_quality_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter
1301 1301
1302 1302
1303static int 1303static int
1304_ethumb_dbus_compress_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1304_ethumb_dbus_compress_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1305{ 1305{
1306 int compress; 1306 int compress;
1307 1307
1308 if (!edbus_message_iter_arguments_get(variant, "i", &compress)) 1308 if (!eldbus_message_iter_arguments_get(variant, "i", &compress))
1309 { 1309 {
1310 ERR("invalid param for compress_set."); 1310 ERR("invalid param for compress_set.");
1311 return 0; 1311 return 0;
@@ -1319,18 +1319,18 @@ _ethumb_dbus_compress_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Ite
1319} 1319}
1320 1320
1321static int 1321static int
1322_ethumb_dbus_frame_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1322_ethumb_dbus_frame_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1323{ 1323{
1324 EDBus_Message_Iter *_struct, *file_iter, *group_iter, *swallow_iter; 1324 Eldbus_Message_Iter *_struct, *file_iter, *group_iter, *swallow_iter;
1325 const char *file, *group, *swallow; 1325 const char *file, *group, *swallow;
1326 1326
1327 if (!edbus_message_iter_arguments_get(variant, "(ayayay)", &_struct)) 1327 if (!eldbus_message_iter_arguments_get(variant, "(ayayay)", &_struct))
1328 { 1328 {
1329 ERR("invalid param for frame_set."); 1329 ERR("invalid param for frame_set.");
1330 return 0; 1330 return 0;
1331 } 1331 }
1332 1332
1333 edbus_message_iter_arguments_get(_struct, "ayayay", &file_iter, &group_iter, &swallow_iter); 1333 eldbus_message_iter_arguments_get(_struct, "ayayay", &file_iter, &group_iter, &swallow_iter);
1334 1334
1335 file = _ethumb_dbus_get_bytearray(file_iter); 1335 file = _ethumb_dbus_get_bytearray(file_iter);
1336 group = _ethumb_dbus_get_bytearray(group_iter); 1336 group = _ethumb_dbus_get_bytearray(group_iter);
@@ -1345,12 +1345,12 @@ _ethumb_dbus_frame_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *
1345} 1345}
1346 1346
1347static int 1347static int
1348_ethumb_dbus_directory_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1348_ethumb_dbus_directory_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1349{ 1349{
1350 const char *directory; 1350 const char *directory;
1351 EDBus_Message_Iter *array; 1351 Eldbus_Message_Iter *array;
1352 1352
1353 if (!edbus_message_iter_arguments_get(variant, "ay", &array)) 1353 if (!eldbus_message_iter_arguments_get(variant, "ay", &array))
1354 { 1354 {
1355 ERR("invalid param for dir_path_set."); 1355 ERR("invalid param for dir_path_set.");
1356 return 0; 1356 return 0;
@@ -1365,12 +1365,12 @@ _ethumb_dbus_directory_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_It
1365} 1365}
1366 1366
1367static int 1367static int
1368_ethumb_dbus_category_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1368_ethumb_dbus_category_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1369{ 1369{
1370 const char *category; 1370 const char *category;
1371 EDBus_Message_Iter *array; 1371 Eldbus_Message_Iter *array;
1372 1372
1373 if (!edbus_message_iter_arguments_get(variant, "ay", &array)) 1373 if (!eldbus_message_iter_arguments_get(variant, "ay", &array))
1374 { 1374 {
1375 ERR("invalid param for category."); 1375 ERR("invalid param for category.");
1376 return 0; 1376 return 0;
@@ -1385,11 +1385,11 @@ _ethumb_dbus_category_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Ite
1385} 1385}
1386 1386
1387static int 1387static int
1388_ethumb_dbus_video_time_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1388_ethumb_dbus_video_time_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1389{ 1389{
1390 double video_time; 1390 double video_time;
1391 1391
1392 if (!edbus_message_iter_arguments_get(variant, "d", &video_time)) 1392 if (!eldbus_message_iter_arguments_get(variant, "d", &video_time))
1393 { 1393 {
1394 ERR("invalid param for video_time_set."); 1394 ERR("invalid param for video_time_set.");
1395 return 0; 1395 return 0;
@@ -1403,11 +1403,11 @@ _ethumb_dbus_video_time_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_I
1403} 1403}
1404 1404
1405static int 1405static int
1406_ethumb_dbus_video_start_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1406_ethumb_dbus_video_start_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1407{ 1407{
1408 double video_start; 1408 double video_start;
1409 1409
1410 if (!edbus_message_iter_arguments_get(variant, "d", &video_start)) 1410 if (!eldbus_message_iter_arguments_get(variant, "d", &video_start))
1411 { 1411 {
1412 ERR("invalid param for video_start_set."); 1412 ERR("invalid param for video_start_set.");
1413 return 0; 1413 return 0;
@@ -1421,11 +1421,11 @@ _ethumb_dbus_video_start_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_
1421} 1421}
1422 1422
1423static int 1423static int
1424_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1424_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1425{ 1425{
1426 double video_interval; 1426 double video_interval;
1427 1427
1428 if (!edbus_message_iter_arguments_get(variant, "d", &video_interval)) 1428 if (!eldbus_message_iter_arguments_get(variant, "d", &video_interval))
1429 { 1429 {
1430 ERR("invalid param for video_interval_set."); 1430 ERR("invalid param for video_interval_set.");
1431 return 0; 1431 return 0;
@@ -1438,11 +1438,11 @@ _ethumb_dbus_video_interval_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Messa
1438} 1438}
1439 1439
1440static int 1440static int
1441_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1441_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1442{ 1442{
1443 unsigned int video_ntimes; 1443 unsigned int video_ntimes;
1444 1444
1445 if (!edbus_message_iter_arguments_get(variant, "u", &video_ntimes)) 1445 if (!eldbus_message_iter_arguments_get(variant, "u", &video_ntimes))
1446 { 1446 {
1447 ERR("invalid param for video_ntimes_set."); 1447 ERR("invalid param for video_ntimes_set.");
1448 return 0; 1448 return 0;
@@ -1456,11 +1456,11 @@ _ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message
1456} 1456}
1457 1457
1458static int 1458static int
1459_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1459_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1460{ 1460{
1461 unsigned int video_fps; 1461 unsigned int video_fps;
1462 1462
1463 if (!edbus_message_iter_arguments_get(variant, "u", &video_fps)) 1463 if (!eldbus_message_iter_arguments_get(variant, "u", &video_fps))
1464 { 1464 {
1465 ERR("invalid param for video_fps_set."); 1465 ERR("invalid param for video_fps_set.");
1466 return 0; 1466 return 0;
@@ -1474,11 +1474,11 @@ _ethumb_dbus_video_fps_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_It
1474} 1474}
1475 1475
1476static int 1476static int
1477_ethumb_dbus_document_page_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request) 1477_ethumb_dbus_document_page_set(Ethumbd_Object *eobject EINA_UNUSED, Eldbus_Message_Iter *variant, Ethumbd_Request *request)
1478{ 1478{
1479 unsigned int document_page; 1479 unsigned int document_page;
1480 1480
1481 if (!edbus_message_iter_arguments_get(variant, "u", &document_page)) 1481 if (!eldbus_message_iter_arguments_get(variant, "u", &document_page))
1482 { 1482 {
1483 ERR("invalid param for document_page_set."); 1483 ERR("invalid param for document_page_set.");
1484 return 0; 1484 return 0;
@@ -1494,7 +1494,7 @@ _ethumb_dbus_document_page_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Messag
1494static struct 1494static struct
1495{ 1495{
1496 const char *option; 1496 const char *option;
1497 int (*setup_func)(Ethumbd_Object *eobject, EDBus_Message_Iter *variant, Ethumbd_Request *request); 1497 int (*setup_func)(Ethumbd_Object *eobject, Eldbus_Message_Iter *variant, Ethumbd_Request *request);
1498} _option_cbs[] = { 1498} _option_cbs[] = {
1499 {"fdo", _ethumb_dbus_fdo_set}, 1499 {"fdo", _ethumb_dbus_fdo_set},
1500 {"size", _ethumb_dbus_size_set}, 1500 {"size", _ethumb_dbus_size_set},
@@ -1517,13 +1517,13 @@ static struct
1517}; 1517};
1518 1518
1519static int 1519static int
1520_ethumb_dbus_ethumb_setup_parse_element(Ethumbd_Object *eobject, EDBus_Message_Iter *data, Ethumbd_Request *request) 1520_ethumb_dbus_ethumb_setup_parse_element(Ethumbd_Object *eobject, Eldbus_Message_Iter *data, Ethumbd_Request *request)
1521{ 1521{
1522 EDBus_Message_Iter *variant; 1522 Eldbus_Message_Iter *variant;
1523 const char *option; 1523 const char *option;
1524 int i, r; 1524 int i, r;
1525 1525
1526 edbus_message_iter_arguments_get(data, "sv", &option, &variant); 1526 eldbus_message_iter_arguments_get(data, "sv", &option, &variant);
1527 1527
1528 r = 0; 1528 r = 0;
1529 for (i = 0; _option_cbs[i].option; i++) 1529 for (i = 0; _option_cbs[i].option; i++)
@@ -1542,25 +1542,25 @@ _ethumb_dbus_ethumb_setup_parse_element(Ethumbd_Object *eobject, EDBus_Message_I
1542 return _option_cbs[i].setup_func(eobject, variant, request); 1542 return _option_cbs[i].setup_func(eobject, variant, request);
1543} 1543}
1544 1544
1545static EDBus_Message * 1545static Eldbus_Message *
1546_ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_Message *msg) 1546_ethumb_dbus_ethumb_setup_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
1547{ 1547{
1548 EDBus_Message *reply; 1548 Eldbus_Message *reply;
1549 Ethumbd_Object_Data *odata; 1549 Ethumbd_Object_Data *odata;
1550 Ethumbd *ed; 1550 Ethumbd *ed;
1551 Ethumbd_Object *eobject; 1551 Ethumbd_Object *eobject;
1552 Ethumbd_Request *request; 1552 Ethumbd_Request *request;
1553 Eina_Bool r = EINA_FALSE; 1553 Eina_Bool r = EINA_FALSE;
1554 EDBus_Message_Iter *array; 1554 Eldbus_Message_Iter *array;
1555 EDBus_Message_Iter *data; 1555 Eldbus_Message_Iter *data;
1556 1556
1557 if (!edbus_message_arguments_get(msg, "a{sv}", &array)) 1557 if (!eldbus_message_arguments_get(msg, "a{sv}", &array))
1558 { 1558 {
1559 ERR("could not get dbus_object data for setup_cb."); 1559 ERR("could not get dbus_object data for setup_cb.");
1560 goto end; 1560 goto end;
1561 } 1561 }
1562 1562
1563 odata = edbus_service_object_data_get(iface, ODATA); 1563 odata = eldbus_service_object_data_get(iface, ODATA);
1564 if (!odata) 1564 if (!odata)
1565 { 1565 {
1566 ERR("could not get dbus_object data for setup_cb."); 1566 ERR("could not get dbus_object data for setup_cb.");
@@ -1574,7 +1574,7 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
1574 request->id = -1; 1574 request->id = -1;
1575 1575
1576 r = EINA_TRUE; 1576 r = EINA_TRUE;
1577 while (edbus_message_iter_get_and_next(array, 'r', &data) && r) 1577 while (eldbus_message_iter_get_and_next(array, 'r', &data) && r)
1578 { 1578 {
1579 if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request)) 1579 if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request))
1580 r = EINA_FALSE; 1580 r = EINA_FALSE;
@@ -1585,57 +1585,57 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
1585 ed->queue.nqueue++; 1585 ed->queue.nqueue++;
1586 1586
1587end: 1587end:
1588 reply = edbus_message_method_return_new(msg); 1588 reply = eldbus_message_method_return_new(msg);
1589 edbus_message_arguments_append(reply, "b", r); 1589 eldbus_message_arguments_append(reply, "b", r);
1590 return reply; 1590 return reply;
1591} 1591}
1592 1592
1593static void 1593static void
1594_ethumb_dbus_generated_signal(Ethumbd *ed, int *id, const char *thumb_path, const char *thumb_key, Eina_Bool success) 1594_ethumb_dbus_generated_signal(Ethumbd *ed, int *id, const char *thumb_path, const char *thumb_key, Eina_Bool success)
1595{ 1595{
1596 EDBus_Message *sig; 1596 Eldbus_Message *sig;
1597 EDBus_Service_Interface *iface; 1597 Eldbus_Service_Interface *iface;
1598 EDBus_Message_Iter *iter, *iter_path, *iter_key; 1598 Eldbus_Message_Iter *iter, *iter_path, *iter_key;
1599 int id32; 1599 int id32;
1600 1600
1601 id32 = *id; 1601 id32 = *id;
1602 1602
1603 iface = ed->queue.table[ed->queue.current].iface; 1603 iface = ed->queue.table[ed->queue.current].iface;
1604 sig = edbus_service_signal_new(iface, ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED); 1604 sig = eldbus_service_signal_new(iface, ETHUMB_DBUS_OBJECTS_SIGNAL_GENERATED);
1605 1605
1606 iter = edbus_message_iter_get(sig); 1606 iter = eldbus_message_iter_get(sig);
1607 edbus_message_iter_arguments_append(iter, "iay", id32, &iter_path); 1607 eldbus_message_iter_arguments_append(iter, "iay", id32, &iter_path);
1608 _ethumb_dbus_append_bytearray(iter, iter_path, thumb_path); 1608 _ethumb_dbus_append_bytearray(iter, iter_path, thumb_path);
1609 edbus_message_iter_arguments_append(iter, "ay", &iter_key); 1609 eldbus_message_iter_arguments_append(iter, "ay", &iter_key);
1610 _ethumb_dbus_append_bytearray(iter, iter_key, thumb_key); 1610 _ethumb_dbus_append_bytearray(iter, iter_key, thumb_key);
1611 edbus_message_iter_arguments_append(iter, "b", success); 1611 eldbus_message_iter_arguments_append(iter, "b", success);
1612 1612
1613 edbus_service_signal_send(iface, sig); 1613 eldbus_service_signal_send(iface, sig);
1614} 1614}
1615 1615
1616static const EDBus_Service_Interface_Desc server_desc = { 1616static const Eldbus_Service_Interface_Desc server_desc = {
1617 _ethumb_dbus_interface, _ethumb_dbus_methods 1617 _ethumb_dbus_interface, _ethumb_dbus_methods
1618}; 1618};
1619 1619
1620static void 1620static void
1621_ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 1621_ethumb_dbus_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
1622{ 1622{
1623 EDBus_Service_Interface *iface; 1623 Eldbus_Service_Interface *iface;
1624 const char *errname, *errmsg; 1624 const char *errname, *errmsg;
1625 Ethumbd *ed = data; 1625 Ethumbd *ed = data;
1626 1626
1627 if (edbus_message_error_get(msg, &errname, &errmsg)) 1627 if (eldbus_message_error_get(msg, &errname, &errmsg))
1628 { 1628 {
1629 ERR("request name error: %s %s", errname, errmsg); 1629 ERR("request name error: %s %s", errname, errmsg);
1630 edbus_connection_unref(ed->conn); 1630 eldbus_connection_unref(ed->conn);
1631 return; 1631 return;
1632 } 1632 }
1633 1633
1634 iface = edbus_service_interface_register(ed->conn, _ethumb_dbus_path, 1634 iface = eldbus_service_interface_register(ed->conn, _ethumb_dbus_path,
1635 &server_desc); 1635 &server_desc);
1636 EINA_SAFETY_ON_NULL_RETURN(iface); 1636 EINA_SAFETY_ON_NULL_RETURN(iface);
1637 1637
1638 edbus_service_object_data_set(iface, DAEMON, ed); 1638 eldbus_service_object_data_set(iface, DAEMON, ed);
1639 1639
1640 _ethumbd_timeout_start(ed); 1640 _ethumbd_timeout_start(ed);
1641} 1641}
@@ -1643,7 +1643,7 @@ _ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending
1643static int 1643static int
1644_ethumb_dbus_setup(Ethumbd *ed) 1644_ethumb_dbus_setup(Ethumbd *ed)
1645{ 1645{
1646 edbus_name_request(ed->conn, _ethumb_dbus_bus_name, 0, 1646 eldbus_name_request(ed->conn, _ethumb_dbus_bus_name, 0,
1647 _ethumb_dbus_request_name_cb, ed); 1647 _ethumb_dbus_request_name_cb, ed);
1648 return 1; 1648 return 1;
1649} 1649}
@@ -1653,7 +1653,7 @@ _ethumb_dbus_finish(Ethumbd *ed)
1653{ 1653{
1654 _process_queue_stop(ed); 1654 _process_queue_stop(ed);
1655 _ethumb_table_clear(ed); 1655 _ethumb_table_clear(ed);
1656 edbus_connection_unref(ed->conn); 1656 eldbus_connection_unref(ed->conn);
1657 free(ed->queue.table); 1657 free(ed->queue.table);
1658 free(ed->queue.list); 1658 free(ed->queue.list);
1659} 1659}
@@ -1737,9 +1737,9 @@ main(int argc, char *argv[])
1737 goto finish; 1737 goto finish;
1738 } 1738 }
1739 1739
1740 if (!edbus_init()) 1740 if (!eldbus_init())
1741 { 1741 {
1742 ERR("could not init edbus."); 1742 ERR("could not init eldbus.");
1743 exit_value = -1; 1743 exit_value = -1;
1744 goto finish; 1744 goto finish;
1745 } 1745 }
@@ -1764,35 +1764,35 @@ main(int argc, char *argv[])
1764 if (quit_option) 1764 if (quit_option)
1765 goto finish; 1765 goto finish;
1766 1766
1767 ed.conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION); 1767 ed.conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
1768 if (!ed.conn) 1768 if (!ed.conn)
1769 { 1769 {
1770 ERR("could not connect to session bus."); 1770 ERR("could not connect to session bus.");
1771 exit_value = -3; 1771 exit_value = -3;
1772 goto finish_edbus; 1772 goto finish_eldbus;
1773 } 1773 }
1774 1774
1775 ed.timeout = timeout; 1775 ed.timeout = timeout;
1776 1776
1777 if (!_ethumb_dbus_setup(&ed)) 1777 if (!_ethumb_dbus_setup(&ed))
1778 { 1778 {
1779 edbus_connection_unref(ed.conn); 1779 eldbus_connection_unref(ed.conn);
1780 ERR("could not setup dbus connection."); 1780 ERR("could not setup dbus connection.");
1781 exit_value = -5; 1781 exit_value = -5;
1782 goto finish_edbus; 1782 goto finish_eldbus;
1783 } 1783 }
1784 1784
1785 ecore_main_loop_begin(); 1785 ecore_main_loop_begin();
1786 _ethumb_dbus_finish(&ed); 1786 _ethumb_dbus_finish(&ed);
1787 1787
1788 finish_edbus: 1788 finish_eldbus:
1789 if (_log_domain >= 0) 1789 if (_log_domain >= 0)
1790 { 1790 {
1791 eina_log_domain_unregister(_log_domain); 1791 eina_log_domain_unregister(_log_domain);
1792 _log_domain = -1; 1792 _log_domain = -1;
1793 } 1793 }
1794 1794
1795 edbus_shutdown(); 1795 eldbus_shutdown();
1796 finish: 1796 finish:
1797 if (ed.slave.exe) 1797 if (ed.slave.exe)
1798 ecore_exe_quit(ed.slave.exe); 1798 ecore_exe_quit(ed.slave.exe);
diff --git a/src/examples/edbus/banshee.c b/src/examples/edbus/banshee.c
deleted file mode 100644
index 89a005a8f6..0000000000
--- a/src/examples/edbus/banshee.c
+++ /dev/null
@@ -1,241 +0,0 @@
1//Compile with:
2// gcc -o banshee banshee.c `pkg-config --cflags --libs edbus2 ecore eina`
3
4#include "EDBus.h"
5#include <Ecore.h>
6
7#define BUS "org.bansheeproject.Banshee"
8#define ENGINE_PATH "/org/bansheeproject/Banshee/PlayerEngine"
9#define CONTROLLER_PATH "/org/bansheeproject/Banshee/PlaybackController"
10#define MPRIS_PATH "/org/mpris/MediaPlayer2"
11
12#define ENGINE_IFACE "org.bansheeproject.Banshee.PlayerEngine"
13#define CONTROLLER_IFACE "org.bansheeproject.Banshee.PlaybackController"
14#define MPRIS_IFACE "org.mpris.MediaPlayer2.Playlists"
15
16static EDBus_Signal_Handler *state_changed2;
17
18static Eina_Bool
19_timeout_application(void *data EINA_UNUSED)
20{
21 printf("\n## ecore_main_loop_quit()\n");
22 ecore_main_loop_quit();
23 return EINA_TRUE;
24}
25
26static void
27on_get_playlists(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
28{
29 EDBus_Message_Iter *array, *struct_entry;
30 const char *path, *name, *image;
31 int i = 0;
32
33 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
34
35 if (!edbus_message_arguments_get(msg, "a(oss)", &array))
36 {
37 fprintf(stderr, "Error: could not get entry contents\n");
38 return;
39 }
40 printf("on_get_playlists() \n\n");
41 while (edbus_message_iter_get_and_next(array, 'r', &struct_entry))
42 {
43 if (!edbus_message_iter_arguments_get(struct_entry, "oss", &path, &name, &image))
44 {
45 printf("error on edbus_massage_iterator_arguments_get()");
46 return;
47 }
48 i++;
49 printf("%d - %s | %s | %s\n", i, path, name, image);
50 }
51 printf("end of on_get_playlists()\n\n");
52}
53
54static void
55iterate_dict(void *data EINA_UNUSED, const void *key, EDBus_Message_Iter *var)
56{
57 const char *skey = key;
58
59 if (!strcmp(skey, "PlaylistCount"))
60 {
61 unsigned count;
62 if (!edbus_message_iter_arguments_get(var, "u", &count))
63 printf("error2\n");
64 printf("PlaylistCount=%u\n", count);
65 }
66 else if (!strcmp(skey, "Orderings"))
67 {
68 EDBus_Message_Iter *as;
69 const char *txt;
70 printf("- Orderings\n");
71 if (!edbus_message_iter_arguments_get(var, "as", &as))
72 printf("error1\n");
73 while (edbus_message_iter_get_and_next(as, 's', &txt))
74 printf("\t%s\n", txt);
75 }
76}
77
78static void
79playlist_get_all_cb(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
80{
81 EDBus_Message_Iter *array;
82 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
83
84 if (edbus_message_arguments_get(msg, "a{sv}", &array))
85 edbus_message_iter_dict_iterate(array, "sv", iterate_dict, NULL);
86}
87
88static void
89on_introspect(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
90{
91 const char *string;
92
93 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
94
95 if (!edbus_message_arguments_get(msg, "s", &string))
96 {
97 fprintf(stderr, "Error: could not get entry contents\n");
98 return;
99 }
100
101 printf("on_introspect() data=\n%s\n\n", string);
102}
103
104static void
105on_next_or_pause(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
106{
107 const char *status = data;
108
109 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
110
111 printf("%s\n", status);
112}
113
114static void
115on_state_changed(void *data EINA_UNUSED, const EDBus_Message *msg)
116{
117 const char *status;
118 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
119
120 if (!edbus_message_arguments_get(msg, "s", &status))
121 {
122 fprintf(stderr, "Error: could not get entry contents\n");
123 return;
124 }
125
126 printf("on_state_changed = %s\n", status);
127}
128
129static void
130on_state_changed2(void *data EINA_UNUSED, const EDBus_Message *msg)
131{
132 const char *status;
133 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
134
135 if (!edbus_message_arguments_get(msg, "s", &status))
136 {
137 fprintf(stderr, "Error: could not get entry contents\n");
138 return;
139 }
140
141 printf("on_state_changed2 = %s\n", status);
142 edbus_signal_handler_unref(state_changed2);
143 state_changed2 = NULL;
144}
145
146static void
147on_banshee_startup(void *data EINA_UNUSED, const EDBus_Message *msg)
148{
149 const char *bus, *older_id, *new_id;
150
151 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
152 if (!edbus_message_arguments_get(msg, "sss", &bus, &older_id, &new_id))
153 {
154 printf("Error getting arguments from NameOwnerChanged");
155 return;
156 }
157
158 printf("banshee started on id=%s\n", new_id);
159}
160
161static void
162on_name_owner_changed(void *data EINA_UNUSED, const EDBus_Message *msg)
163{
164 const char *bus, *older_id, *new_id;
165
166 EINA_SAFETY_ON_TRUE_RETURN(edbus_message_error_get(msg, NULL, NULL));
167 if (!edbus_message_arguments_get(msg, "sss", &bus, &older_id, &new_id))
168 {
169 printf("Error getting arguments from NameOwnerChanged");
170 return;
171 }
172
173 printf("bus = %s older=%s new=%s\n\n", bus, older_id, new_id);
174}
175
176int
177main(void)
178{
179 EDBus_Connection *conn;
180 EDBus_Object *engine_obj, *controller_obj, *mpris_obj;
181 EDBus_Proxy *engine, *controler, *playlists;
182 EDBus_Signal_Handler *sh;
183
184 ecore_init();
185 edbus_init();
186
187 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
188
189 engine_obj = edbus_object_get(conn, BUS, ENGINE_PATH);
190 controller_obj = edbus_object_get(conn, BUS, CONTROLLER_PATH);
191 mpris_obj = edbus_object_get(conn, BUS, MPRIS_PATH);
192
193 engine = edbus_proxy_get(engine_obj, ENGINE_IFACE);
194 EINA_SAFETY_ON_NULL_GOTO(engine, end);
195 controler = edbus_proxy_get(controller_obj, CONTROLLER_IFACE);
196 EINA_SAFETY_ON_NULL_GOTO(controler, end);
197 playlists = edbus_proxy_get(mpris_obj, MPRIS_IFACE);
198 EINA_SAFETY_ON_NULL_GOTO(playlists, end);
199
200 edbus_object_introspect(engine_obj, on_introspect, NULL);
201
202 edbus_proxy_signal_handler_add(engine, "StateChanged", on_state_changed, NULL);
203 edbus_proxy_call(engine, "Pause", on_next_or_pause, "Pause", -1, "");
204
205 edbus_proxy_call(controler, "Next", on_next_or_pause, "Next", -1, "b", EINA_TRUE);
206
207 edbus_proxy_property_get_all(playlists, playlist_get_all_cb, NULL);
208 edbus_proxy_call(playlists, "GetPlaylists", on_get_playlists, NULL, -1,
209 "uusb", (unsigned)0, (unsigned)30, "asc", EINA_FALSE);
210
211 edbus_signal_handler_add(conn, BUS, ENGINE_PATH, ENGINE_IFACE,
212 "StateChanged", on_state_changed, NULL);
213 state_changed2 = edbus_signal_handler_add(conn, BUS, ENGINE_PATH, ENGINE_IFACE,
214 "StateChanged", on_state_changed2, NULL);
215
216 sh = edbus_signal_handler_add(conn, EDBUS_FDO_BUS, EDBUS_FDO_PATH,
217 EDBUS_FDO_INTERFACE, "NameOwnerChanged",
218 on_name_owner_changed, NULL);
219 edbus_signal_handler_match_extra_set(sh, "arg0", BUS, NULL);
220
221 sh = edbus_signal_handler_add(conn, EDBUS_FDO_BUS, EDBUS_FDO_PATH,
222 EDBUS_FDO_INTERFACE, "NameOwnerChanged",
223 on_banshee_startup, NULL);
224 edbus_signal_handler_match_extra_set(sh, "arg0", BUS, "arg1", "", NULL);
225
226 ecore_timer_add(50, _timeout_application, NULL);
227
228 ecore_main_loop_begin();
229
230end:
231 /**
232 * It's not necessary unref all objecs, proxys and signal handlers
233 * When a parent have ref = 0, it will unref all your childrens
234 * before free it self.
235 **/
236 edbus_connection_unref(conn);
237
238 edbus_shutdown();
239 ecore_shutdown();
240 return 0;
241}
diff --git a/src/examples/edbus/complex-types-server.c b/src/examples/edbus/complex-types-server.c
deleted file mode 100644
index 2409ce73b0..0000000000
--- a/src/examples/edbus/complex-types-server.c
+++ /dev/null
@@ -1,393 +0,0 @@
1//Compile with:
2// gcc -o complex-types-server complex-types-server.c `pkg-config --cflags --libs edbus2 ecore`
3
4#include "EDBus.h"
5#include <Ecore.h>
6
7#define BUS "com.profusion"
8#define PATH "/com/profusion/Test"
9#define IFACE "com.profusion.Test"
10
11static char *resp2;
12/* dummy, incremented each time DBus.Properties.Get() is called */
13static int int32 = 35;
14static Ecore_Timer *timer;
15
16static EDBus_Message *
17_receive_array(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
18{
19 EDBus_Message *reply = edbus_message_method_return_new(msg);
20 EDBus_Message_Iter *array;
21 const char *txt;
22
23 printf("- receiveArray\n");
24 if (!edbus_message_arguments_get(msg, "as", &array))
25 {
26 printf("Error on edbus_message_arguments_get()\n");
27 return reply;
28 }
29
30 while (edbus_message_iter_get_and_next(array, 's', &txt))
31 printf("%s\n", txt);
32 printf("}\n\n");
33
34 return reply;
35}
36
37static EDBus_Message *
38_receive_array_of_string_int_with_size(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
39{
40 EDBus_Message *reply = edbus_message_method_return_new(msg);
41 EDBus_Message_Iter *array, *struct_si;
42 int size, i = 0;
43
44 printf("- receiveArrayOfStringIntWithSize\n{\n");
45 if (!edbus_message_arguments_get(msg, "ia(si)", &size, &array))
46 {
47 printf("Error on edbus_message_arguments_get()\n");
48 return reply;
49 }
50
51 while (edbus_message_iter_get_and_next(array, 'r', &struct_si))
52 {
53 const char *txt;
54 int num;
55 if (!edbus_message_iter_arguments_get(struct_si, "si", &txt, &num))
56 {
57 printf("Error on edbus_message_arguments_get()\n");
58 return reply;
59 }
60 printf("%s | %d\n", txt, num);
61 i++;
62 }
63 printf("size in msg %d | size read %d\n", size, i);
64 printf("}\n\n");
65
66 return reply;
67}
68
69static EDBus_Message *
70_receive_variant(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
71{
72 EDBus_Message *reply = edbus_message_method_return_new(msg);
73 EDBus_Message_Iter *var, *array, *main_iter;
74
75 main_iter = edbus_message_iter_get(reply);
76 var = edbus_message_iter_container_new(main_iter, 'v', "as");
77 edbus_message_iter_arguments_append(var, "as", &array);
78
79 edbus_message_iter_arguments_append(array, "s", "item1");
80 edbus_message_iter_arguments_append(array, "s", "item2");
81 edbus_message_iter_arguments_append(array, "s", "item3");
82
83 edbus_message_iter_container_close(var, array);
84 edbus_message_iter_container_close(main_iter, var);
85
86 return reply;
87}
88
89static EDBus_Message *
90_send_variant(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
91{
92 EDBus_Message *reply = edbus_message_method_return_new(msg);
93 EDBus_Message_Iter *variant;
94 char *type;
95
96 printf("- sendVariantData\n{\n");
97 if (!edbus_message_arguments_get(msg, "v", &variant))
98 {
99 printf("Error on edbus_message_arguments_get()\n");
100 return reply;
101 }
102
103 type = edbus_message_iter_signature_get(variant);
104 if (type[1])
105 {
106 printf("It is a complex type, not handle yet.\n");
107 free(type);
108 return reply;
109 }
110
111 switch (type[0])
112 {
113 case 's':
114 case 'o':
115 {
116 char *txt;
117 edbus_message_iter_arguments_get(variant, type, &txt);
118 printf("type = %c value = %s\n", type[0], txt);
119 break;
120 }
121 case 'i':
122 {
123 int num;
124 edbus_message_iter_arguments_get(variant, type, &num);
125 printf("type = %c value = %d\n", type[0], num);
126 break;
127 }
128 default:
129 {
130 printf("Unhandled type\n");
131 }
132 }
133
134 printf("}\n\n");
135
136 free(type);
137 return reply;
138}
139
140static EDBus_Message *
141_send_array_int(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
142{
143 EDBus_Message *reply = edbus_message_method_return_new(msg);
144 EDBus_Message_Iter *iter, *array;
145 int i;
146
147 printf("- sendArrayInt\n\n");
148
149 iter = edbus_message_iter_get(reply);
150 array = edbus_message_iter_container_new(iter, 'a', "i");
151 for (i = 0; i < 5; i++)
152 edbus_message_iter_arguments_append(array, "i", i);
153 edbus_message_iter_container_close(iter, array);
154
155 return reply;
156}
157
158static EDBus_Message *
159_send_array(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
160{
161 EDBus_Message *reply = edbus_message_method_return_new(msg);
162 EDBus_Message_Iter *iter, *array;
163 const char *array_string[5] = {"qqqq", "wwwww", "eeeeee", "rrrrr", "ttttt"};
164 int i;
165
166 printf("sendArray\n\n");
167
168 iter = edbus_message_iter_get(reply);
169 array = edbus_message_iter_container_new(iter, 'a', "s");
170 for (i = 0; i < 5; i++)
171 edbus_message_iter_arguments_append(array, "s", array_string[i]);
172 edbus_message_iter_container_close(iter, array);
173
174 return reply;
175}
176
177static EDBus_Message *
178_plus_one(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
179{
180 EDBus_Message *reply = edbus_message_method_return_new(msg);
181 int num;
182
183 printf("- plusOne\n\n");
184 if (!edbus_message_arguments_get(msg, "i", &num))
185 {
186 printf("Error on edbus_message_arguments_get()\n");
187 return reply;
188 }
189 num++;
190 edbus_message_arguments_append(reply, "i", num);
191
192 return reply;
193}
194
195static EDBus_Message *
196_double_container(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
197{
198 EDBus_Message_Iter *array1, *array2, *structure;
199 int num1, num2;
200 EDBus_Message *reply = edbus_message_method_return_new(msg);
201
202 if (!edbus_message_arguments_get(msg, "a(ii)a(ii)", &array1, &array2))
203 {
204 printf("Error on edbus_message_arguments_get()\n");
205 return NULL;
206 }
207
208 printf("DoubleCountainer\n{\nArray1:\n");
209 while (edbus_message_iter_get_and_next(array1, 'r', &structure))
210 {
211 edbus_message_iter_arguments_get(structure, "ii", &num1, &num2);
212 printf("1 %d - 2 %d\n", num1, num2);
213 }
214
215 printf("Array2:\n");
216 while (edbus_message_iter_get_and_next(array2, 'r', &structure))
217 {
218 edbus_message_iter_arguments_get(structure, "ii", &num1, &num2);
219 printf("1 %d - 2 %d\n", num1, num2);
220 }
221 printf("}\n\n");
222 return reply;
223}
224
225static Eina_Bool
226_properties_get(const EDBus_Service_Interface *iface EINA_UNUSED, const char *propname, EDBus_Message_Iter *iter, const EDBus_Message *request_msg EINA_UNUSED, EDBus_Message **error EINA_UNUSED)
227{
228 printf("Properties_get - %s\n", propname);
229 if (!strcmp(propname, "Resp2"))
230 edbus_message_iter_basic_append(iter, 's', resp2);
231 else if (!strcmp(propname, "text"))
232 edbus_message_iter_basic_append(iter, 's', "lalalala");
233 else if (!strcmp(propname, "int32"))
234 {
235 edbus_message_iter_arguments_append(iter, "i", int32);
236 int32++;
237 }
238 else if (!strcmp(propname, "st"))
239 {
240 EDBus_Message_Iter *st;
241 edbus_message_iter_arguments_append(iter, "(ss)", &st);
242 edbus_message_iter_arguments_append(st, "ss", "string1", "string2");
243 edbus_message_iter_container_close(iter, st);
244 }
245 return EINA_TRUE;
246}
247
248static EDBus_Message *
249_properties_set(const EDBus_Service_Interface *iface EINA_UNUSED, const char *propname, EDBus_Message_Iter *iter, const EDBus_Message *msg)
250{
251 char *type;
252
253 type = edbus_message_iter_signature_get(iter);
254
255 if (!strcmp(propname, "int32"))
256 {
257 int num;
258 if (type[0] != 'i')
259 goto invalid_signature;
260 edbus_message_iter_arguments_get(iter, "i", &num);
261 printf("int32 was set to: %d, previously was: %d\n", num, int32);
262 int32 = num;
263 }
264 else if (!strcmp(propname, "Resp2"))
265 {
266 const char *txt;
267 if (type[0] != 's')
268 goto invalid_signature;
269 edbus_message_iter_arguments_get(iter, "s", &txt);
270 printf("Resp2 was set to: %s, previously was: %s\n", txt, resp2);
271 free(resp2);
272 resp2 = strdup(txt);
273 }
274 free(type);
275 return edbus_message_method_return_new(msg);
276
277invalid_signature:
278 free(type);
279 return edbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidSignature",
280 "Invalid type.");
281}
282
283static const EDBus_Method methods[] = {
284 {
285 "ReceiveArray", EDBUS_ARGS({"as", "array_of_strings"}),
286 NULL, _receive_array
287 },
288 {
289 "ReceiveArrayOfStringIntWithSize",
290 EDBUS_ARGS({"i", "size_of_array"}, {"a(si)", "array"}),
291 NULL, _receive_array_of_string_int_with_size, 0
292 },
293 {
294 "SendVariantData", EDBUS_ARGS({"v", "variant_data"}),
295 NULL, _send_variant
296 },
297 {
298 "ReceiveVariantData", NULL, EDBUS_ARGS({"v", "variant_data"}),
299 _receive_variant
300 },
301 {
302 "SendArrayInt", NULL,
303 EDBUS_ARGS({"ai", "array_of_int"}), _send_array_int, 0
304 },
305 {
306 "SendArray", NULL, EDBUS_ARGS({"as", "array_string"}),
307 _send_array
308 },
309 {
310 "PlusOne", EDBUS_ARGS({"i", "integer"}),
311 EDBUS_ARGS({"i", "integer_plus_one"}), _plus_one
312 },
313 {
314 "DoubleContainner", EDBUS_ARGS({"a(ii)", "array1"}, {"a(ii)", "array2"}),
315 NULL, _double_container
316 },
317 { }
318};
319
320static const EDBus_Property properties[] = {
321 { "Resp2", "s", NULL, _properties_set },
322 { "text", "s" },
323 { "int32", "i", NULL, _properties_set },
324 { "st", "(ss)" },
325 { }
326};
327
328static const EDBus_Service_Interface_Desc iface_desc = {
329 IFACE, methods, NULL, properties, _properties_get
330};
331
332static Eina_Bool _emit_changed(void *data)
333{
334 EDBus_Service_Interface *iface = data;
335 edbus_service_property_changed(iface, "int32");
336 edbus_service_property_invalidate_set(iface, "Resp2", EINA_TRUE);
337 return ECORE_CALLBACK_RENEW;
338}
339
340static void
341on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
342{
343 unsigned int reply;
344 EDBus_Service_Interface *iface = data;
345
346 if (edbus_message_error_get(msg, NULL, NULL))
347 {
348 printf("error on on_name_request\n");
349 return;
350 }
351
352 if (!edbus_message_arguments_get(msg, "u", &reply))
353 {
354 printf("error geting arguments on on_name_request\n");
355 return;
356 }
357
358 if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)
359 {
360 printf("error name already in use\n");
361 return;
362 }
363
364 timer = ecore_timer_add(3, _emit_changed, iface);
365}
366
367int
368main(void)
369{
370 EDBus_Connection *conn;
371 EDBus_Service_Interface *iface;
372
373 ecore_init();
374 edbus_init();
375
376 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
377
378 resp2 = malloc(sizeof(char) * 5);
379 strcpy(resp2, "test");
380 iface = edbus_service_interface_register(conn, PATH, &iface_desc);
381 edbus_name_request(conn, BUS, EDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE,
382 on_name_request, iface);
383
384 ecore_main_loop_begin();
385
386 free(resp2);
387 ecore_timer_del(timer);
388 edbus_connection_unref(conn);
389
390 edbus_shutdown();
391 ecore_shutdown();
392 return 0;
393}
diff --git a/src/examples/edbus/complex-types.c b/src/examples/edbus/complex-types.c
deleted file mode 100644
index 3fa4e0be68..0000000000
--- a/src/examples/edbus/complex-types.c
+++ /dev/null
@@ -1,284 +0,0 @@
1//Compile with:
2// gcc -o complex-types complex-types.c `pkg-config --cflags --libs edbus2 ecore`
3
4#include "EDBus.h"
5#include <Ecore.h>
6
7#define BUS "com.profusion"
8#define PATH "/com/profusion/Test"
9#define IFACE "com.profusion.Test"
10
11EDBus_Connection *conn;
12
13static Eina_Bool
14_timer1_cb(void *data EINA_UNUSED)
15{
16 printf("\nFishing...\n");
17 ecore_main_loop_quit();
18 return ECORE_CALLBACK_CANCEL;
19}
20
21static void
22on_plus_one(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
23{
24 int num2 = 0;
25
26 if (edbus_message_error_get(msg, NULL, NULL))
27 {
28 printf("Message error\n\n");
29 return;
30 }
31 if (!edbus_message_arguments_get(msg, "i", &num2))
32 {
33 printf("Error getting arguments.");
34 return;
35 }
36
37 printf("on_plus_one() %d\n", num2);
38}
39
40static void
41set_property_resp2(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
42{
43 const char *errname;
44 const char *errmsg;
45
46 printf("set_property_resp2()\n");
47 if (edbus_message_error_get(msg, &errname, &errmsg))
48 {
49 printf("Message error %s - %s\n\n", errname, errmsg);
50 return;
51 }
52}
53
54static void
55get_property_resp2(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
56{
57 EDBus_Proxy *proxy = data;
58 EDBus_Message_Iter *variant = NULL;
59 char *type;
60 char *resp2;
61 const char *errname;
62 const char *errmsg;
63
64 printf("get_property_resp2()\n");
65 if (edbus_message_error_get(msg, &errname, &errmsg))
66 {
67 printf("Message error %s - %s\n\n", errname, errmsg);
68 return;
69 }
70 if (!edbus_message_arguments_get(msg, "v", &variant))
71 {
72 printf("Error getting arguments.");
73 return;
74 }
75
76 type = edbus_message_iter_signature_get(variant);
77 if (type[1])
78 {
79 printf("It is a complex type, not handle yet.\n\n");
80 return;
81 }
82 if (type[0] != 's')
83 {
84 printf("Expected type is string.\n\n");
85 return;
86 }
87 if (!edbus_message_iter_arguments_get(variant, "s", &resp2))
88 {
89 printf("error in edbus_message_iter_arguments_get()\n\n");
90 return;
91 }
92 printf("resp2=%s\n", resp2);
93 free(type);
94
95 edbus_proxy_property_set(proxy, "Resp2", "s", &"lalala", set_property_resp2, NULL);
96 edbus_proxy_property_set(proxy, "int32", "i", (void*)(intptr_t)99, set_property_resp2, NULL);
97}
98
99static void
100on_send_array_int(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
101{
102 EDBus_Message_Iter *array = NULL;
103 int num;
104
105 printf("on_send_array_int()\n");
106 if (edbus_message_error_get(msg, NULL, NULL))
107 {
108 printf("Message error\n\n");
109 return;
110 }
111 if (!edbus_message_arguments_get(msg, "ai", &array))
112 {
113 printf("Error getting arguments.");
114 return;
115 }
116
117 while (edbus_message_iter_get_and_next(array, 'i', &num))
118 {
119 printf("%d\n", num);
120 }
121}
122
123static void
124on_send_array(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
125{
126 EDBus_Message_Iter *array = NULL;
127 char *txt = NULL;
128 char *string[10];
129 int i = 0;
130 int z;
131
132 printf("on_send_array()\n");
133 if (edbus_message_error_get(msg, NULL, NULL))
134 {
135 printf("Message error\n\n");
136 return;
137 }
138 if (!edbus_message_arguments_get(msg, "as", &array))
139 {
140 printf("Error getting arguments.");
141 return;
142 }
143
144 while (edbus_message_iter_get_and_next(array, 's', &txt))
145 {
146 string[i] = txt;
147 i++;
148 }
149
150 for (z = 0; z < i; z++)
151 printf("string = %s\n", string[z]);
152}
153
154static void
155on_receive_array_with_size(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
156{
157 const char *errname;
158 const char *errmsg;
159
160 printf("on_receive_array_with_size()\n");
161 if (edbus_message_error_get(msg, &errname, &errmsg))
162 {
163 fprintf(stderr, "Error: %s %s\n", errname, errmsg);
164 }
165}
166
167static void
168on_send_variant(void *data EINA_UNUSED, const EDBus_Message *msg EINA_UNUSED, EDBus_Pending *pending EINA_UNUSED)
169{
170 printf("on_send_variant()\n\n");
171}
172
173static void
174on_receive_array(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
175{
176 const char *errname;
177 const char *errmsg;
178
179 printf("on_receive_array()\n");
180 if (edbus_message_error_get(msg, &errname, &errmsg))
181 {
182 fprintf(stderr, "Error: %s %s\n", errname, errmsg);
183 }
184}
185
186int
187main(void)
188{
189 EDBus_Object *test2_obj;
190 EDBus_Proxy *test2_proxy;
191 EDBus_Pending *pending;
192 EDBus_Message_Iter *iter, *array_of_string, *variant;
193 EDBus_Message_Iter *array_itr, *structure;
194 EDBus_Message *msg;
195 int size_of_array = 5;
196 const char *array[5] = { "aaaa", "bbbb", "cccc", "dddd", "eeee" };
197 int i;
198 int plus_one = 24;
199
200 ecore_init();
201 edbus_init();
202
203 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
204
205 test2_obj = edbus_object_get(conn, BUS, PATH);
206 test2_proxy = edbus_proxy_get(test2_obj, IFACE);
207
208 msg = edbus_proxy_method_call_new(test2_proxy, "ReceiveArray");
209 iter = edbus_message_iter_get(msg);
210 array_of_string = edbus_message_iter_container_new(iter, 'a',"s");
211 if (!array_of_string) printf("array_of_string == NULL\n\n");
212 for (i = 0; i < 5; i++)
213 edbus_message_iter_basic_append(array_of_string, 's', array[i]);
214 edbus_message_iter_container_close(iter, array_of_string);
215 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array, NULL, -1);
216 if (!pending) printf("Error in edbus_proxy_send()\n\n");
217
218 msg = edbus_proxy_method_call_new(test2_proxy, "ReceiveArrayOfStringIntWithSize");
219 iter = edbus_message_iter_get(msg);
220 if (!edbus_message_iter_arguments_append(iter, "ia(si)", size_of_array, &array_of_string))
221 printf("error on edbus_massage_iterator_arguments_set()\n\n");
222 for (i = 0; i < size_of_array; i++)
223 {
224 EDBus_Message_Iter *struct_of_si;
225 edbus_message_iter_arguments_append(array_of_string, "(si)", &struct_of_si);
226 edbus_message_iter_arguments_append(struct_of_si, "si", array[i], i);
227 edbus_message_iter_container_close(array_of_string, struct_of_si);
228 }
229 edbus_message_iter_container_close(iter, array_of_string);
230 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array_with_size, NULL, -1);
231
232 msg = edbus_proxy_method_call_new(test2_proxy, "SendVariantData");
233 iter = edbus_message_iter_get(msg);
234 variant = edbus_message_iter_container_new(iter, 'v', "s");
235 edbus_message_iter_basic_append(variant, 's', "test");
236 edbus_message_iter_container_close(iter, variant);
237 pending = edbus_proxy_send(test2_proxy, msg, on_send_variant, NULL, -1);
238
239 msg = edbus_proxy_method_call_new(test2_proxy, "DoubleContainner");
240 iter = edbus_message_iter_get(msg);
241 /**
242 * edbus_message_iterator_arguments_set(itr, "a(ii)a(ii)", &array_itr, &array_itr2);
243 * this will cause a error, we could not open another container until
244 * we close the first one
245 */
246 edbus_message_iter_arguments_append(iter, "a(ii)", &array_itr);
247 for (i = 0; i < 5; i++)
248 {
249 edbus_message_iter_arguments_append(array_itr, "(ii)", &structure);
250 edbus_message_iter_arguments_append(structure, "ii", i, i*i);
251 edbus_message_iter_container_close(array_itr, structure);
252 }
253 edbus_message_iter_container_close(iter, array_itr);
254 edbus_message_iter_arguments_append(iter, "a(ii)", &array_itr);
255 for (i = 0; i < 7; i++)
256 {
257 edbus_message_iter_arguments_append(array_itr, "(ii)", &structure);
258 edbus_message_iter_arguments_append(structure, "ii", i, i*i*i);
259 edbus_message_iter_container_close(array_itr, structure);
260 }
261 edbus_message_iter_container_close(iter, array_itr);
262 edbus_proxy_send(test2_proxy, msg, NULL, NULL, -1);
263
264 pending = edbus_proxy_call(test2_proxy, "SendArrayInt", on_send_array_int, NULL,
265 -1 , "");
266
267 pending = edbus_proxy_call(test2_proxy, "SendArray", on_send_array, NULL,
268 -1 , "");
269
270 pending = edbus_proxy_call(test2_proxy, "PlusOne", on_plus_one, NULL,
271 -1 , "i", plus_one);
272
273 pending = edbus_proxy_property_get(test2_proxy, "Resp2", get_property_resp2, test2_proxy);
274
275 ecore_timer_add(10, _timer1_cb, NULL);
276
277 ecore_main_loop_begin();
278
279 edbus_connection_unref(conn);
280
281 edbus_shutdown();
282 ecore_shutdown();
283 return 0;
284}
diff --git a/src/examples/edbus/server.c b/src/examples/edbus/server.c
deleted file mode 100644
index d10a672fe6..0000000000
--- a/src/examples/edbus/server.c
+++ /dev/null
@@ -1,247 +0,0 @@
1//Compile with:
2// gcc -o server server.c `pkg-config --cflags --libs edbus2 ecore`
3
4#include "EDBus.h"
5#include <Ecore.h>
6
7#define BUS "org.Enlightenment"
8#define PATH "/org/enlightenment"
9#define PATH_TEST_SON "/org/enlightenment/son"
10#define INTERFACE "org.enlightenment.Test"
11
12static EDBus_Connection *conn;
13
14static EDBus_Message *
15_hello(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *message)
16{
17 EDBus_Message *reply = edbus_message_method_return_new(message);
18 edbus_message_arguments_append(reply, "s", "Hello World");
19 printf("Hello\n");
20 return reply;
21}
22
23static EDBus_Message *
24_quit(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *message)
25{
26 printf("Quit\n");
27 ecore_main_loop_quit();
28 return edbus_message_method_return_new(message);
29}
30
31enum
32{
33 TEST_SIGNAL_ALIVE = 0,
34 TEST_SIGNAL_HELLO
35};
36
37static Eina_Bool
38send_signal_alive(void *data)
39{
40 EDBus_Service_Interface *iface = data;
41 edbus_service_signal_emit(iface, TEST_SIGNAL_ALIVE);
42 return ECORE_CALLBACK_RENEW;
43}
44
45static Eina_Bool
46send_signal_hello(void *data)
47{
48 EDBus_Service_Interface *iface = data;
49 edbus_service_signal_emit(iface, TEST_SIGNAL_HELLO, "Hello World");
50 return ECORE_CALLBACK_RENEW;
51}
52
53static EDBus_Message *
54_send_bool(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
55{
56 EDBus_Message *reply = edbus_message_method_return_new(msg);
57 Eina_Bool bool;
58 if (!edbus_message_arguments_get(msg, "b", &bool))
59 printf("edbus_message_arguments_get() error\n");
60 edbus_message_arguments_append(reply, "b", bool);
61 return reply;
62}
63
64static EDBus_Message *
65_send_byte(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
66{
67 EDBus_Message *reply = edbus_message_method_return_new(msg);
68 unsigned char byte;
69 if (!edbus_message_arguments_get(msg, "y", &byte))
70 printf("edbus_message_arguments_get() error\n");
71 edbus_message_arguments_append(reply, "y", byte);
72 return reply;
73}
74
75static EDBus_Message *
76_send_uint32(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
77{
78 EDBus_Message *reply = edbus_message_method_return_new(msg);
79 unsigned int uint32;
80 if (!edbus_message_arguments_get(msg, "u", &uint32))
81 printf("edbus_message_arguments_get() error\n");
82 edbus_message_arguments_append(reply, "u", uint32);
83 return reply;
84}
85
86static EDBus_Message *
87_send_int32(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
88{
89 EDBus_Message *reply = edbus_message_method_return_new(msg);
90 int int32;
91 if (!edbus_message_arguments_get(msg, "i", &int32))
92 printf("edbus_message_arguments_get() error\n");
93 edbus_message_arguments_append(reply, "i", int32);
94 return reply;
95}
96
97static EDBus_Message *
98_send_int16(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
99{
100 EDBus_Message *reply = edbus_message_method_return_new(msg);
101 short int int16;
102 if (!edbus_message_arguments_get(msg, "n", &int16))
103 printf("edbus_message_arguments_get() error\n");
104 edbus_message_arguments_append(reply, "n", int16);
105 return reply;
106}
107
108static EDBus_Message *
109_send_double(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
110{
111 EDBus_Message *reply = edbus_message_method_return_new(msg);
112 double d;
113 if (!edbus_message_arguments_get(msg, "d", &d))
114 printf("edbus_message_arguments_get() error\n");
115 edbus_message_arguments_append(reply, "d", d);
116 return reply;
117}
118
119static EDBus_Message *
120_send_string(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
121{
122 EDBus_Message *reply = edbus_message_method_return_new(msg);
123 const char *txt;
124 if (!edbus_message_arguments_get(msg, "s", &txt))
125 printf("edbus_message_arguments_get() error\n");
126 edbus_message_arguments_append(reply, "s", txt);
127 return reply;
128}
129
130static Eina_Bool
131_resp_async(void *data)
132{
133 EDBus_Message *msg = data;
134 edbus_message_arguments_append(msg, "s", "Async test ok");
135 edbus_connection_send(conn, msg, NULL, NULL, -1);
136 return ECORE_CALLBACK_CANCEL;
137}
138
139static EDBus_Message *
140_async_test(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
141{
142 EDBus_Message *reply = edbus_message_method_return_new(msg);
143 printf("Received a call to AsyncTest.\n");
144 printf("Response will be send in 5 seconds.\n");
145 ecore_timer_add(5, _resp_async, reply);
146 return NULL;
147}
148
149static const EDBus_Signal signals[] = {
150 [TEST_SIGNAL_ALIVE] = {"Alive", NULL, 0},
151 [TEST_SIGNAL_HELLO] = {"Hello", EDBUS_ARGS({ "s", "message" }), 0},
152 { }
153};
154
155static const EDBus_Method methods[] = {
156 {
157 "Hello", NULL, EDBUS_ARGS({"s", "message"}),
158 _hello
159 },
160 {
161 "Quit", NULL, NULL,
162 _quit, EDBUS_METHOD_FLAG_DEPRECATED
163 },
164 { "SendBool", EDBUS_ARGS({"b", "bool"}), EDBUS_ARGS({"b", "bool"}),
165 _send_bool
166 },
167 { "SendByte", EDBUS_ARGS({"y", "byte"}), EDBUS_ARGS({"y", "byte"}),
168 _send_byte
169 },
170 { "SendUint32", EDBUS_ARGS({"u", "uint32"}), EDBUS_ARGS({"u", "uint32"}),
171 _send_uint32
172 },
173 { "SendInt32", EDBUS_ARGS({"i", "int32"}), EDBUS_ARGS({"i", "int32"}),
174 _send_int32
175 },
176 { "SendInt16", EDBUS_ARGS({"n", "int16"}), EDBUS_ARGS({"n", "int16"}),
177 _send_int16
178 },
179 { "SendDouble", EDBUS_ARGS({"d", "double"}), EDBUS_ARGS({"d", "double"}),
180 _send_double
181 },
182 { "SendString", EDBUS_ARGS({"s", "string"}), EDBUS_ARGS({"s", "string"}),
183 _send_string
184 },
185 { "AsyncTest", NULL, EDBUS_ARGS({"s", "text"}),
186 _async_test
187 },
188 { }
189};
190
191static const EDBus_Service_Interface_Desc iface_desc = {
192 INTERFACE, methods, signals
193};
194
195static void
196on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
197{
198 EDBus_Service_Interface *iface;
199 unsigned int reply;
200
201 iface = data;
202 if (edbus_message_error_get(msg, NULL, NULL))
203 {
204 printf("error on on_name_request\n");
205 return;
206 }
207
208 if (!edbus_message_arguments_get(msg, "u", &reply))
209 {
210 printf("error geting arguments on on_name_request\n");
211 return;
212 }
213
214 if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)
215 {
216 printf("error name already in use\n");
217 return;
218 }
219
220 ecore_timer_add(5, send_signal_alive, iface);
221 ecore_timer_add(6, send_signal_hello, iface);
222}
223
224int
225main(void)
226{
227 EDBus_Service_Interface *iface;
228
229 ecore_init();
230 edbus_init();
231
232 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
233
234 iface = edbus_service_interface_register(conn, PATH, &iface_desc);
235 edbus_name_request(conn, BUS, EDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE,
236 on_name_request, iface);
237
238 edbus_service_interface_register(conn, PATH_TEST_SON, &iface_desc);
239
240 ecore_main_loop_begin();
241
242 edbus_connection_unref(conn);
243
244 edbus_shutdown();
245 ecore_shutdown();
246 return 0;
247}
diff --git a/src/examples/edbus/simple-signal-emit.c b/src/examples/edbus/simple-signal-emit.c
deleted file mode 100644
index 14e1fee705..0000000000
--- a/src/examples/edbus/simple-signal-emit.c
+++ /dev/null
@@ -1,86 +0,0 @@
1//Compile with:
2// gcc -o simple-signal-emit simple-signal-emit.c `pkg-config --cflags --libs edbus2`
3
4#include <EDBus.h>
5
6enum {
7 TEST_SIGNAL_ALIVE,
8 TEST_SIGNAL_PROP,
9 TEST_SIGNAL_NAME,
10};
11
12static const EDBus_Signal test_signals[] = {
13 [TEST_SIGNAL_ALIVE] = { "Alive" },
14 [TEST_SIGNAL_PROP] = { "Properties", EDBUS_ARGS({ "a{ss}", "properties"}) },
15 [TEST_SIGNAL_NAME] = { "Name", EDBUS_ARGS({ "s", "name"}) },
16 { }
17};
18
19/* signal with complex arguments (a dict) */
20static void emit_properties(EDBus_Service_Interface *iface)
21{
22 EDBus_Message *alive2;
23 EDBus_Message_Iter *iter, *dict;
24 struct keyval {
25 const char *key;
26 const char *val;
27 } keyval[] = {
28 { "key1", "val1" },
29 { "key2", "val2" },
30 { }
31 };
32 struct keyval *k;
33
34 alive2 = edbus_service_signal_new(iface, TEST_SIGNAL_PROP);
35 iter = edbus_message_iter_get(alive2);
36 dict = edbus_message_iter_container_new(iter, 'a', "{ss}");
37
38 for (k = keyval; k && k->key; k++)
39 {
40 EDBus_Message_Iter *entry = edbus_message_iter_container_new(dict, 'e',
41 NULL);
42 edbus_message_iter_arguments_append(entry, "ss", k->key, k->val);
43 edbus_message_iter_container_close(dict, entry);
44 }
45
46 edbus_message_iter_container_close(iter, dict);
47 edbus_service_signal_send(iface, alive2);
48}
49
50/* signal with basic args */
51static void emit_name(EDBus_Service_Interface *iface)
52{
53 edbus_service_signal_emit(iface, TEST_SIGNAL_NAME, "TEST");
54}
55
56/* simple signal example */
57static void emit_alive(EDBus_Service_Interface *iface)
58{
59 edbus_service_signal_emit(iface, TEST_SIGNAL_ALIVE);
60}
61
62static const EDBus_Service_Interface_Desc iface_desc = {
63 "org.enlightenment.Test", NULL, test_signals
64};
65
66int main(void)
67{
68 EDBus_Connection *conn;
69 EDBus_Service_Interface *iface;
70
71 edbus_init();
72
73 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION);
74 iface = edbus_service_interface_register(conn, "/org/enlightenment",
75 &iface_desc);
76
77 emit_alive(iface);
78 emit_name(iface);
79 emit_properties(iface);
80
81 edbus_connection_unref(conn);
82
83 edbus_shutdown();
84
85 return 0;
86}
diff --git a/src/examples/edbus/Makefile.am b/src/examples/eldbus/Makefile.am
index 891de027bc..8163a4252e 100644
--- a/src/examples/edbus/Makefile.am
+++ b/src/examples/eldbus/Makefile.am
@@ -4,19 +4,19 @@ AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/eina \ 4-I$(top_srcdir)/src/lib/eina \
5-I$(top_srcdir)/src/lib/eo \ 5-I$(top_srcdir)/src/lib/eo \
6-I$(top_srcdir)/src/lib/ecore \ 6-I$(top_srcdir)/src/lib/ecore \
7-I$(top_srcdir)/src/lib/edbus \ 7-I$(top_srcdir)/src/lib/eldbus \
8-I$(top_builddir)/src/lib/eina \ 8-I$(top_builddir)/src/lib/eina \
9-I$(top_builddir)/src/lib/eo \ 9-I$(top_builddir)/src/lib/eo \
10-I$(top_builddir)/src/lib/ecore \ 10-I$(top_builddir)/src/lib/ecore \
11-I$(top_builddir)/src/lib/edbus \ 11-I$(top_builddir)/src/lib/eldbus \
12@EDBUS_CFLAGS@ 12@ELDBUS_CFLAGS@
13 13
14EXAMPLES_LIBS = \ 14EXAMPLES_LIBS = \
15$(top_builddir)/src/lib/eo/libeo.la \ 15$(top_builddir)/src/lib/eo/libeo.la \
16$(top_builddir)/src/lib/ecore/libecore.la \ 16$(top_builddir)/src/lib/ecore/libecore.la \
17$(top_builddir)/src/lib/eina/libeina.la \ 17$(top_builddir)/src/lib/eina/libeina.la \
18$(top_builddir)/src/lib/edbus/libedbus2.la \ 18$(top_builddir)/src/lib/eldbus/libeldbus.la \
19@EDBUS_LDFLAGS@ 19@ELDBUS_LDFLAGS@
20 20
21SRCS = \ 21SRCS = \
22connman-list-services.c \ 22connman-list-services.c \
@@ -77,12 +77,12 @@ clean-local:
77 rm -f $(EXTRA_PROGRAMS) 77 rm -f $(EXTRA_PROGRAMS)
78 78
79install-examples: 79install-examples:
80 mkdir -p $(datadir)/edbus/examples 80 mkdir -p $(datadir)/eldbus/examples
81 $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/edbus/examples 81 $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eldbus/examples
82 82
83uninstall-local: 83uninstall-local:
84 for f in $(SRCS) $(DATA_FILES); do \ 84 for f in $(SRCS) $(DATA_FILES); do \
85 rm -f $(datadir)/edbus/examples/$$f ; \ 85 rm -f $(datadir)/eldbus/examples/$$f ; \
86 done 86 done
87 87
88if ALWAYS_BUILD_EXAMPLES 88if ALWAYS_BUILD_EXAMPLES
diff --git a/src/examples/edbus/Makefile.examples b/src/examples/eldbus/Makefile.examples
index d1227bfb22..32d0d93858 100644
--- a/src/examples/edbus/Makefile.examples
+++ b/src/examples/eldbus/Makefile.examples
@@ -1,5 +1,5 @@
1CC=gcc 1CC=gcc
2COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,edbus2` 2COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,eldbus`
3 3
4EXAMPLES= banshee client \ 4EXAMPLES= banshee client \
5 complex-types \ 5 complex-types \
diff --git a/src/examples/eldbus/banshee.c b/src/examples/eldbus/banshee.c
new file mode 100644
index 0000000000..c9d30b5bf0
--- /dev/null
+++ b/src/examples/eldbus/banshee.c
@@ -0,0 +1,241 @@
1//Compile with:
2// gcc -o banshee banshee.c `pkg-config --cflags --libs eldbus ecore eina`
3
4#include "Eldbus.h"
5#include <Ecore.h>
6
7#define BUS "org.bansheeproject.Banshee"
8#define ENGINE_PATH "/org/bansheeproject/Banshee/PlayerEngine"
9#define CONTROLLER_PATH "/org/bansheeproject/Banshee/PlaybackController"
10#define MPRIS_PATH "/org/mpris/MediaPlayer2"
11
12#define ENGINE_IFACE "org.bansheeproject.Banshee.PlayerEngine"
13#define CONTROLLER_IFACE "org.bansheeproject.Banshee.PlaybackController"
14#define MPRIS_IFACE "org.mpris.MediaPlayer2.Playlists"
15
16static Eldbus_Signal_Handler *state_changed2;
17
18static Eina_Bool
19_timeout_application(void *data EINA_UNUSED)
20{
21 printf("\n## ecore_main_loop_quit()\n");
22 ecore_main_loop_quit();
23 return EINA_TRUE;
24}
25
26static void
27on_get_playlists(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
28{
29 Eldbus_Message_Iter *array, *struct_entry;
30 const char *path, *name, *image;
31 int i = 0;
32
33 EINA_SAFETY_ON_TRUE_RETURN(eldbus_message_error_get(msg, NULL, NULL));
34
35 if (!eldbus_message_arguments_get(msg, "a(oss)", &array))
36 {
37 fprintf(stderr, "Error: could not get entry contents\n");
38 return;
39 }
40 printf("on_get_playlists() \n\n");