summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/eldbus_message_helper.c
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/lib/eldbus/eldbus_message_helper.c
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 'src/lib/eldbus/eldbus_message_helper.c')
-rw-r--r--src/lib/eldbus/eldbus_message_helper.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/eldbus/eldbus_message_helper.c b/src/lib/eldbus/eldbus_message_helper.c
new file mode 100644
index 0000000..43053ac
--- /dev/null
+++ b/src/lib/eldbus/eldbus_message_helper.c
@@ -0,0 +1,31 @@
1#include "eldbus_private.h"
2#include "eldbus_private_types.h"
3
4EAPI void
5eldbus_message_iter_dict_iterate(Eldbus_Message_Iter *array, const char *signature, Eldbus_Dict_Cb_Get cb, const void *data)
6{
7 Eldbus_Message_Iter *entry;
8 char *iter_sig;
9 unsigned len;
10 EINA_SAFETY_ON_FALSE_RETURN(array);
11 EINA_SAFETY_ON_NULL_RETURN(signature);
12
13 iter_sig = eldbus_message_iter_signature_get(array);
14 len = strlen(iter_sig + 1);
15 if (strncmp(signature, iter_sig + 1, len - 1))
16 {
17 ERR("Unexpected signature, expected is: %s", iter_sig);
18 free(iter_sig);
19 return;
20 }
21 free(iter_sig);
22
23 while (eldbus_message_iter_get_and_next(array, 'e', &entry))
24 {
25 const void *key;
26 Eldbus_Message_Iter *var;
27 if (!eldbus_message_iter_arguments_get(entry, signature, &key, &var))
28 continue;
29 cb((void *)data, key, var);
30 }
31}