summaryrefslogtreecommitdiff
path: root/src/lib/ethumb_client
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/ethumb_client
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/ethumb_client')
-rw-r--r--src/lib/ethumb_client/ethumb_client.c190
1 files changed, 95 insertions, 95 deletions
diff --git a/src/lib/ethumb_client/ethumb_client.c b/src/lib/ethumb_client/ethumb_client.c
index 9c2530323c..cbd3c960fe 100644
--- a/src/lib/ethumb_client/ethumb_client.c
+++ b/src/lib/ethumb_client/ethumb_client.c
@@ -76,7 +76,7 @@
76 76
77#include <Eina.h> 77#include <Eina.h>
78#include <eina_safety_checks.h> 78#include <eina_safety_checks.h>
79#include <EDBus.h> 79#include <Eldbus.h>
80#include <Ethumb.h> 80#include <Ethumb.h>
81#include <Ecore.h> 81#include <Ecore.h>
82 82
@@ -100,7 +100,7 @@ struct _Ethumb_Client
100 Ethumb *ethumb; 100 Ethumb *ethumb;
101 int id_count; 101 int id_count;
102 Ethumb *old_ethumb_conf; 102 Ethumb *old_ethumb_conf;
103 EDBus_Connection *conn; 103 Eldbus_Connection *conn;
104 struct 104 struct
105 { 105 {
106 Ethumb_Client_Connect_Cb cb; 106 Ethumb_Client_Connect_Cb cb;
@@ -116,7 +116,7 @@ struct _Ethumb_Client
116 void *data; 116 void *data;
117 Eina_Free_Cb free_data; 117 Eina_Free_Cb free_data;
118 } die; 118 } die;
119 EDBus_Proxy *proxy; 119 Eldbus_Proxy *proxy;
120 EINA_REFCOUNT; 120 EINA_REFCOUNT;
121 Eina_Bool connected : 1; 121 Eina_Bool connected : 1;
122 Eina_Bool server_started : 1; 122 Eina_Bool server_started : 1;
@@ -132,7 +132,7 @@ struct _ethumb_pending_add
132 Ethumb_Client_Generate_Cb generated_cb; 132 Ethumb_Client_Generate_Cb generated_cb;
133 void *data; 133 void *data;
134 Eina_Free_Cb free_data; 134 Eina_Free_Cb free_data;
135 EDBus_Pending *pending_call; 135 Eldbus_Pending *pending_call;
136 Ethumb_Client *client; 136 Ethumb_Client *client;
137}; 137};
138 138
@@ -187,7 +187,7 @@ static const char _ethumb_dbus_path[] = "/org/enlightenment/Ethumb";
187static int _initcount = 0; 187static int _initcount = 0;
188static Eina_Hash *_exists_request = NULL; 188static Eina_Hash *_exists_request = NULL;
189 189
190static void _ethumb_client_generated_cb(void *data, const EDBus_Message *msg); 190static void _ethumb_client_generated_cb(void *data, const Eldbus_Message *msg);
191static void _ethumb_client_call_new(Ethumb_Client *client); 191static void _ethumb_client_call_new(Ethumb_Client *client);
192static void _ethumb_client_name_owner_changed(void *context, const char *bus, const char *old_id, const char *new_id); 192static void _ethumb_client_name_owner_changed(void *context, const char *bus, const char *old_id, const char *new_id);
193 193
@@ -195,7 +195,7 @@ static void
195_ethumb_client_free(Ethumb_Client *client) 195_ethumb_client_free(Ethumb_Client *client)
196{ 196{
197 void *data; 197 void *data;
198 EDBus_Object *obj; 198 Eldbus_Object *obj;
199 199
200 if (!client->connected) 200 if (!client->connected)
201 goto end_connection; 201 goto end_connection;
@@ -203,7 +203,7 @@ _ethumb_client_free(Ethumb_Client *client)
203 EINA_LIST_FREE(client->pending_add, data) 203 EINA_LIST_FREE(client->pending_add, data)
204 { 204 {
205 struct _ethumb_pending_add *pending = data; 205 struct _ethumb_pending_add *pending = data;
206 edbus_pending_cancel(pending->pending_call); 206 eldbus_pending_cancel(pending->pending_call);
207 } 207 }
208 208
209 EINA_LIST_FREE(client->pending_gen, data) 209 EINA_LIST_FREE(client->pending_gen, data)
@@ -232,13 +232,13 @@ end_connection:
232 232
233 ethumb_free(client->ethumb); 233 ethumb_free(client->ethumb);
234 234
235 edbus_name_owner_changed_callback_del(client->conn, _ethumb_dbus_bus_name, 235 eldbus_name_owner_changed_callback_del(client->conn, _ethumb_dbus_bus_name,
236 _ethumb_client_name_owner_changed, 236 _ethumb_client_name_owner_changed,
237 client); 237 client);
238 obj = edbus_proxy_object_get(client->proxy); 238 obj = eldbus_proxy_object_get(client->proxy);
239 edbus_proxy_unref(client->proxy); 239 eldbus_proxy_unref(client->proxy);
240 edbus_object_unref(obj); 240 eldbus_object_unref(obj);
241 edbus_connection_unref(client->conn); 241 eldbus_connection_unref(client->conn);
242 242
243 if (client->connect.free_data) 243 if (client->connect.free_data)
244 client->connect.free_data(client->connect.data); 244 client->connect.free_data(client->connect.data);
@@ -317,30 +317,30 @@ _ethumb_client_report_connect(Ethumb_Client *client, Eina_Bool success)
317} 317}
318 318
319static void 319static void
320_ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 320_ethumb_client_new_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
321{ 321{
322 const char *errname, *errmsg; 322 const char *errname, *errmsg;
323 const char *opath; 323 const char *opath;
324 Ethumb_Client *client = data; 324 Ethumb_Client *client = data;
325 EDBus_Object *obj; 325 Eldbus_Object *obj;
326 326
327 if (edbus_message_error_get(msg, &errname, &errmsg)) 327 if (eldbus_message_error_get(msg, &errname, &errmsg))
328 { 328 {
329 ERR("Error: %s %s", errname, errmsg); 329 ERR("Error: %s %s", errname, errmsg);
330 _ethumb_client_report_connect(client, 0); 330 _ethumb_client_report_connect(client, 0);
331 return; 331 return;
332 } 332 }
333 333
334 if (!edbus_message_arguments_get(msg, "o", &opath)) 334 if (!eldbus_message_arguments_get(msg, "o", &opath))
335 { 335 {
336 ERR("Error: could not get entry contents"); 336 ERR("Error: could not get entry contents");
337 _ethumb_client_report_connect(client, 0); 337 _ethumb_client_report_connect(client, 0);
338 return; 338 return;
339 } 339 }
340 340
341 obj = edbus_object_get(client->conn, _ethumb_dbus_bus_name, opath); 341 obj = eldbus_object_get(client->conn, _ethumb_dbus_bus_name, opath);
342 client->proxy = edbus_proxy_get(obj, _ethumb_dbus_objects_interface); 342 client->proxy = eldbus_proxy_get(obj, _ethumb_dbus_objects_interface);
343 edbus_proxy_signal_handler_add(client->proxy, "generated", 343 eldbus_proxy_signal_handler_add(client->proxy, "generated",
344 _ethumb_client_generated_cb, client); 344 _ethumb_client_generated_cb, client);
345 _ethumb_client_report_connect(client, 1); 345 _ethumb_client_report_connect(client, 1);
346} 346}
@@ -348,11 +348,11 @@ _ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pendi
348static void 348static void
349_ethumb_client_call_new(Ethumb_Client *client) 349_ethumb_client_call_new(Ethumb_Client *client)
350{ 350{
351 EDBus_Message *msg; 351 Eldbus_Message *msg;
352 msg = edbus_message_method_call_new(_ethumb_dbus_bus_name, 352 msg = eldbus_message_method_call_new(_ethumb_dbus_bus_name,
353 _ethumb_dbus_path, 353 _ethumb_dbus_path,
354 _ethumb_dbus_interface, "new"); 354 _ethumb_dbus_interface, "new");
355 edbus_connection_send(client->conn, msg, _ethumb_client_new_cb, client, -1); 355 eldbus_connection_send(client->conn, msg, _ethumb_client_new_cb, client, -1);
356} 356}
357 357
358static void 358static void
@@ -434,7 +434,7 @@ ethumb_client_init(void)
434 } 434 }
435 435
436 ethumb_init(); 436 ethumb_init();
437 edbus_init(); 437 eldbus_init();
438 438
439 _exists_request = eina_hash_stringshared_new(_ethumb_async_delete); 439 _exists_request = eina_hash_stringshared_new(_ethumb_async_delete);
440 440
@@ -468,7 +468,7 @@ ethumb_client_shutdown(void)
468 eina_hash_free(_exists_request); 468 eina_hash_free(_exists_request);
469 _exists_request = NULL; 469 _exists_request = NULL;
470 470
471 edbus_shutdown(); 471 eldbus_shutdown();
472 ethumb_shutdown(); 472 ethumb_shutdown();
473 eina_log_domain_unregister(_log_dom); 473 eina_log_domain_unregister(_log_dom);
474 _log_dom = -1; 474 _log_dom = -1;
@@ -540,15 +540,15 @@ ethumb_client_connect(Ethumb_Client_Connect_Cb connect_cb, const void *data, Ein
540 goto ethumb_new_err; 540 goto ethumb_new_err;
541 } 541 }
542 542
543 eclient->conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION); 543 eclient->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
544 if (!eclient->conn) 544 if (!eclient->conn)
545 { 545 {
546 ERR("could not connect to session bus."); 546 ERR("could not connect to session bus.");
547 goto connection_err; 547 goto connection_err;
548 } 548 }
549 549
550 edbus_name_start(eclient->conn, _ethumb_dbus_bus_name, 0, NULL, NULL); 550 eldbus_name_start(eclient->conn, _ethumb_dbus_bus_name, 0, NULL, NULL);
551 edbus_name_owner_changed_callback_add(eclient->conn, _ethumb_dbus_bus_name, 551 eldbus_name_owner_changed_callback_add(eclient->conn, _ethumb_dbus_bus_name,
552 _ethumb_client_name_owner_changed, 552 _ethumb_client_name_owner_changed,
553 eclient, EINA_TRUE); 553 eclient, EINA_TRUE);
554 EINA_REFCOUNT_INIT(eclient); 554 EINA_REFCOUNT_INIT(eclient);
@@ -623,18 +623,18 @@ ethumb_client_on_server_die_callback_set(Ethumb_Client *client, Ethumb_Client_Di
623 */ 623 */
624 624
625static void 625static void
626_ethumb_client_ethumb_setup_cb(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED) 626_ethumb_client_ethumb_setup_cb(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
627{ 627{
628 const char *errname, *errmsg; 628 const char *errname, *errmsg;
629 Eina_Bool result = 0; 629 Eina_Bool result = 0;
630 630
631 if (edbus_message_error_get(msg, &errname, &errmsg)) 631 if (eldbus_message_error_get(msg, &errname, &errmsg))
632 { 632 {
633 ERR("Error: %s %s", errname, errmsg); 633 ERR("Error: %s %s", errname, errmsg);
634 return; 634 return;
635 } 635 }
636 636
637 if (!edbus_message_arguments_get(msg, "b", &result)) 637 if (!eldbus_message_arguments_get(msg, "b", &result))
638 { 638 {
639 ERR("Error getting arguments"); 639 ERR("Error getting arguments");
640 return; 640 return;
@@ -643,58 +643,58 @@ _ethumb_client_ethumb_setup_cb(void *data EINA_UNUSED, const EDBus_Message *msg,
643} 643}
644 644
645static const char * 645static const char *
646_ethumb_client_dbus_get_bytearray(EDBus_Message_Iter *array) 646_ethumb_client_dbus_get_bytearray(Eldbus_Message_Iter *array)
647{ 647{
648 int length; 648 int length;
649 const char *result; 649 const char *result;
650 650
651 if (edbus_message_iter_fixed_array_get(array, 'y', &result, &length)) 651 if (eldbus_message_iter_fixed_array_get(array, 'y', &result, &length))
652 return eina_stringshare_add_length(result, length); 652 return eina_stringshare_add_length(result, length);
653 else 653 else
654 { 654 {
655 ERR("Not byte array. Signature: %s", 655 ERR("Not byte array. Signature: %s",
656 edbus_message_iter_signature_get(array)); 656 eldbus_message_iter_signature_get(array));
657 return NULL; 657 return NULL;
658 } 658 }
659} 659}
660 660
661static void 661static void
662_ethumb_client_dbus_append_bytearray(EDBus_Message_Iter *parent, const char *string) 662_ethumb_client_dbus_append_bytearray(Eldbus_Message_Iter *parent, const char *string)
663{ 663{
664 int i, size; 664 int i, size;
665 EDBus_Message_Iter *array; 665 Eldbus_Message_Iter *array;
666 666
667 if (!string) 667 if (!string)
668 string = ""; 668 string = "";
669 669
670 array = edbus_message_iter_container_new(parent, 'a', "y"); 670 array = eldbus_message_iter_container_new(parent, 'a', "y");
671 size = strlen(string) + 1; 671 size = strlen(string) + 1;
672 for (i = 0; i < size; i++) 672 for (i = 0; i < size; i++)
673 edbus_message_iter_basic_append(array, 'y', string[i]); 673 eldbus_message_iter_basic_append(array, 'y', string[i]);
674 edbus_message_iter_container_close(parent, array); 674 eldbus_message_iter_container_close(parent, array);
675} 675}
676 676
677/** 677/**
678 * @endcond 678 * @endcond
679 */ 679 */
680 680
681static EDBus_Message_Iter * 681static Eldbus_Message_Iter *
682_setup_iterator_open(EDBus_Message_Iter *array, EDBus_Message_Iter **entry, const char *key, const char *type) 682_setup_iterator_open(Eldbus_Message_Iter *array, Eldbus_Message_Iter **entry, const char *key, const char *type)
683{ 683{
684 EDBus_Message_Iter *variant, *_struct; 684 Eldbus_Message_Iter *variant, *_struct;
685 edbus_message_iter_arguments_append(array, "{sv}", &_struct); 685 eldbus_message_iter_arguments_append(array, "{sv}", &_struct);
686 edbus_message_iter_basic_append(_struct, 's', key); 686 eldbus_message_iter_basic_append(_struct, 's', key);
687 variant = edbus_message_iter_container_new(_struct, 'v', type); 687 variant = eldbus_message_iter_container_new(_struct, 'v', type);
688 688
689 *entry = _struct; 689 *entry = _struct;
690 return variant; 690 return variant;
691} 691}
692 692
693static void 693static void
694_setup_iterator_close(EDBus_Message_Iter *array, EDBus_Message_Iter *entry, EDBus_Message_Iter *variant) 694_setup_iterator_close(Eldbus_Message_Iter *array, Eldbus_Message_Iter *entry, Eldbus_Message_Iter *variant)
695{ 695{
696 edbus_message_iter_container_close(entry, variant); 696 eldbus_message_iter_container_close(entry, variant);
697 edbus_message_iter_container_close(array, entry); 697 eldbus_message_iter_container_close(array, entry);
698} 698}
699 699
700/** 700/**
@@ -709,10 +709,10 @@ _setup_iterator_close(EDBus_Message_Iter *array, EDBus_Message_Iter *entry, EDBu
709EAPI void 709EAPI void
710ethumb_client_ethumb_setup(Ethumb_Client *client) 710ethumb_client_ethumb_setup(Ethumb_Client *client)
711{ 711{
712 EDBus_Message *msg; 712 Eldbus_Message *msg;
713 EDBus_Message_Iter *array, *main_iter; 713 Eldbus_Message_Iter *array, *main_iter;
714 EDBus_Message_Iter *entry, *variant; 714 Eldbus_Message_Iter *entry, *variant;
715 EDBus_Message_Iter *sub_struct; 715 Eldbus_Message_Iter *sub_struct;
716 Ethumb *e = client->ethumb; 716 Ethumb *e = client->ethumb;
717 int tw, th, format, aspect, orientation, quality, compress; 717 int tw, th, format, aspect, orientation, quality, compress;
718 float cx, cy; 718 float cx, cy;
@@ -724,57 +724,57 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
724 EINA_SAFETY_ON_NULL_RETURN(client); 724 EINA_SAFETY_ON_NULL_RETURN(client);
725 EINA_SAFETY_ON_FALSE_RETURN(client->connected); 725 EINA_SAFETY_ON_FALSE_RETURN(client->connected);
726 726
727 msg = edbus_proxy_method_call_new(client->proxy, "ethumb_setup"); 727 msg = eldbus_proxy_method_call_new(client->proxy, "ethumb_setup");
728 main_iter = edbus_message_iter_get(msg); 728 main_iter = eldbus_message_iter_get(msg);
729 edbus_message_iter_arguments_append(main_iter, "a{sv}", &array); 729 eldbus_message_iter_arguments_append(main_iter, "a{sv}", &array);
730 730
731 /* starting array elements */ 731 /* starting array elements */
732 variant = _setup_iterator_open(array, &entry, "size", "(ii)"); 732 variant = _setup_iterator_open(array, &entry, "size", "(ii)");
733 edbus_message_iter_arguments_append(variant, "(ii)", &sub_struct); 733 eldbus_message_iter_arguments_append(variant, "(ii)", &sub_struct);
734 ethumb_thumb_size_get(e, &tw, &th); 734 ethumb_thumb_size_get(e, &tw, &th);
735 edbus_message_iter_arguments_append(sub_struct, "ii", tw, th); 735 eldbus_message_iter_arguments_append(sub_struct, "ii", tw, th);
736 edbus_message_iter_container_close(variant, sub_struct); 736 eldbus_message_iter_container_close(variant, sub_struct);
737 _setup_iterator_close(array, entry, variant); 737 _setup_iterator_close(array, entry, variant);
738 738
739 variant = _setup_iterator_open(array, &entry, "format", "i"); 739 variant = _setup_iterator_open(array, &entry, "format", "i");
740 format = ethumb_thumb_format_get(e); 740 format = ethumb_thumb_format_get(e);
741 edbus_message_iter_arguments_append(variant, "i", format); 741 eldbus_message_iter_arguments_append(variant, "i", format);
742 _setup_iterator_close(array, entry, variant); 742 _setup_iterator_close(array, entry, variant);
743 743
744 variant = _setup_iterator_open(array, &entry, "aspect", "i"); 744 variant = _setup_iterator_open(array, &entry, "aspect", "i");
745 aspect = ethumb_thumb_aspect_get(e); 745 aspect = ethumb_thumb_aspect_get(e);
746 edbus_message_iter_arguments_append(variant, "i", aspect); 746 eldbus_message_iter_arguments_append(variant, "i", aspect);
747 _setup_iterator_close(array, entry, variant); 747 _setup_iterator_close(array, entry, variant);
748 748
749 variant = _setup_iterator_open(array, &entry, "orientation", "i"); 749 variant = _setup_iterator_open(array, &entry, "orientation", "i");
750 orientation = ethumb_thumb_orientation_get(e); 750 orientation = ethumb_thumb_orientation_get(e);
751 edbus_message_iter_arguments_append(variant, "i", orientation); 751 eldbus_message_iter_arguments_append(variant, "i", orientation);
752 _setup_iterator_close(array, entry, variant); 752 _setup_iterator_close(array, entry, variant);
753 753
754 variant = _setup_iterator_open(array, &entry, "crop", "(dd)"); 754 variant = _setup_iterator_open(array, &entry, "crop", "(dd)");
755 edbus_message_iter_arguments_append(variant, "(dd)", &sub_struct); 755 eldbus_message_iter_arguments_append(variant, "(dd)", &sub_struct);
756 ethumb_thumb_crop_align_get(e, &cx, &cy); 756 ethumb_thumb_crop_align_get(e, &cx, &cy);
757 edbus_message_iter_arguments_append(sub_struct, "dd", (double)cx, (double)cy); 757 eldbus_message_iter_arguments_append(sub_struct, "dd", (double)cx, (double)cy);
758 edbus_message_iter_container_close(variant, sub_struct); 758 eldbus_message_iter_container_close(variant, sub_struct);
759 _setup_iterator_close(array, entry, variant); 759 _setup_iterator_close(array, entry, variant);
760 760
761 variant = _setup_iterator_open(array, &entry, "quality", "i"); 761 variant = _setup_iterator_open(array, &entry, "quality", "i");
762 quality = ethumb_thumb_quality_get(e); 762 quality = ethumb_thumb_quality_get(e);
763 edbus_message_iter_arguments_append(variant, "i", quality); 763 eldbus_message_iter_arguments_append(variant, "i", quality);
764 _setup_iterator_close(array, entry, variant); 764 _setup_iterator_close(array, entry, variant);
765 765
766 variant = _setup_iterator_open(array, &entry, "compress", "i"); 766 variant = _setup_iterator_open(array, &entry, "compress", "i");
767 compress = ethumb_thumb_quality_get(e); 767 compress = ethumb_thumb_quality_get(e);
768 edbus_message_iter_arguments_append(variant, "i", compress); 768 eldbus_message_iter_arguments_append(variant, "i", compress);
769 _setup_iterator_close(array, entry, variant); 769 _setup_iterator_close(array, entry, variant);
770 770
771 variant = _setup_iterator_open(array, &entry, "frame", "(ayayay)"); 771 variant = _setup_iterator_open(array, &entry, "frame", "(ayayay)");
772 edbus_message_iter_arguments_append(variant, "(ayayay)", &sub_struct); 772 eldbus_message_iter_arguments_append(variant, "(ayayay)", &sub_struct);
773 ethumb_frame_get(e, &theme_file, &group, &swallow); 773 ethumb_frame_get(e, &theme_file, &group, &swallow);
774 _ethumb_client_dbus_append_bytearray(sub_struct, theme_file); 774 _ethumb_client_dbus_append_bytearray(sub_struct, theme_file);
775 _ethumb_client_dbus_append_bytearray(sub_struct, group); 775 _ethumb_client_dbus_append_bytearray(sub_struct, group);
776 _ethumb_client_dbus_append_bytearray(sub_struct, swallow); 776 _ethumb_client_dbus_append_bytearray(sub_struct, swallow);
777 edbus_message_iter_container_close(variant, sub_struct); 777 eldbus_message_iter_container_close(variant, sub_struct);
778 _setup_iterator_close(array, entry, variant); 778 _setup_iterator_close(array, entry, variant);
779 779
780 variant = _setup_iterator_open(array, &entry, "directory", "ay"); 780 variant = _setup_iterator_open(array, &entry, "directory", "ay");
@@ -789,37 +789,37 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
789 789
790 variant = _setup_iterator_open(array, &entry, "video_time", "d"); 790 variant = _setup_iterator_open(array, &entry, "video_time", "d");
791 video_time = ethumb_video_time_get(e); 791 video_time = ethumb_video_time_get(e);
792 edbus_message_iter_arguments_append(variant, "d", video_time); 792 eldbus_message_iter_arguments_append(variant, "d", video_time);
793 _setup_iterator_close(array, entry, variant); 793 _setup_iterator_close(array, entry, variant);
794 794
795 variant = _setup_iterator_open(array, &entry, "video_start", "d"); 795 variant = _setup_iterator_open(array, &entry, "video_start", "d");
796 video_start = ethumb_video_start_get(e); 796 video_start = ethumb_video_start_get(e);
797 edbus_message_iter_arguments_append(variant, "d", video_start); 797 eldbus_message_iter_arguments_append(variant, "d", video_start);
798 _setup_iterator_close(array, entry, variant); 798 _setup_iterator_close(array, entry, variant);
799 799
800 variant = _setup_iterator_open(array, &entry, "video_interval", "d"); 800 variant = _setup_iterator_open(array, &entry, "video_interval", "d");
801 video_interval = ethumb_video_interval_get(e); 801 video_interval = ethumb_video_interval_get(e);
802 edbus_message_iter_arguments_append(variant, "d", video_interval); 802 eldbus_message_iter_arguments_append(variant, "d", video_interval);
803 _setup_iterator_close(array, entry, variant); 803 _setup_iterator_close(array, entry, variant);
804 804
805 variant = _setup_iterator_open(array, &entry, "video_ntimes", "u"); 805 variant = _setup_iterator_open(array, &entry, "video_ntimes", "u");
806 video_ntimes = ethumb_video_ntimes_get(e); 806 video_ntimes = ethumb_video_ntimes_get(e);
807 edbus_message_iter_arguments_append(variant, "u", video_ntimes); 807 eldbus_message_iter_arguments_append(variant, "u", video_ntimes);
808 _setup_iterator_close(array, entry, variant); 808 _setup_iterator_close(array, entry, variant);
809 809
810 variant = _setup_iterator_open(array, &entry, "video_fps", "u"); 810 variant = _setup_iterator_open(array, &entry, "video_fps", "u");
811 video_fps = ethumb_video_fps_get(e); 811 video_fps = ethumb_video_fps_get(e);
812 edbus_message_iter_arguments_append(variant, "u", video_fps); 812 eldbus_message_iter_arguments_append(variant, "u", video_fps);
813 _setup_iterator_close(array, entry, variant); 813 _setup_iterator_close(array, entry, variant);
814 814
815 variant = _setup_iterator_open(array, &entry, "document_page", "u"); 815 variant = _setup_iterator_open(array, &entry, "document_page", "u");
816 document_page = ethumb_document_page_get(e); 816 document_page = ethumb_document_page_get(e);
817 edbus_message_iter_arguments_append(variant, "u", document_page); 817 eldbus_message_iter_arguments_append(variant, "u", document_page);
818 _setup_iterator_close(array, entry, variant); 818 _setup_iterator_close(array, entry, variant);
819 819
820 edbus_message_iter_container_close(main_iter, array); 820 eldbus_message_iter_container_close(main_iter, array);
821 821
822 edbus_proxy_send(client->proxy, msg, _ethumb_client_ethumb_setup_cb, 822 eldbus_proxy_send(client->proxy, msg, _ethumb_client_ethumb_setup_cb,
823 client, -1); 823 client, -1);
824} 824}
825 825
@@ -827,18 +827,18 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
827 * @cond LOCAL 827 * @cond LOCAL
828 */ 828 */
829static void 829static void
830_ethumb_client_generated_cb(void *data, const EDBus_Message *msg) 830_ethumb_client_generated_cb(void *data, const Eldbus_Message *msg)
831{ 831{
832 int id = -1; 832 int id = -1;
833 Ethumb_Client *client = data; 833 Ethumb_Client *client = data;
834 EDBus_Message_Iter *thumb_iter; 834 Eldbus_Message_Iter *thumb_iter;
835 EDBus_Message_Iter *thumb_key_iter; 835 Eldbus_Message_Iter *thumb_key_iter;
836 Eina_Bool success; 836 Eina_Bool success;
837 int found; 837 int found;
838 struct _ethumb_pending_gen *pending; 838 struct _ethumb_pending_gen *pending;
839 Eina_List *l; 839 Eina_List *l;
840 840
841 if (!edbus_message_arguments_get(msg, "iayayb", &id, &thumb_iter, 841 if (!eldbus_message_arguments_get(msg, "iayayb", &id, &thumb_iter,
842 &thumb_key_iter, &success)) 842 &thumb_key_iter, &success))
843 { 843 {
844 ERR("Error getting data from signal."); 844 ERR("Error getting data from signal.");
@@ -882,7 +882,7 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
882} 882}
883 883
884static void 884static void
885_ethumb_client_queue_add_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending EINA_UNUSED) 885_ethumb_client_queue_add_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *eldbus_pending EINA_UNUSED)
886{ 886{
887 const char *errname, *errmsg; 887 const char *errname, *errmsg;
888 int32_t id; 888 int32_t id;
@@ -892,13 +892,13 @@ _ethumb_client_queue_add_cb(void *data, const EDBus_Message *msg, EDBus_Pending
892 892
893 client->pending_add = eina_list_remove(client->pending_add, pending); 893 client->pending_add = eina_list_remove(client->pending_add, pending);
894 894
895 if (edbus_message_error_get(msg, &errname, &errmsg)) 895 if (eldbus_message_error_get(msg, &errname, &errmsg))
896 { 896 {
897 ERR("Error: %s %s", errname, errmsg); 897 ERR("Error: %s %s", errname, errmsg);
898 goto end; 898 goto end;
899 } 899 }
900 900
901 if (!edbus_message_arguments_get(msg, "i", &id)) 901 if (!eldbus_message_arguments_get(msg, "i", &id))
902 { 902 {
903 ERR("Error getting arguments."); 903 ERR("Error getting arguments.");
904 goto end; 904 goto end;
@@ -931,8 +931,8 @@ end:
931static int 931static int
932_ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *key, const char *thumb, const char *thumb_key, Ethumb_Client_Generate_Cb generated_cb, const void *data, Eina_Free_Cb free_data) 932_ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *key, const char *thumb, const char *thumb_key, Ethumb_Client_Generate_Cb generated_cb, const void *data, Eina_Free_Cb free_data)
933{ 933{
934 EDBus_Message *msg; 934 Eldbus_Message *msg;
935 EDBus_Message_Iter *main_itr; 935 Eldbus_Message_Iter *main_itr;
936 struct _ethumb_pending_add *pending; 936 struct _ethumb_pending_add *pending;
937 937
938 pending = calloc(1, sizeof(*pending)); 938 pending = calloc(1, sizeof(*pending));
@@ -948,15 +948,15 @@ _ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *ke
948 948
949 client->id_count = (client->id_count + 1) % MAX_ID; 949 client->id_count = (client->id_count + 1) % MAX_ID;
950 950
951 msg = edbus_proxy_method_call_new(client->proxy, "queue_add"); 951 msg = eldbus_proxy_method_call_new(client->proxy, "queue_add");
952 main_itr = edbus_message_iter_get(msg); 952 main_itr = eldbus_message_iter_get(msg);
953 edbus_message_iter_basic_append(main_itr, 'i', pending->id); 953 eldbus_message_iter_basic_append(main_itr, 'i', pending->id);
954 _ethumb_client_dbus_append_bytearray(main_itr, file); 954 _ethumb_client_dbus_append_bytearray(main_itr, file);
955 _ethumb_client_dbus_append_bytearray(main_itr, key); 955 _ethumb_client_dbus_append_bytearray(main_itr, key);
956 _ethumb_client_dbus_append_bytearray(main_itr, thumb); 956 _ethumb_client_dbus_append_bytearray(main_itr, thumb);
957 _ethumb_client_dbus_append_bytearray(main_itr, thumb_key); 957 _ethumb_client_dbus_append_bytearray(main_itr, thumb_key);
958 958
959 pending->pending_call = edbus_proxy_send(client->proxy, msg, 959 pending->pending_call = eldbus_proxy_send(client->proxy, msg,
960 _ethumb_client_queue_add_cb, 960 _ethumb_client_queue_add_cb,
961 pending, -1); 961 pending, -1);
962 client->pending_add = eina_list_append(client->pending_add, pending); 962 client->pending_add = eina_list_append(client->pending_add, pending);
@@ -965,7 +965,7 @@ _ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *ke
965} 965}
966 966
967static void 967static void
968_ethumb_client_queue_remove_cb(void *data, const EDBus_Message *msg, EDBus_Pending *edbus_pending EINA_UNUSED) 968_ethumb_client_queue_remove_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *eldbus_pending EINA_UNUSED)
969{ 969{
970 Eina_Bool success = EINA_FALSE; 970 Eina_Bool success = EINA_FALSE;
971 struct _ethumb_pending_remove *pending = data; 971 struct _ethumb_pending_remove *pending = data;
@@ -974,13 +974,13 @@ _ethumb_client_queue_remove_cb(void *data, const EDBus_Message *msg, EDBus_Pendi
974 974
975 client->pending_remove = eina_list_remove(client->pending_remove, pending); 975 client->pending_remove = eina_list_remove(client->pending_remove, pending);
976 976
977 if (edbus_message_error_get(msg, &errname, &errmsg)) 977 if (eldbus_message_error_get(msg, &errname, &errmsg))
978 { 978 {
979 ERR("Error: %s %s", errname, errmsg); 979 ERR("Error: %s %s", errname, errmsg);
980 goto end; 980 goto end;
981 } 981 }
982 982
983 if (edbus_message_arguments_get(msg, "b", &success)) 983 if (eldbus_message_arguments_get(msg, "b", &success))
984 { 984 {
985 ERR("Error getting arguments."); 985 ERR("Error getting arguments.");
986 goto end; 986 goto end;
@@ -1030,7 +1030,7 @@ ethumb_client_generate_cancel(Ethumb_Client *client, int id, Ethumb_Client_Gener
1030 pending->free_data = free_data; 1030 pending->free_data = free_data;
1031 pending->client = client; 1031 pending->client = client;
1032 1032
1033 edbus_proxy_call(client->proxy, "queue_remove", 1033 eldbus_proxy_call(client->proxy, "queue_remove",
1034 _ethumb_client_queue_remove_cb, pending, -1, "i", pending->id); 1034 _ethumb_client_queue_remove_cb, pending, -1, "i", pending->id);
1035 client->pending_remove = eina_list_append(client->pending_remove, pending); 1035 client->pending_remove = eina_list_append(client->pending_remove, pending);
1036 1036
@@ -1049,7 +1049,7 @@ ethumb_client_generate_cancel(Ethumb_Client *client, int id, Ethumb_Client_Gener
1049 l = l->next; 1049 l = l->next;
1050 continue; 1050 continue;
1051 } 1051 }
1052 edbus_pending_cancel(pending_add->pending_call); 1052 eldbus_pending_cancel(pending_add->pending_call);
1053 found = 1; 1053 found = 1;
1054 break; 1054 break;
1055 } 1055 }
@@ -1096,7 +1096,7 @@ ethumb_client_generate_cancel_all(Ethumb_Client *client)
1096 EINA_LIST_FREE(client->pending_add, data) 1096 EINA_LIST_FREE(client->pending_add, data)
1097 { 1097 {
1098 struct _ethumb_pending_add *pending = data; 1098 struct _ethumb_pending_add *pending = data;
1099 edbus_pending_cancel(pending->pending_call); 1099 eldbus_pending_cancel(pending->pending_call);
1100 } 1100 }
1101 1101
1102 EINA_LIST_FREE(client->pending_gen, data) 1102 EINA_LIST_FREE(client->pending_gen, data)
@@ -1111,7 +1111,7 @@ ethumb_client_generate_cancel_all(Ethumb_Client *client)
1111 free(pending); 1111 free(pending);
1112 } 1112 }
1113 1113
1114 edbus_proxy_call(client->proxy, "queue_clear", NULL, NULL, -1, ""); 1114 eldbus_proxy_call(client->proxy, "queue_clear", NULL, NULL, -1, "");
1115} 1115}
1116 1116
1117/** 1117/**