summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-02-17 11:49:28 +0000
committerTom Hacohen <tom@stosb.com>2016-02-17 11:59:07 +0000
commitdf8cbbc4197e6cec896ff7926129d3b21aa88a80 (patch)
tree35b302143e52a777fe6ff4cb85cb815204b40354 /src/lib/eldbus
parent63f717caaf92b87e272ac0790125246bba105468 (diff)
Eldbus: Move more types to eldbus_types.eot.
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/Eldbus.h15
-rw-r--r--src/lib/eldbus/eldbus_introspection.c2
-rw-r--r--src/lib/eldbus/eldbus_introspection.h61
-rw-r--r--src/lib/eldbus/eldbus_model_arguments.eo14
-rw-r--r--src/lib/eldbus/eldbus_model_method.eo4
-rw-r--r--src/lib/eldbus/eldbus_model_object.eo2
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c4
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.eo4
-rw-r--r--src/lib/eldbus/eldbus_model_signal.eo2
-rw-r--r--src/lib/eldbus/eldbus_types.eot72
10 files changed, 86 insertions, 94 deletions
diff --git a/src/lib/eldbus/Eldbus.h b/src/lib/eldbus/Eldbus.h
index c8f35d8..f153dc5 100644
--- a/src/lib/eldbus/Eldbus.h
+++ b/src/lib/eldbus/Eldbus.h
@@ -164,19 +164,6 @@ EAPI int eldbus_shutdown(void);
164 * Callback that is called when the connection is freed. 164 * Callback that is called when the connection is freed.
165 */ 165 */
166typedef void (*Eldbus_Free_Cb)(void *data, const void *deadptr); 166typedef void (*Eldbus_Free_Cb)(void *data, const void *deadptr);
167
168/**
169 * @typedef Eldbus_Connection
170 *
171 * Represents a connection of one the type of connection with the DBus daemon.
172 */
173typedef struct _Eldbus_Connection Eldbus_Connection;
174/**
175 * @typedef Eldbus_Object
176 *
177 * Represents an object path already attached with bus name or unique id.
178 */
179typedef struct _Eldbus_Object Eldbus_Object;
180/** 167/**
181 * @typedef Eldbus_Proxy 168 * @typedef Eldbus_Proxy
182 * 169 *
@@ -230,6 +217,8 @@ typedef void (*Eldbus_Signal_Cb)(void *data, const Eldbus_Message *msg);
230 * @} 217 * @}
231 */ 218 */
232 219
220#include "eldbus_types.eot.h"
221
233#include "eldbus_connection.h" 222#include "eldbus_connection.h"
234#include "eldbus_message.h" 223#include "eldbus_message.h"
235#include "eldbus_signal_handler.h" 224#include "eldbus_signal_handler.h"
diff --git a/src/lib/eldbus/eldbus_introspection.c b/src/lib/eldbus/eldbus_introspection.c
index dbacf74..4338860 100644
--- a/src/lib/eldbus/eldbus_introspection.c
+++ b/src/lib/eldbus/eldbus_introspection.c
@@ -50,7 +50,7 @@ eldbus_introspection_parse(const char *xml)
50static void * 50static void *
51_eldbus_introspection_parse_node(Eina_Simple_XML_Node_Tag *tag) 51_eldbus_introspection_parse_node(Eina_Simple_XML_Node_Tag *tag)
52{ 52{
53 Eldbus_Introspection_Node *node;; 53 Eldbus_Introspection_Node *node;
54 Eldbus_Introspection_Element_Parse_Table table[] = { 54 Eldbus_Introspection_Element_Parse_Table table[] = {
55 { "node", _eldbus_introspection_parse_node, NULL }, 55 { "node", _eldbus_introspection_parse_node, NULL },
56 { "interface", _eldbus_introspection_parse_interface, NULL }, 56 { "interface", _eldbus_introspection_parse_interface, NULL },
diff --git a/src/lib/eldbus/eldbus_introspection.h b/src/lib/eldbus/eldbus_introspection.h
index 4fc2978..7c02498 100644
--- a/src/lib/eldbus/eldbus_introspection.h
+++ b/src/lib/eldbus/eldbus_introspection.h
@@ -5,67 +5,6 @@
5#include <Eo.h> 5#include <Eo.h>
6 6
7#include "eldbus_types.eot.h" 7#include "eldbus_types.eot.h"
8#include "eldbus_model_arguments.eo.h"
9
10// DTD conversion form: http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
11
12typedef struct _Eldbus_Introspection_Node Eldbus_Introspection_Node;
13typedef struct _Eldbus_Introspection_Interface Eldbus_Introspection_Interface;
14typedef struct _Eldbus_Introspection_Method Eldbus_Introspection_Method;
15typedef struct _Eldbus_Introspection_Signal Eldbus_Introspection_Signal;
16typedef struct _Eldbus_Introspection_Property Eldbus_Introspection_Property;
17typedef struct _Eldbus_Introspection_Annotation Eldbus_Introspection_Annotation;
18
19typedef enum
20{
21 ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READ,
22 ELDBUS_INTROSPECTION_PROPERTY_ACCESS_WRITE,
23 ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READWRITE,
24} Eldbus_Introspection_Property_Access;
25
26struct _Eldbus_Introspection_Node
27{
28 Eina_Stringshare *name; // optional
29 Eina_List *nodes;
30 Eina_List *interfaces;
31};
32
33struct _Eldbus_Introspection_Interface
34{
35 Eina_Stringshare *name;
36 Eina_List *methods;
37 Eina_List *signals;
38 Eina_List *properties;
39 Eina_List *annotations;
40};
41
42struct _Eldbus_Introspection_Method
43{
44 Eina_Stringshare *name;
45 Eina_List *arguments;
46 Eina_List *annotations;
47};
48
49struct _Eldbus_Introspection_Signal
50{
51 Eina_Stringshare *name;
52 Eina_List *arguments;
53 Eina_List *annotations;
54};
55
56struct _Eldbus_Introspection_Property
57{
58 Eina_Stringshare *name;
59 Eina_Stringshare *type;
60 Eldbus_Introspection_Property_Access access;
61 Eina_List *annotations;
62};
63
64struct _Eldbus_Introspection_Annotation
65{
66 Eina_Stringshare *name;
67 Eina_Stringshare *value;
68};
69 8
70/** 9/**
71 * @brief Parses the introspection xml abstracting it to an object tree 10 * @brief Parses the introspection xml abstracting it to an object tree
diff --git a/src/lib/eldbus/eldbus_model_arguments.eo b/src/lib/eldbus/eldbus_model_arguments.eo
index f15d1da..97ac163 100644
--- a/src/lib/eldbus/eldbus_model_arguments.eo
+++ b/src/lib/eldbus/eldbus_model_arguments.eo
@@ -1,19 +1,5 @@
1import eldbus_types; 1import eldbus_types;
2 2
3enum Eldbus.Introspection.Argument_Direction
4{
5 none = 0,
6 in,
7 out,
8}
9
10struct Eldbus.Introspection.Argument
11{
12 name: Eina.Stringshare *; [[Optional]]
13 type: Eina.Stringshare *;
14 direction: Eldbus.Introspection.Argument_Direction;
15}
16
17class Eldbus.Model_Arguments (Eo.Base, Efl.Model.Base) { 3class Eldbus.Model_Arguments (Eo.Base, Efl.Model.Base) {
18 legacy_prefix: null; 4 legacy_prefix: null;
19 methods { 5 methods {
diff --git a/src/lib/eldbus/eldbus_model_method.eo b/src/lib/eldbus/eldbus_model_method.eo
index dc5f810..7947e25 100644
--- a/src/lib/eldbus/eldbus_model_method.eo
+++ b/src/lib/eldbus/eldbus_model_method.eo
@@ -1,3 +1,5 @@
1import eldbus_types;
2
1class Eldbus.Model_Method (Eldbus.Model_Arguments) { 3class Eldbus.Model_Method (Eldbus.Model_Arguments) {
2 legacy_prefix: null; 4 legacy_prefix: null;
3 methods { 5 methods {
@@ -7,7 +9,7 @@ class Eldbus.Model_Method (Eldbus.Model_Arguments) {
7 @since 1.16]] 9 @since 1.16]]
8 params { 10 params {
9 @in proxy: Eldbus.Proxy*; [[Eldbus proxy]] 11 @in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
10 @in method: const(Eldbus_Introspection_Method)*; [[The introspected method]] 12 @in method: const(Eldbus.Introspection.Method)*; [[The introspected method]]
11 } 13 }
12 } 14 }
13 call { 15 call {
diff --git a/src/lib/eldbus/eldbus_model_object.eo b/src/lib/eldbus/eldbus_model_object.eo
index 68cbc81..bb8ad63 100644
--- a/src/lib/eldbus/eldbus_model_object.eo
+++ b/src/lib/eldbus/eldbus_model_object.eo
@@ -1,3 +1,5 @@
1import eldbus_types;
2
1class Eldbus.Model_Object (Eo.Base, Efl.Model.Base) { 3class Eldbus.Model_Object (Eo.Base, Efl.Model.Base) {
2 legacy_prefix: null; 4 legacy_prefix: null;
3 data: Eldbus_Model_Object_Data; 5 data: Eldbus_Model_Object_Data;
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index ffae0fc..fd385a6 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -2,11 +2,11 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <Eina.h>
6
5#include "eldbus_model_proxy_private.h" 7#include "eldbus_model_proxy_private.h"
6#include "eldbus_model_private.h" 8#include "eldbus_model_private.h"
7 9
8#include <Eina.h>
9
10#define MY_CLASS ELDBUS_MODEL_PROXY_CLASS 10#define MY_CLASS ELDBUS_MODEL_PROXY_CLASS
11#define MY_CLASS_NAME "Eldbus_Model_Proxy" 11#define MY_CLASS_NAME "Eldbus_Model_Proxy"
12 12
diff --git a/src/lib/eldbus/eldbus_model_proxy.eo b/src/lib/eldbus/eldbus_model_proxy.eo
index 2bab119..40f6d79 100644
--- a/src/lib/eldbus/eldbus_model_proxy.eo
+++ b/src/lib/eldbus/eldbus_model_proxy.eo
@@ -1,3 +1,5 @@
1import eldbus_types;
2
1class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) { 3class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
2 legacy_prefix: null; 4 legacy_prefix: null;
3 methods { 5 methods {
@@ -7,7 +9,7 @@ class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
7 @since 1.16]] 9 @since 1.16]]
8 params { 10 params {
9 @in object: Eldbus_Object *; [[Eldbus object]] 11 @in object: Eldbus_Object *; [[Eldbus object]]
10 @in interface: const(Eldbus_Introspection_Interface)*; [[The introspected interface]] 12 @in interface: const(Eldbus.Introspection.Interface)*; [[The introspected interface]]
11 } 13 }
12 } 14 }
13 @property name { 15 @property name {
diff --git a/src/lib/eldbus/eldbus_model_signal.eo b/src/lib/eldbus/eldbus_model_signal.eo
index 3a090a3..2c61857 100644
--- a/src/lib/eldbus/eldbus_model_signal.eo
+++ b/src/lib/eldbus/eldbus_model_signal.eo
@@ -7,7 +7,7 @@ class Eldbus.Model_Signal (Eldbus.Model_Arguments) {
7 @since 1.16]] 7 @since 1.16]]
8 params { 8 params {
9 @in proxy: Eldbus.Proxy*; [[Eldbus proxy]] 9 @in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
10 @in signal: const(Eldbus_Introspection_Signal)*; [[The introspected method]] 10 @in signal: const(Eldbus.Introspection.Signal)*; [[The introspected method]]
11 } 11 }
12 } 12 }
13 } 13 }
diff --git a/src/lib/eldbus/eldbus_types.eot b/src/lib/eldbus/eldbus_types.eot
index dcad2ed..6788ac7 100644
--- a/src/lib/eldbus/eldbus_types.eot
+++ b/src/lib/eldbus/eldbus_types.eot
@@ -1 +1,73 @@
1import eina_types;
2
1struct Eldbus.Proxy; 3struct Eldbus.Proxy;
4struct Eldbus_Connection; [[Represents a connection of one the type of connection with the DBus daemon.]]
5struct Eldbus_Object; [[Represents an object path already attached with bus name or unique id]]
6
7enum Eldbus.Introspection.Argument_Direction
8{
9 none = 0,
10 in,
11 out,
12}
13
14/* DTD conversion form: http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd */
15
16enum Eldbus.Introspection.Property_Access
17{
18 read,
19 write,
20 readwrite,
21}
22
23/* FIXME: Properly type all of these lists. */
24struct Eldbus.Introspection.Node
25{
26 name: Eina.Stringshare *; [[optional]]
27 nodes: list<void *> *;
28 interfaces: list<void *> *;
29}
30
31struct Eldbus.Introspection.Interface
32{
33 name: Eina.Stringshare *;
34 methods: list<void *> *;
35 signals: list<void *> *;
36 properties: list<void *> *;
37 annotations: list<void *> *;
38}
39
40struct Eldbus.Introspection.Method
41{
42 name: Eina.Stringshare *;
43 arguments: list<void *> *;
44 annotations: list<void *> *;
45}
46
47struct Eldbus.Introspection.Property
48{
49 name: Eina.Stringshare *;
50 type: Eina.Stringshare *;
51 access: Eldbus.Introspection.Property_Access;
52 annotations: list<void *> *;
53}
54
55struct Eldbus.Introspection.Annotation
56{
57 name: Eina.Stringshare *;
58 value: Eina.Stringshare *;
59}
60
61struct Eldbus.Introspection.Argument
62{
63 name: Eina.Stringshare *; [[Optional]]
64 type: Eina.Stringshare *;
65 direction: Eldbus.Introspection.Argument_Direction;
66}
67
68struct Eldbus.Introspection.Signal
69{
70 name: Eina.Stringshare *;
71 arguments: list<Eldbus.Introspection.Argument *> *;
72 annotations: list<Eldbus.Introspection.Annotation *> *;
73}