summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-09-23 16:07:50 -0700
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-09-23 16:07:50 -0700
commit7457f37df48c0eb9cfcdf012d863d1a995db6264 (patch)
tree2af87cca498292461b812fdf66c21141b4ab8815
parent1b9aeb529b9e076063e2db18fc71da4d2e41b4bf (diff)
eldbus_model: Removed constructor from connection
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c26
-rw-r--r--src/lib/eldbus/eldbus_model_connection.eo20
-rw-r--r--src/lib/eldbus/eldbus_model_method.c23
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c6
4 files changed, 25 insertions, 50 deletions
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index 72173b695e..d7919380de 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -37,19 +37,19 @@ _eldbus_model_connection_eo_base_constructor(Eo *obj, Eldbus_Model_Connection_Da
37 return obj; 37 return obj;
38} 38}
39 39
40static void 40/* static void */
41_eldbus_model_connection_constructor(Eo *obj EINA_UNUSED, 41/* _eldbus_model_connection_constructor(Eo *obj EINA_UNUSED, */
42 Eldbus_Model_Connection_Data *pd, 42/* Eldbus_Model_Connection_Data *pd, */
43 int type, 43/* int type, */
44 const char* address, 44/* const char* address, */
45 Eina_Bool private) 45/* Eina_Bool private) */
46{ 46/* { */
47 DBG("(%p)", obj); 47/* DBG("(%p)", obj); */
48 48
49 pd->type = type; 49/* pd->type = type; */
50 pd->address = eina_stringshare_add(address); 50/* pd->address = eina_stringshare_add(address); */
51 pd->private = private; 51/* pd->private = private; */
52} 52/* } */
53 53
54static void 54static void
55_eldbus_model_connection_eo_base_destructor(Eo *obj, Eldbus_Model_Connection_Data *pd) 55_eldbus_model_connection_eo_base_destructor(Eo *obj, Eldbus_Model_Connection_Data *pd)
diff --git a/src/lib/eldbus/eldbus_model_connection.eo b/src/lib/eldbus/eldbus_model_connection.eo
index 3f2e5ab389..4ca7d42b9b 100644
--- a/src/lib/eldbus/eldbus_model_connection.eo
+++ b/src/lib/eldbus/eldbus_model_connection.eo
@@ -1,27 +1,23 @@
1class Eldbus.Model_Connection (Eo.Base, Efl.Model.Base) { 1class Eldbus.Model_Connection (Eo.Base, Efl.Model.Base) {
2 legacy_prefix: null; 2 legacy_prefix: null;
3 methods { 3 methods {
4 constructor {
5 [[Custom Eldbus_Model_Connection constructor.
6
7 @since 1.16]]
8 params {
9 @in type: int; [[The connection type]]
10 @in address: const(char)*; [[Remote address of dbus]]
11 @in private_: bool; [[Non shared dbus connection]]
12 }
13 }
14 @property type { 4 @property type {
5 get {}
6 set {}
15 values { 7 values {
16 value: int; 8 value: int;
17 } 9 }
18 } 10 }
19 @property address { 11 @property address {
12 get {}
13 set {}
20 values { 14 values {
21 value: const(char)*; 15 value: const(char)*;
22 } 16 }
23 } 17 }
24 @property private { 18 @property private {
19 get {}
20 set {}
25 values { 21 values {
26 value: bool; 22 value: bool;
27 } 23 }
@@ -44,6 +40,8 @@ class Eldbus.Model_Connection (Eo.Base, Efl.Model.Base) {
44 Efl.Model.Base.children_load; 40 Efl.Model.Base.children_load;
45 } 41 }
46 constructors { 42 constructors {
47 .constructor; 43 .type;
44 .address;
45 .private;
48 } 46 }
49} 47}
diff --git a/src/lib/eldbus/eldbus_model_method.c b/src/lib/eldbus/eldbus_model_method.c
index 03911c0671..82d61cd2a0 100644
--- a/src/lib/eldbus/eldbus_model_method.c
+++ b/src/lib/eldbus/eldbus_model_method.c
@@ -28,17 +28,6 @@ _eldbus_model_method_eo_base_constructor(Eo *obj, Eldbus_Model_Method_Data *pd)
28} 28}
29 29
30static void 30static void
31_eldbus_model_method_proxy_set(Eo *obj EINA_UNUSED,
32 Eldbus_Model_Method_Data *pd EINA_UNUSED,
33 Eldbus_Proxy *proxy)
34{
35 DBG("(%p)", obj);
36 EINA_SAFETY_ON_NULL_RETURN(proxy);
37
38 eo_do(obj, eldbus_model_arguments_proxy_set(proxy));
39}
40
41static void
42_eldbus_model_method_method_set(Eo *obj EINA_UNUSED, 31_eldbus_model_method_method_set(Eo *obj EINA_UNUSED,
43 Eldbus_Model_Method_Data *pd, 32 Eldbus_Model_Method_Data *pd,
44 const Eldbus_Introspection_Method *method) 33 const Eldbus_Introspection_Method *method)
@@ -53,18 +42,6 @@ _eldbus_model_method_method_set(Eo *obj EINA_UNUSED,
53 eldbus_model_arguments_set(method->arguments)); 42 eldbus_model_arguments_set(method->arguments));
54} 43}
55 44
56static Eldbus_Proxy*
57_eldbus_model_method_proxy_get(Eo *obj EINA_UNUSED,
58 Eldbus_Model_Method_Data *pd EINA_UNUSED)
59{
60 DBG("(%p)", obj);
61
62 Eldbus_Proxy* p = NULL;
63 eo_do_super(obj, MY_CLASS, p = eldbus_model_arguments_proxy_get());
64
65 return p;
66}
67
68static const Eldbus_Introspection_Method * 45static const Eldbus_Introspection_Method *
69_eldbus_model_method_method_get(Eo *obj EINA_UNUSED, 46_eldbus_model_method_method_get(Eo *obj EINA_UNUSED,
70 Eldbus_Model_Method_Data *pd) 47 Eldbus_Model_Method_Data *pd)
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c
index ebf91d7108..2ce2361ff6 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model.c
@@ -129,9 +129,9 @@ Eo *
129create_connection(void) 129create_connection(void)
130{ 130{
131 Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL, 131 Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL,
132 eldbus_model_connection_constructor(ELDBUS_CONNECTION_TYPE_SESSION, 132 eldbus_model_connection_type_set(ELDBUS_CONNECTION_TYPE_SESSION),
133 NULL, 133 eldbus_model_connection_address_set(NULL),
134 EINA_FALSE)); 134 eldbus_model_connection_private_set(EINA_FALSE));
135 ck_assert_ptr_ne(NULL, connection); 135 ck_assert_ptr_ne(NULL, connection);
136 return connection; 136 return connection;
137} 137}