summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiscomfitor <michael.blumenkrantz@gmail.com>2013-10-19 07:57:59 +0100
committerdiscomfitor <michael.blumenkrantz@gmail.com>2013-10-19 07:57:59 +0100
commit09f272f5157d4294bff9d82dc430e209472e087e (patch)
tree315c126602a19a4e8b271ca942e55004844045e7
parentd92a4b041dd42987fed713b336ae7404d51ac03f (diff)
fix compile
-rw-r--r--src/bin/dbus.c84
-rw-r--r--src/lib/erssd_dbus.c36
2 files changed, 60 insertions, 60 deletions
diff --git a/src/bin/dbus.c b/src/bin/dbus.c
index 2c9a0c2..d03804b 100644
--- a/src/bin/dbus.c
+++ b/src/bin/dbus.c
@@ -1,41 +1,41 @@
1#include "erssd.h" 1#include "erssd.h"
2 2
3#include <EDBus.h> 3#include <Eldbus.h>
4 4
5static EDBus_Connection *erssd_dbus_conn = NULL; 5static Eldbus_Connection *erssd_dbus_conn = NULL;
6static EDBus_Service_Interface *erssd_base_iface = NULL; 6static Eldbus_Service_Interface *erssd_base_iface = NULL;
7static EDBus_Service_Interface *erssd_feed_iface = NULL; 7static Eldbus_Service_Interface *erssd_feed_iface = NULL;
8 8
9/////////////////// METHODS /////////////////////////////////////// 9/////////////////// METHODS ///////////////////////////////////////
10/******************* BASE *****************************************/ 10/******************* BASE *****************************************/
11static EDBus_Message * 11static Eldbus_Message *
12_dbus_cfgfile_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg EINA_UNUSED) 12_dbus_cfgfile_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg EINA_UNUSED)
13{ 13{
14 EDBus_Message *reply; 14 Eldbus_Message *reply;
15 15
16 reply = eldbus_message_method_return_new(msg); 16 reply = eldbus_message_method_return_new(msg);
17 eldbus_message_arguments_append(reply, "s", erssd_eet_feed_cfgfile_get()); 17 eldbus_message_arguments_append(reply, "s", erssd_eet_feed_cfgfile_get());
18 return reply; 18 return reply;
19} 19}
20 20
21static EDBus_Message * 21static Eldbus_Message *
22_dbus_cachefile_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg EINA_UNUSED) 22_dbus_cachefile_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg EINA_UNUSED)
23{ 23{
24 EDBus_Message *reply; 24 Eldbus_Message *reply;
25 25
26 reply = eldbus_message_method_return_new(msg); 26 reply = eldbus_message_method_return_new(msg);
27 eldbus_message_arguments_append(reply, "s", erssd_eet_feed_cachefile_get()); 27 eldbus_message_arguments_append(reply, "s", erssd_eet_feed_cachefile_get());
28 return reply; 28 return reply;
29} 29}
30 30
31static EDBus_Message * 31static Eldbus_Message *
32_dbus_quit_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg EINA_UNUSED) 32_dbus_quit_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg EINA_UNUSED)
33{ 33{
34 erssd_exit(0); 34 erssd_exit(0);
35 return NULL; 35 return NULL;
36} 36}
37 37
38static const EDBus_Method base_methods[] = 38static const Eldbus_Method base_methods[] =
39{ 39{
40 { "FeedConfigFile", NULL, ELDBUS_ARGS({"s", "Path to currently-used feed config file"}), _dbus_cfgfile_cb, 0}, 40 { "FeedConfigFile", NULL, ELDBUS_ARGS({"s", "Path to currently-used feed config file"}), _dbus_cfgfile_cb, 0},
41 { "FeedCacheFile", NULL, ELDBUS_ARGS({"s", "Path to currently-used feed cache file"}), _dbus_cachefile_cb, 0}, 41 { "FeedCacheFile", NULL, ELDBUS_ARGS({"s", "Path to currently-used feed cache file"}), _dbus_cachefile_cb, 0},
@@ -43,17 +43,17 @@ static const EDBus_Method base_methods[] =
43 {NULL, NULL, NULL, NULL, 0} 43 {NULL, NULL, NULL, NULL, 0}
44}; 44};
45 45
46static const EDBus_Service_Interface_Desc base_desc = 46static const Eldbus_Service_Interface_Desc base_desc =
47{ 47{
48 ERSSD_INTERFACE, base_methods, NULL, NULL, NULL, NULL 48 ERSSD_INTERFACE, base_methods, NULL, NULL, NULL, NULL
49}; 49};
50/******************* FEED *****************************************/ 50/******************* FEED *****************************************/
51static EDBus_Message * 51static Eldbus_Message *
52_dbus_feed_add_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 52_dbus_feed_add_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
53{ 53{
54 char *url; 54 char *url;
55 Eina_Bool ret; 55 Eina_Bool ret;
56 EDBus_Message *reply; 56 Eldbus_Message *reply;
57 const char *error_name, *error_text; 57 const char *error_name, *error_text;
58 58
59 if (eldbus_message_error_get(msg, &error_name, &error_text)) 59 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -72,12 +72,12 @@ error:
72 return reply; 72 return reply;
73} 73}
74 74
75static EDBus_Message * 75static Eldbus_Message *
76_dbus_feed_del_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 76_dbus_feed_del_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
77{ 77{
78 char *url; 78 char *url;
79 Eina_Bool ret; 79 Eina_Bool ret;
80 EDBus_Message *reply; 80 Eldbus_Message *reply;
81 const char *error_name, *error_text; 81 const char *error_name, *error_text;
82 82
83 if (eldbus_message_error_get(msg, &error_name, &error_text)) 83 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -97,17 +97,17 @@ error:
97} 97}
98 98
99static Eina_Bool 99static Eina_Bool
100_dbus_feed_list_hasher(const Eina_Hash *h EINA_UNUSED, const char *key, void *data EINA_UNUSED, EDBus_Message_Iter *iter) 100_dbus_feed_list_hasher(const Eina_Hash *h EINA_UNUSED, const char *key, void *data EINA_UNUSED, Eldbus_Message_Iter *iter)
101{ 101{
102 eldbus_message_iter_basic_append(iter, 's', key); 102 eldbus_message_iter_basic_append(iter, 's', key);
103 return EINA_TRUE; 103 return EINA_TRUE;
104} 104}
105 105
106static EDBus_Message * 106static Eldbus_Message *
107_dbus_feed_list_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 107_dbus_feed_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
108{ 108{
109 EDBus_Message *reply; 109 Eldbus_Message *reply;
110 EDBus_Message_Iter *iter, *array; 110 Eldbus_Message_Iter *iter, *array;
111 111
112 reply = eldbus_message_method_return_new(msg); 112 reply = eldbus_message_method_return_new(msg);
113 iter = eldbus_message_iter_get(reply); 113 iter = eldbus_message_iter_get(reply);
@@ -117,12 +117,12 @@ _dbus_feed_list_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus
117 return reply; 117 return reply;
118} 118}
119 119
120static EDBus_Message * 120static Eldbus_Message *
121_dbus_feed_item_clear_read_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 121_dbus_feed_item_clear_read_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
122{ 122{
123 char *url; 123 char *url;
124 Rss_Feed *feed; 124 Rss_Feed *feed;
125 EDBus_Message *reply; 125 Eldbus_Message *reply;
126 const char *error_name, *error_text; 126 const char *error_name, *error_text;
127 127
128 if (eldbus_message_error_get(msg, &error_name, &error_text)) 128 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -141,12 +141,12 @@ error:
141 return reply; 141 return reply;
142} 142}
143 143
144static EDBus_Message * 144static Eldbus_Message *
145_dbus_feed_item_read_all_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 145_dbus_feed_item_read_all_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
146{ 146{
147 char *url; 147 char *url;
148 Rss_Feed *feed; 148 Rss_Feed *feed;
149 EDBus_Message *reply; 149 Eldbus_Message *reply;
150 const char *error_name, *error_text; 150 const char *error_name, *error_text;
151 151
152 if (eldbus_message_error_get(msg, &error_name, &error_text)) 152 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -165,12 +165,12 @@ error:
165 return reply; 165 return reply;
166} 166}
167 167
168static EDBus_Message * 168static Eldbus_Message *
169_dbus_feed_item_read_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 169_dbus_feed_item_read_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
170{ 170{
171 char *url, *uuid; 171 char *url, *uuid;
172 Rss_Feed *feed; 172 Rss_Feed *feed;
173 EDBus_Message *reply; 173 Eldbus_Message *reply;
174 const char *error_name, *error_text; 174 const char *error_name, *error_text;
175 175
176 if (eldbus_message_error_get(msg, &error_name, &error_text)) 176 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -190,12 +190,12 @@ error:
190 return reply; 190 return reply;
191} 191}
192 192
193static EDBus_Message * 193static Eldbus_Message *
194_dbus_feed_item_unread_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg) 194_dbus_feed_item_unread_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
195{ 195{
196 char *url, *uuid; 196 char *url, *uuid;
197 Rss_Feed *feed; 197 Rss_Feed *feed;
198 EDBus_Message *reply; 198 Eldbus_Message *reply;
199 const char *error_name, *error_text; 199 const char *error_name, *error_text;
200 200
201 if (eldbus_message_error_get(msg, &error_name, &error_text)) 201 if (eldbus_message_error_get(msg, &error_name, &error_text))
@@ -215,7 +215,7 @@ error:
215 return reply; 215 return reply;
216} 216}
217 217
218static const EDBus_Method feed_methods[] = 218static const Eldbus_Method feed_methods[] =
219{ 219{
220 { "Add", ELDBUS_ARGS({"s", "url"}), ELDBUS_ARGS({"b", "success"}), _dbus_feed_add_cb, 0}, 220 { "Add", ELDBUS_ARGS({"s", "url"}), ELDBUS_ARGS({"b", "success"}), _dbus_feed_add_cb, 0},
221 { "List", NULL, ELDBUS_ARGS({"as", "urls"}), _dbus_feed_list_cb, 0}, 221 { "List", NULL, ELDBUS_ARGS({"as", "urls"}), _dbus_feed_list_cb, 0},
@@ -230,7 +230,7 @@ static const EDBus_Method feed_methods[] =
230/////////////////// SIGNALS /////////////////////////////////////// 230/////////////////// SIGNALS ///////////////////////////////////////
231 231
232 232
233static const EDBus_Signal feed_signals[] = 233static const Eldbus_Signal feed_signals[] =
234{ 234{
235 [ERSSD_SIGNAL_FEED_ADD] = {"Add", ELDBUS_ARGS({"s", "Feed URL"}), 0}, 235 [ERSSD_SIGNAL_FEED_ADD] = {"Add", ELDBUS_ARGS({"s", "Feed URL"}), 0},
236 [ERSSD_SIGNAL_FEED_DEL] = {"Del", ELDBUS_ARGS({"s", "Feed URL"}), 0}, 236 [ERSSD_SIGNAL_FEED_DEL] = {"Del", ELDBUS_ARGS({"s", "Feed URL"}), 0},
@@ -264,13 +264,13 @@ erssd_dbus_signal_feed_updated(const Rss_Feed *feed, unsigned int new_items)
264} 264}
265 265
266////////////// INIT /////////////////////////////// 266////////////// INIT ///////////////////////////////
267static const EDBus_Service_Interface_Desc feed_desc = 267static const Eldbus_Service_Interface_Desc feed_desc =
268{ 268{
269 ERSSD_FEED_INTERFACE, feed_methods, feed_signals, NULL, NULL, NULL 269 ERSSD_FEED_INTERFACE, feed_methods, feed_signals, NULL, NULL, NULL
270}; 270};
271 271
272static void 272static void
273_nameowned(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 273_nameowned(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
274{ 274{
275 unsigned int reply; 275 unsigned int reply;
276 if (eldbus_message_error_get(msg, NULL, NULL)) 276 if (eldbus_message_error_get(msg, NULL, NULL))
@@ -295,7 +295,7 @@ _nameowned(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pend
295Eina_Bool 295Eina_Bool
296erssd_dbus_init(void) 296erssd_dbus_init(void)
297{ 297{
298 EDBus_Service_Interface *iface; 298 Eldbus_Service_Interface *iface;
299 299
300 if (!eldbus_init()) return EINA_FALSE; 300 if (!eldbus_init()) return EINA_FALSE;
301 301
diff --git a/src/lib/erssd_dbus.c b/src/lib/erssd_dbus.c
index f3227bb..c1b4cc7 100644
--- a/src/lib/erssd_dbus.c
+++ b/src/lib/erssd_dbus.c
@@ -16,7 +16,7 @@ static CB_Data nameowner[2];
16 16
17static CB_Data callbacks[4][2]; 17static CB_Data callbacks[4][2];
18 18
19static EDBus_Signal_Handler *handlers[4][2] = {{NULL}}; 19static Eldbus_Signal_Handler *handlers[4][2] = {{NULL}};
20 20
21static const char *const signal_members[] = 21static const char *const signal_members[] =
22{ 22{
@@ -28,7 +28,7 @@ static const char *const signal_members[] =
28 28
29static int conn_types[] = {ELDBUS_CONNECTION_TYPE_SESSION, ELDBUS_CONNECTION_TYPE_SYSTEM}; 29static int conn_types[] = {ELDBUS_CONNECTION_TYPE_SESSION, ELDBUS_CONNECTION_TYPE_SYSTEM};
30 30
31static EDBus_Connection *erssd_dbus_conn[2] = {NULL}; 31static Eldbus_Connection *erssd_dbus_conn[2] = {NULL};
32 32
33Eina_Bool 33Eina_Bool
34_dbus_conn_setup(Eina_Bool system_bus) 34_dbus_conn_setup(Eina_Bool system_bus)
@@ -39,7 +39,7 @@ _dbus_conn_setup(Eina_Bool system_bus)
39} 39}
40 40
41static void 41static void
42_dbus_string_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 42_dbus_string_return(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
43{ 43{
44 CB_Data *cbd = data; 44 CB_Data *cbd = data;
45 Erssd_Util_Data_Cb cb; 45 Erssd_Util_Data_Cb cb;
@@ -59,11 +59,11 @@ _dbus_string_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending
59} 59}
60 60
61static void 61static void
62_dbus_stringlist_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 62_dbus_stringlist_return(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
63{ 63{
64 CB_Data *cbd = data; 64 CB_Data *cbd = data;
65 Erssd_Util_Data_Cb cb; 65 Erssd_Util_Data_Cb cb;
66 EDBus_Message_Iter *array; 66 Eldbus_Message_Iter *array;
67 Eina_List *ret = NULL; 67 Eina_List *ret = NULL;
68 char *str; 68 char *str;
69 const char *error_name, *error_text; 69 const char *error_name, *error_text;
@@ -88,7 +88,7 @@ _dbus_stringlist_return(void *data, const EDBus_Message *msg, EDBus_Pending *pen
88} 88}
89 89
90static void 90static void
91_dbus_bool_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 91_dbus_bool_return(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
92{ 92{
93 CB_Data *cbd = data; 93 CB_Data *cbd = data;
94 Erssd_Util_Data_Cb cb; 94 Erssd_Util_Data_Cb cb;
@@ -107,7 +107,7 @@ _dbus_bool_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending E
107} 107}
108 108
109static void 109static void
110_dbus_void_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 110_dbus_void_return(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
111{ 111{
112 CB_Data *cbd = data; 112 CB_Data *cbd = data;
113 Erssd_Util_Void_Cb cb; 113 Erssd_Util_Void_Cb cb;
@@ -123,7 +123,7 @@ _dbus_void_return(void *data, const EDBus_Message *msg, EDBus_Pending *pending E
123} 123}
124 124
125static void 125static void
126_dbus_signal_feed_add(void *data, const EDBus_Message *msg) 126_dbus_signal_feed_add(void *data, const Eldbus_Message *msg)
127{ 127{
128 char *url; 128 char *url;
129 Eina_Stringshare *s = NULL; 129 Eina_Stringshare *s = NULL;
@@ -139,7 +139,7 @@ _dbus_signal_feed_add(void *data, const EDBus_Message *msg)
139} 139}
140 140
141static void 141static void
142_dbus_signal_feed_del(void *data, const EDBus_Message *msg) 142_dbus_signal_feed_del(void *data, const Eldbus_Message *msg)
143{ 143{
144 char *url; 144 char *url;
145 Eina_Stringshare *s = NULL; 145 Eina_Stringshare *s = NULL;
@@ -155,7 +155,7 @@ _dbus_signal_feed_del(void *data, const EDBus_Message *msg)
155} 155}
156 156
157static void 157static void
158_dbus_signal_feed_updated(void *data, const EDBus_Message *msg) 158_dbus_signal_feed_updated(void *data, const Eldbus_Message *msg)
159{ 159{
160 char *url; 160 char *url;
161 Eina_Stringshare *s = NULL; 161 Eina_Stringshare *s = NULL;
@@ -172,7 +172,7 @@ _dbus_signal_feed_updated(void *data, const EDBus_Message *msg)
172} 172}
173 173
174static void 174static void
175_dbus_signal_feed_item_read(void *data, const EDBus_Message *msg) 175_dbus_signal_feed_item_read(void *data, const Eldbus_Message *msg)
176{ 176{
177 char *url, *uuid; 177 char *url, *uuid;
178 Eina_Stringshare *s = NULL, *ss = NULL; 178 Eina_Stringshare *s = NULL, *ss = NULL;
@@ -192,9 +192,9 @@ _dbus_signal_feed_item_read(void *data, const EDBus_Message *msg)
192} 192}
193 193
194static Eina_Bool 194static Eina_Bool
195_dbus_call_helper(Eina_Bool system_bus, const char *method, void *cb, const void *data, EDBus_Message_Cb retcb) 195_dbus_call_helper(Eina_Bool system_bus, const char *method, void *cb, const void *data, Eldbus_Message_Cb retcb)
196{ 196{
197 EDBus_Message *msg; 197 Eldbus_Message *msg;
198 CB_Data *cbd; 198 CB_Data *cbd;
199 Eina_Bool ret; 199 Eina_Bool ret;
200 200
@@ -211,9 +211,9 @@ _dbus_call_helper(Eina_Bool system_bus, const char *method, void *cb, const void
211} 211}
212 212
213static Eina_Bool 213static Eina_Bool
214_dbus_feed_call_helper(Eina_Bool system_bus, const char *method, const char *feed_url, void *cb, const void *data, EDBus_Message_Cb retcb) 214_dbus_feed_call_helper(Eina_Bool system_bus, const char *method, const char *feed_url, void *cb, const void *data, Eldbus_Message_Cb retcb)
215{ 215{
216 EDBus_Message *msg; 216 Eldbus_Message *msg;
217 CB_Data *cbd; 217 CB_Data *cbd;
218 Eina_Bool ret; 218 Eina_Bool ret;
219 219
@@ -236,9 +236,9 @@ _dbus_feed_call_helper(Eina_Bool system_bus, const char *method, const char *fee
236} 236}
237 237
238static Eina_Bool 238static Eina_Bool
239_dbus_feed_item_call_helper(Eina_Bool system_bus, const char *method, const char *feed_url, const char *item_uuid, void *cb, const void *data, EDBus_Message_Cb retcb) 239_dbus_feed_item_call_helper(Eina_Bool system_bus, const char *method, const char *feed_url, const char *item_uuid, void *cb, const void *data, Eldbus_Message_Cb retcb)
240{ 240{
241 EDBus_Message *msg; 241 Eldbus_Message *msg;
242 CB_Data *cbd; 242 CB_Data *cbd;
243 Eina_Bool ret; 243 Eina_Bool ret;
244 244
@@ -379,7 +379,7 @@ erssd_util_nameowner_cb_set(Eina_Bool system_bus, Erssd_Util_Data_Cb cb, const v
379void 379void
380erssd_util_feed_signal_cb_set(Eina_Bool system_bus, Erssd_Signals signal, Erssd_Util_Data_Cb cb, const void *data) 380erssd_util_feed_signal_cb_set(Eina_Bool system_bus, Erssd_Signals signal, Erssd_Util_Data_Cb cb, const void *data)
381{ 381{
382 EDBus_Signal_Cb sig_cb; 382 Eldbus_Signal_Cb sig_cb;
383 383
384 EINA_SAFETY_ON_NULL_RETURN(cb); 384 EINA_SAFETY_ON_NULL_RETURN(cb);
385 EINA_SAFETY_ON_TRUE_RETURN(signal >= ERSSD_SIGNAL_LAST); 385 EINA_SAFETY_ON_TRUE_RETURN(signal >= ERSSD_SIGNAL_LAST);