summaryrefslogtreecommitdiff
path: root/src/bin/eldbus
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/bin/eldbus
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/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
6 files changed, 130 insertions, 130 deletions
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}