summaryrefslogtreecommitdiff
path: root/legacy/edbus/src/lib/edbus_service.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-18 20:05:02 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-18 20:05:02 +0000
commitb98d5f16b3901ad52063bbaba3b594c029fc2dd4 (patch)
tree23c25c90fa7b3813853765224bc898b4d31ca110 /legacy/edbus/src/lib/edbus_service.c
parente3ae81e65fa68469c4e1ae03fda4e095ab52aaf2 (diff)
edbus: rename functions edbus_message{_iter,}_arguments_set
Rename these functions since they do not set the data in the iterator/message but rather they append the data. Also improve the documentation of edbus_message_iter_arguments_append() to clarify its usage. SVN revision: 81295
Diffstat (limited to '')
-rw-r--r--legacy/edbus/src/lib/edbus_service.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/legacy/edbus/src/lib/edbus_service.c b/legacy/edbus/src/lib/edbus_service.c
index a68ea8a3a3..472d8f335a 100644
--- a/legacy/edbus/src/lib/edbus_service.c
+++ b/legacy/edbus/src/lib/edbus_service.c
@@ -251,7 +251,7 @@ _props_getall(EDBus_Service_Interface *iface, Eina_Iterator *iterator, EDBus_Mes
251 if (!getter || prop->is_invalidate) 251 if (!getter || prop->is_invalidate)
252 continue; 252 continue;
253 253
254 if (!edbus_message_iter_arguments_set(dict, "{sv}", &entry)) 254 if (!edbus_message_iter_arguments_append(dict, "{sv}", &entry))
255 continue; 255 continue;
256 256
257 edbus_message_iter_basic_append(entry, 's', prop->property->name); 257 edbus_message_iter_basic_append(entry, 's', prop->property->name);
@@ -289,7 +289,7 @@ _cb_property_getall(const EDBus_Service_Interface *piface, const EDBus_Message *
289 reply = edbus_message_method_return_new(msg); 289 reply = edbus_message_method_return_new(msg);
290 EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL); 290 EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
291 main_iter = edbus_message_iter_get(reply); 291 main_iter = edbus_message_iter_get(reply);
292 if (!edbus_message_iter_arguments_set(main_iter, "a{sv}", &dict)) 292 if (!edbus_message_iter_arguments_append(main_iter, "a{sv}", &dict))
293 { 293 {
294 edbus_message_unref(reply); 294 edbus_message_unref(reply);
295 return NULL; 295 return NULL;
@@ -386,7 +386,7 @@ cb_introspect(const EDBus_Service_Interface *_iface, const EDBus_Message *messag
386 obj->introspection_dirty = EINA_FALSE; 386 obj->introspection_dirty = EINA_FALSE;
387 } 387 }
388 388
389 edbus_message_arguments_set(reply, "s", eina_strbuf_string_get(obj->introspection_data)); 389 edbus_message_arguments_append(reply, "s", eina_strbuf_string_get(obj->introspection_data));
390 return reply; 390 return reply;
391} 391}
392 392
@@ -480,9 +480,9 @@ _propmgr_iface_props_append(EDBus_Service_Interface *iface, EDBus_Message_Iter *
480 Eina_Iterator *iterator; 480 Eina_Iterator *iterator;
481 EDBus_Message *error_msg; 481 EDBus_Message *error_msg;
482 482
483 edbus_message_iter_arguments_set(array, "{sa{sv}}", &iface_entry); 483 edbus_message_iter_arguments_append(array, "{sa{sv}}", &iface_entry);
484 484
485 edbus_message_iter_arguments_set(iface_entry, "sa{sv}", iface->name, &props_array); 485 edbus_message_iter_arguments_append(iface_entry, "sa{sv}", iface->name, &props_array);
486 iterator = eina_hash_iterator_data_new(iface->properties); 486 iterator = eina_hash_iterator_data_new(iface->properties);
487 if (!_props_getall(iface, iterator, props_array, NULL, &error_msg)) 487 if (!_props_getall(iface, iterator, props_array, NULL, &error_msg))
488 { 488 {
@@ -508,8 +508,8 @@ _managed_obj_append(EDBus_Service_Object *obj, EDBus_Message_Iter *array, Eina_B
508 if (first) goto foreach; 508 if (first) goto foreach;
509 if (obj->has_objectmanager) return EINA_TRUE; 509 if (obj->has_objectmanager) return EINA_TRUE;
510 510
511 edbus_message_iter_arguments_set(array, "{oa{sa{sv}}}", &obj_entry); 511 edbus_message_iter_arguments_append(array, "{oa{sa{sv}}}", &obj_entry);
512 edbus_message_iter_arguments_set(obj_entry, "oa{sa{sv}}", obj->path, 512 edbus_message_iter_arguments_append(obj_entry, "oa{sa{sv}}", obj->path,
513 &array_interface); 513 &array_interface);
514 iface_iter = eina_hash_iterator_data_new(obj->interfaces); 514 iface_iter = eina_hash_iterator_data_new(obj->interfaces);
515 EINA_ITERATOR_FOREACH(iface_iter, children_iface) 515 EINA_ITERATOR_FOREACH(iface_iter, children_iface)
@@ -544,7 +544,7 @@ _cb_managed_objects(const EDBus_Service_Interface *iface, const EDBus_Message *m
544 544
545 EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL); 545 EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
546 main_iter = edbus_message_iter_get(reply); 546 main_iter = edbus_message_iter_get(reply);
547 edbus_message_iter_arguments_set(main_iter, "a{oa{sa{sv}}}", &array_path); 547 edbus_message_iter_arguments_append(main_iter, "a{oa{sa{sv}}}", &array_path);
548 548
549 ret = _managed_obj_append(iface->obj, array_path, EINA_TRUE); 549 ret = _managed_obj_append(iface->obj, array_path, EINA_TRUE);
550 if (!ret) 550 if (!ret)
@@ -730,7 +730,7 @@ _iface_changed_send(void *data)
730 continue; 730 continue;
731 } 731 }
732 main_iter = edbus_message_iter_get(msg); 732 main_iter = edbus_message_iter_get(msg);
733 edbus_message_iter_arguments_set(main_iter, "oa{sa{sv}}", 733 edbus_message_iter_arguments_append(main_iter, "oa{sa{sv}}",
734 iface->obj->path, &array_iface); 734 iface->obj->path, &array_iface);
735 if (!_propmgr_iface_props_append(iface, array_iface)) 735 if (!_propmgr_iface_props_append(iface, array_iface))
736 goto error; 736 goto error;
@@ -769,7 +769,7 @@ error:
769 EINA_SAFETY_ON_NULL_GOTO(msg, error2); 769 EINA_SAFETY_ON_NULL_GOTO(msg, error2);
770 main_iter = edbus_message_iter_get(msg); 770 main_iter = edbus_message_iter_get(msg);
771 771
772 edbus_message_iter_arguments_set(main_iter, "oas", iface_data->obj_path, 772 edbus_message_iter_arguments_append(main_iter, "oas", iface_data->obj_path,
773 &array_iface); 773 &array_iface);
774 edbus_message_iter_basic_append(array_iface, 's', iface_data->iface); 774 edbus_message_iter_basic_append(array_iface, 's', iface_data->iface);
775 775
@@ -1242,7 +1242,7 @@ edbus_service_signal_emit(const EDBus_Service_Interface *iface, unsigned int sig
1242 1242
1243 signature = eina_array_data_get(iface->sign_of_signals, signal_id); 1243 signature = eina_array_data_get(iface->sign_of_signals, signal_id);
1244 va_start(ap, signal_id); 1244 va_start(ap, signal_id);
1245 r = edbus_message_arguments_vset(sig, signature, ap); 1245 r = edbus_message_arguments_vappend(sig, signature, ap);
1246 va_end(ap); 1246 va_end(ap);
1247 EINA_SAFETY_ON_FALSE_RETURN_VAL(r, EINA_FALSE); 1247 EINA_SAFETY_ON_FALSE_RETURN_VAL(r, EINA_FALSE);
1248 1248
@@ -1302,7 +1302,7 @@ _idler_propschanged(void *data)
1302 EINA_SAFETY_ON_NULL_GOTO(msg, error); 1302 EINA_SAFETY_ON_NULL_GOTO(msg, error);
1303 1303
1304 main_iter = edbus_message_iter_get(msg); 1304 main_iter = edbus_message_iter_get(msg);
1305 if (!edbus_message_iter_arguments_set(main_iter, "sa{sv}", iface->name, &dict)) 1305 if (!edbus_message_iter_arguments_append(main_iter, "sa{sv}", iface->name, &dict))
1306 { 1306 {
1307 edbus_message_unref(msg); 1307 edbus_message_unref(msg);
1308 goto error; 1308 goto error;
@@ -1330,7 +1330,7 @@ _idler_propschanged(void *data)
1330 continue; 1330 continue;
1331 1331
1332 EINA_SAFETY_ON_FALSE_GOTO( 1332 EINA_SAFETY_ON_FALSE_GOTO(
1333 edbus_message_iter_arguments_set(dict, "{sv}", &entry), error); 1333 edbus_message_iter_arguments_append(dict, "{sv}", &entry), error);
1334 1334
1335 edbus_message_iter_basic_append(entry, 's', prop->property->name); 1335 edbus_message_iter_basic_append(entry, 's', prop->property->name);
1336 var = edbus_message_iter_container_new(entry, 'v', 1336 var = edbus_message_iter_container_new(entry, 'v',
@@ -1355,7 +1355,7 @@ _idler_propschanged(void *data)
1355invalidate: 1355invalidate:
1356 edbus_message_iter_container_close(main_iter, dict); 1356 edbus_message_iter_container_close(main_iter, dict);
1357 1357
1358 edbus_message_iter_arguments_set(main_iter, "as", &array_invalidate); 1358 edbus_message_iter_arguments_append(main_iter, "as", &array_invalidate);
1359 1359
1360 if (!iface->prop_invalidated) 1360 if (!iface->prop_invalidated)
1361 goto end; 1361 goto end;