summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-01 18:06:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 09:58:08 +0000
commitf21ade6123b9053fca8d1632644c48525a99d6e0 (patch)
treec5eb0445f471d21365a7a5a7b0ec7d279c11b398 /src/lib/eldbus
parent3faf3f3fc68a839f06b311c35ba020cb25e7c9c4 (diff)
Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL automatically. This commit is *only* the automatic conversion, so it can be easily reverted and re-run.
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_model_arguments.c10
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c9
-rw-r--r--src/lib/eldbus/eldbus_model_method.c6
-rw-r--r--src/lib/eldbus/eldbus_model_object.c9
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c16
-rw-r--r--src/lib/eldbus/eldbus_model_signal.c10
6 files changed, 28 insertions, 32 deletions
diff --git a/src/lib/eldbus/eldbus_model_arguments.c b/src/lib/eldbus/eldbus_model_arguments.c
index 36682b65b9..50bbc80e8d 100644
--- a/src/lib/eldbus/eldbus_model_arguments.c
+++ b/src/lib/eldbus/eldbus_model_arguments.c
@@ -30,7 +30,7 @@ _eldbus_model_arguments_hash_free(Eina_Value *value)
30static Eo_Base* 30static Eo_Base*
31_eldbus_model_arguments_eo_base_constructor(Eo *obj, Eldbus_Model_Arguments_Data *pd) 31_eldbus_model_arguments_eo_base_constructor(Eo *obj, Eldbus_Model_Arguments_Data *pd)
32{ 32{
33 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 33 obj = eo_constructor(eo_super(obj, MY_CLASS));
34 34
35 pd->obj = obj; 35 pd->obj = obj;
36 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED; 36 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -68,7 +68,7 @@ _eldbus_model_arguments_eo_base_destructor(Eo *obj, Eldbus_Model_Arguments_Data
68 eina_stringshare_del(pd->name); 68 eina_stringshare_del(pd->name);
69 eldbus_proxy_unref(pd->proxy); 69 eldbus_proxy_unref(pd->proxy);
70 70
71 eo_do_super(obj, MY_CLASS, eo_destructor()); 71 eo_destructor(eo_super(obj, MY_CLASS));
72} 72}
73 73
74static Efl_Model_Load_Status 74static Efl_Model_Load_Status
@@ -184,8 +184,8 @@ _eldbus_model_arguments_efl_model_base_property_get(Eo *obj EINA_UNUSED,
184static void 184static void
185_eldbus_model_arguments_efl_model_base_load(Eo *obj, Eldbus_Model_Arguments_Data *pd EINA_UNUSED) 185_eldbus_model_arguments_efl_model_base_load(Eo *obj, Eldbus_Model_Arguments_Data *pd EINA_UNUSED)
186{ 186{
187 eo_do(obj, efl_model_properties_load()); 187 efl_model_properties_load(obj);
188 eo_do(obj, efl_model_children_load()); 188 efl_model_children_load(obj);
189} 189}
190 190
191static Efl_Model_Load_Status 191static Efl_Model_Load_Status
@@ -329,7 +329,7 @@ eldbus_model_arguments_process_arguments(Eldbus_Model_Arguments_Data *pd,
329 if (eina_array_count(changed_properties)) 329 if (eina_array_count(changed_properties))
330 { 330 {
331 Efl_Model_Property_Event evt = {.changed_properties = changed_properties}; 331 Efl_Model_Property_Event evt = {.changed_properties = changed_properties};
332 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt)); 332 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
333 } 333 }
334 334
335 result = EINA_TRUE; 335 result = EINA_TRUE;
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index 6325a5ac0b..ebd758be2b 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -20,7 +20,7 @@ static void _eldbus_model_connection_clear(Eldbus_Model_Connection_Data *);
20static Eo_Base* 20static Eo_Base*
21_eldbus_model_connection_eo_base_constructor(Eo *obj, Eldbus_Model_Connection_Data *pd) 21_eldbus_model_connection_eo_base_constructor(Eo *obj, Eldbus_Model_Connection_Data *pd)
22{ 22{
23 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 23 obj = eo_constructor(eo_super(obj, MY_CLASS));
24 24
25 pd->obj = obj; 25 pd->obj = obj;
26 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED; 26 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -55,7 +55,7 @@ _eldbus_model_connection_eo_base_destructor(Eo *obj, Eldbus_Model_Connection_Dat
55 55
56 _eldbus_model_connection_clear(pd); 56 _eldbus_model_connection_clear(pd);
57 57
58 eo_do_super(obj, MY_CLASS, eo_destructor()); 58 eo_destructor(eo_super(obj, MY_CLASS));
59} 59}
60 60
61static Efl_Model_Load_Status 61static Efl_Model_Load_Status
@@ -345,8 +345,7 @@ _eldbus_model_connection_names_list_cb(void *data,
345 { 345 {
346 DBG("(%p): bus = %s", pd->obj, bus); 346 DBG("(%p): bus = %s", pd->obj, bus);
347 347
348 Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, 348 Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/"));
349 eldbus_model_object_connection_constructor(pd->connection, bus, "/"));
350 349
351 pd->children_list = eina_list_append(pd->children_list, child); 350 pd->children_list = eina_list_append(pd->children_list, child);
352 } 351 }
@@ -355,7 +354,7 @@ _eldbus_model_connection_names_list_cb(void *data,
355 354
356 count = eina_list_count(pd->children_list); 355 count = eina_list_count(pd->children_list);
357 if (count) 356 if (count)
358 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count)); 357 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
359} 358}
360 359
361#include "eldbus_model_connection.eo.c" 360#include "eldbus_model_connection.eo.c"
diff --git a/src/lib/eldbus/eldbus_model_method.c b/src/lib/eldbus/eldbus_model_method.c
index 7c0c3d60e2..d62b8eb9c7 100644
--- a/src/lib/eldbus/eldbus_model_method.c
+++ b/src/lib/eldbus/eldbus_model_method.c
@@ -19,7 +19,7 @@ static void _eldbus_model_method_call_cb(void *, const Eldbus_Message *, Eldbus_
19static Eo_Base* 19static Eo_Base*
20_eldbus_model_method_eo_base_constructor(Eo *obj, Eldbus_Model_Method_Data *pd) 20_eldbus_model_method_eo_base_constructor(Eo *obj, Eldbus_Model_Method_Data *pd)
21{ 21{
22 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 22 obj = eo_constructor(eo_super(obj, MY_CLASS));
23 23
24 pd->obj = obj; 24 pd->obj = obj;
25 pd->method = NULL; 25 pd->method = NULL;
@@ -35,7 +35,7 @@ _eldbus_model_method_constructor(Eo *obj EINA_UNUSED,
35 EINA_SAFETY_ON_NULL_RETURN(proxy); 35 EINA_SAFETY_ON_NULL_RETURN(proxy);
36 EINA_SAFETY_ON_NULL_RETURN(method); 36 EINA_SAFETY_ON_NULL_RETURN(method);
37 37
38 eo_do_super(obj, MY_CLASS, eldbus_model_arguments_constructor(proxy, method->name, method->arguments)); 38 eldbus_model_arguments_constructor(eo_super(obj, MY_CLASS), proxy, method->name, method->arguments);
39 39
40 pd->method = method; 40 pd->method = method;
41} 41}
@@ -96,7 +96,7 @@ _eldbus_model_method_call_cb(void *data, const Eldbus_Message *msg, Eldbus_Pendi
96 Eldbus_Model_Arguments_Data *args_data = eo_data_scope_get(pd->obj, ELDBUS_MODEL_ARGUMENTS_CLASS); 96 Eldbus_Model_Arguments_Data *args_data = eo_data_scope_get(pd->obj, ELDBUS_MODEL_ARGUMENTS_CLASS);
97 97
98 if (eldbus_model_arguments_process_arguments(args_data, msg, pending)) 98 if (eldbus_model_arguments_process_arguments(args_data, msg, pending))
99 eo_do(pd->obj, eo_event_callback_call(ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL, NULL)); 99 eo_event_callback_call(pd->obj, ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL, NULL);
100} 100}
101 101
102#include "eldbus_model_method.eo.c" 102#include "eldbus_model_method.eo.c"
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 115330e956..240d657e77 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -26,7 +26,7 @@ static void _eldbus_model_object_create_children(Eldbus_Model_Object_Data *, Eld
26static Eo_Base* 26static Eo_Base*
27_eldbus_model_object_eo_base_constructor(Eo *obj, Eldbus_Model_Object_Data *pd) 27_eldbus_model_object_eo_base_constructor(Eo *obj, Eldbus_Model_Object_Data *pd)
28{ 28{
29 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 29 obj = eo_constructor(eo_super(obj, MY_CLASS));
30 30
31 pd->obj = obj; 31 pd->obj = obj;
32 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED; 32 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -90,7 +90,7 @@ _eldbus_model_object_eo_base_destructor(Eo *obj, Eldbus_Model_Object_Data *pd)
90 90
91 _eldbus_model_object_clear(pd); 91 _eldbus_model_object_clear(pd);
92 92
93 eo_do_super(obj, MY_CLASS, eo_destructor()); 93 eo_destructor(eo_super(obj, MY_CLASS));
94} 94}
95 95
96static Efl_Model_Load_Status 96static Efl_Model_Load_Status
@@ -462,7 +462,7 @@ _eldbus_model_object_introspect_cb(void *data,
462 462
463 count = eina_list_count(pd->children_list); 463 count = eina_list_count(pd->children_list);
464 if (count) 464 if (count)
465 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count)); 465 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
466 } 466 }
467} 467}
468 468
@@ -532,8 +532,7 @@ _eldbus_model_object_create_children(Eldbus_Model_Object_Data *pd, Eldbus_Object
532 WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name); 532 WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
533 533
534 // TODO: increment reference to keep 'interface' in memory 534 // TODO: increment reference to keep 'interface' in memory
535 child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, 535 child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface));
536 eldbus_model_proxy_constructor(object, interface));
537 536
538 pd->children_list = eina_list_append(pd->children_list, child); 537 pd->children_list = eina_list_append(pd->children_list, child);
539 } 538 }
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index fd385a6bfe..2e660f4116 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -47,7 +47,7 @@ _eldbus_model_proxy_hash_free(Eina_Value *value)
47static Eo_Base* 47static Eo_Base*
48_eldbus_model_proxy_eo_base_constructor(Eo *obj, Eldbus_Model_Proxy_Data *pd) 48_eldbus_model_proxy_eo_base_constructor(Eo *obj, Eldbus_Model_Proxy_Data *pd)
49{ 49{
50 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 50 obj = eo_constructor(eo_super(obj, MY_CLASS));
51 51
52 pd->obj = obj; 52 pd->obj = obj;
53 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED; 53 pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -88,7 +88,7 @@ _eldbus_model_proxy_eo_base_destructor(Eo *obj, Eldbus_Model_Proxy_Data *pd)
88 eina_stringshare_del(pd->name); 88 eina_stringshare_del(pd->name);
89 eldbus_object_unref(pd->object); 89 eldbus_object_unref(pd->object);
90 90
91 eo_do_super(obj, MY_CLASS, eo_destructor()); 91 eo_destructor(eo_super(obj, MY_CLASS));
92} 92}
93 93
94static Efl_Model_Load_Status 94static Efl_Model_Load_Status
@@ -294,7 +294,7 @@ _eldbus_model_proxy_efl_model_base_children_load(Eo *obj EINA_UNUSED, Eldbus_Mod
294 294
295 count = eina_list_count(pd->children_list); 295 count = eina_list_count(pd->children_list);
296 if (count) 296 if (count)
297 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count)); 297 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
298} 298}
299 299
300static void 300static void
@@ -325,8 +325,7 @@ _eldbus_model_proxy_create_methods_children(Eldbus_Model_Proxy_Data *pd)
325 325
326 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name); 326 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name);
327 327
328 child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, 328 child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method));
329 eldbus_model_method_constructor(pd->proxy, method));
330 329
331 pd->children_list = eina_list_append(pd->children_list, child); 330 pd->children_list = eina_list_append(pd->children_list, child);
332 } 331 }
@@ -360,8 +359,7 @@ _eldbus_model_proxy_create_signals_children(Eldbus_Model_Proxy_Data *pd)
360 359
361 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name); 360 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name);
362 361
363 child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, 362 child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal));
364 eldbus_model_signal_constructor(pd->proxy, signal));
365 363
366 pd->children_list = eina_list_append(pd->children_list, child); 364 pd->children_list = eina_list_append(pd->children_list, child);
367 } 365 }
@@ -587,7 +585,7 @@ _eldbus_model_proxy_property_get_all_cb(void *data,
587 .changed_properties = changed_properties 585 .changed_properties = changed_properties
588 }; 586 };
589 587
590 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt)); 588 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
591 } 589 }
592 590
593 efl_model_load_set(pd->obj, &pd->load, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 591 efl_model_load_set(pd->obj, &pd->load, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -628,7 +626,7 @@ _eldbus_model_proxy_property_set_cb(void *data,
628 Efl_Model_Property_Event evt = { 626 Efl_Model_Property_Event evt = {
629 .changed_properties = pd->properties_array 627 .changed_properties = pd->properties_array
630 }; 628 };
631 eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt)); 629 eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
632 630
633 efl_model_property_changed_notify(pd->obj, property_set_data->property); 631 efl_model_property_changed_notify(pd->obj, property_set_data->property);
634 } 632 }
diff --git a/src/lib/eldbus/eldbus_model_signal.c b/src/lib/eldbus/eldbus_model_signal.c
index 4ef32bb906..406c451398 100644
--- a/src/lib/eldbus/eldbus_model_signal.c
+++ b/src/lib/eldbus/eldbus_model_signal.c
@@ -18,7 +18,7 @@ static void _eldbus_model_signal_callback_del(Eldbus_Model_Signal_Data *);
18static Eo_Base* 18static Eo_Base*
19_eldbus_model_signal_eo_base_constructor(Eo *obj, Eldbus_Model_Signal_Data *pd) 19_eldbus_model_signal_eo_base_constructor(Eo *obj, Eldbus_Model_Signal_Data *pd)
20{ 20{
21 eo_do_super(obj, MY_CLASS, eo_constructor()); 21 eo_constructor(eo_super(obj, MY_CLASS));
22 22
23 pd->obj = obj; 23 pd->obj = obj;
24 pd->handler = NULL; 24 pd->handler = NULL;
@@ -35,7 +35,7 @@ _eldbus_model_signal_constructor(Eo *obj EINA_UNUSED,
35 EINA_SAFETY_ON_NULL_RETURN(proxy); 35 EINA_SAFETY_ON_NULL_RETURN(proxy);
36 EINA_SAFETY_ON_NULL_RETURN(signal); 36 EINA_SAFETY_ON_NULL_RETURN(signal);
37 37
38 eo_do_super(obj, MY_CLASS, eldbus_model_arguments_constructor(proxy, signal->name, signal->arguments)); 38 eldbus_model_arguments_constructor(eo_super(obj, MY_CLASS), proxy, signal->name, signal->arguments);
39 39
40 pd->signal = signal; 40 pd->signal = signal;
41} 41}
@@ -45,7 +45,7 @@ _eldbus_model_signal_eo_base_destructor(Eo *obj, Eldbus_Model_Signal_Data *pd)
45{ 45{
46 _eldbus_model_signal_callback_del(pd); 46 _eldbus_model_signal_callback_del(pd);
47 47
48 eo_do_super(obj, MY_CLASS, eo_destructor()); 48 eo_destructor(eo_super(obj, MY_CLASS));
49} 49}
50 50
51static void 51static void
@@ -59,14 +59,14 @@ _eldbus_model_signal_efl_model_base_properties_load(Eo *obj, Eldbus_Model_Signal
59 59
60 _eldbus_model_signal_callback_add(pd); 60 _eldbus_model_signal_callback_add(pd);
61 61
62 eo_do_super(obj, MY_CLASS, efl_model_properties_load()); 62 efl_model_properties_load(eo_super(obj, MY_CLASS));
63} 63}
64 64
65static void 65static void
66_eldbus_model_signal_efl_model_base_unload(Eo *obj EINA_UNUSED, Eldbus_Model_Signal_Data *pd) 66_eldbus_model_signal_efl_model_base_unload(Eo *obj EINA_UNUSED, Eldbus_Model_Signal_Data *pd)
67{ 67{
68 _eldbus_model_signal_callback_del(pd); 68 _eldbus_model_signal_callback_del(pd);
69 eo_do_super(obj, MY_CLASS, efl_model_unload()); 69 efl_model_unload(eo_super(obj, MY_CLASS));
70} 70}
71 71
72static void 72static void