Eldbus: Move more types to eldbus_types.eot.

This commit is contained in:
Tom Hacohen 2016-02-17 11:49:28 +00:00
parent 63f717caaf
commit df8cbbc419
10 changed files with 86 additions and 94 deletions

View File

@ -164,19 +164,6 @@ EAPI int eldbus_shutdown(void);
* Callback that is called when the connection is freed.
*/
typedef void (*Eldbus_Free_Cb)(void *data, const void *deadptr);
/**
* @typedef Eldbus_Connection
*
* Represents a connection of one the type of connection with the DBus daemon.
*/
typedef struct _Eldbus_Connection Eldbus_Connection;
/**
* @typedef Eldbus_Object
*
* Represents an object path already attached with bus name or unique id.
*/
typedef struct _Eldbus_Object Eldbus_Object;
/**
* @typedef Eldbus_Proxy
*
@ -230,6 +217,8 @@ typedef void (*Eldbus_Signal_Cb)(void *data, const Eldbus_Message *msg);
* @}
*/
#include "eldbus_types.eot.h"
#include "eldbus_connection.h"
#include "eldbus_message.h"
#include "eldbus_signal_handler.h"

View File

@ -50,7 +50,7 @@ eldbus_introspection_parse(const char *xml)
static void *
_eldbus_introspection_parse_node(Eina_Simple_XML_Node_Tag *tag)
{
Eldbus_Introspection_Node *node;;
Eldbus_Introspection_Node *node;
Eldbus_Introspection_Element_Parse_Table table[] = {
{ "node", _eldbus_introspection_parse_node, NULL },
{ "interface", _eldbus_introspection_parse_interface, NULL },

View File

@ -5,67 +5,6 @@
#include <Eo.h>
#include "eldbus_types.eot.h"
#include "eldbus_model_arguments.eo.h"
// DTD conversion form: http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
typedef struct _Eldbus_Introspection_Node Eldbus_Introspection_Node;
typedef struct _Eldbus_Introspection_Interface Eldbus_Introspection_Interface;
typedef struct _Eldbus_Introspection_Method Eldbus_Introspection_Method;
typedef struct _Eldbus_Introspection_Signal Eldbus_Introspection_Signal;
typedef struct _Eldbus_Introspection_Property Eldbus_Introspection_Property;
typedef struct _Eldbus_Introspection_Annotation Eldbus_Introspection_Annotation;
typedef enum
{
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READ,
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_WRITE,
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READWRITE,
} Eldbus_Introspection_Property_Access;
struct _Eldbus_Introspection_Node
{
Eina_Stringshare *name; // optional
Eina_List *nodes;
Eina_List *interfaces;
};
struct _Eldbus_Introspection_Interface
{
Eina_Stringshare *name;
Eina_List *methods;
Eina_List *signals;
Eina_List *properties;
Eina_List *annotations;
};
struct _Eldbus_Introspection_Method
{
Eina_Stringshare *name;
Eina_List *arguments;
Eina_List *annotations;
};
struct _Eldbus_Introspection_Signal
{
Eina_Stringshare *name;
Eina_List *arguments;
Eina_List *annotations;
};
struct _Eldbus_Introspection_Property
{
Eina_Stringshare *name;
Eina_Stringshare *type;
Eldbus_Introspection_Property_Access access;
Eina_List *annotations;
};
struct _Eldbus_Introspection_Annotation
{
Eina_Stringshare *name;
Eina_Stringshare *value;
};
/**
* @brief Parses the introspection xml abstracting it to an object tree

View File

@ -1,19 +1,5 @@
import eldbus_types;
enum Eldbus.Introspection.Argument_Direction
{
none = 0,
in,
out,
}
struct Eldbus.Introspection.Argument
{
name: Eina.Stringshare *; [[Optional]]
type: Eina.Stringshare *;
direction: Eldbus.Introspection.Argument_Direction;
}
class Eldbus.Model_Arguments (Eo.Base, Efl.Model.Base) {
legacy_prefix: null;
methods {

View File

@ -1,3 +1,5 @@
import eldbus_types;
class Eldbus.Model_Method (Eldbus.Model_Arguments) {
legacy_prefix: null;
methods {
@ -7,7 +9,7 @@ class Eldbus.Model_Method (Eldbus.Model_Arguments) {
@since 1.16]]
params {
@in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
@in method: const(Eldbus_Introspection_Method)*; [[The introspected method]]
@in method: const(Eldbus.Introspection.Method)*; [[The introspected method]]
}
}
call {

View File

@ -1,3 +1,5 @@
import eldbus_types;
class Eldbus.Model_Object (Eo.Base, Efl.Model.Base) {
legacy_prefix: null;
data: Eldbus_Model_Object_Data;

View File

@ -2,11 +2,11 @@
# include <config.h>
#endif
#include <Eina.h>
#include "eldbus_model_proxy_private.h"
#include "eldbus_model_private.h"
#include <Eina.h>
#define MY_CLASS ELDBUS_MODEL_PROXY_CLASS
#define MY_CLASS_NAME "Eldbus_Model_Proxy"

View File

@ -1,3 +1,5 @@
import eldbus_types;
class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
legacy_prefix: null;
methods {
@ -7,7 +9,7 @@ class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
@since 1.16]]
params {
@in object: Eldbus_Object *; [[Eldbus object]]
@in interface: const(Eldbus_Introspection_Interface)*; [[The introspected interface]]
@in interface: const(Eldbus.Introspection.Interface)*; [[The introspected interface]]
}
}
@property name {

View File

@ -7,7 +7,7 @@ class Eldbus.Model_Signal (Eldbus.Model_Arguments) {
@since 1.16]]
params {
@in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
@in signal: const(Eldbus_Introspection_Signal)*; [[The introspected method]]
@in signal: const(Eldbus.Introspection.Signal)*; [[The introspected method]]
}
}
}

View File

@ -1 +1,73 @@
import eina_types;
struct Eldbus.Proxy;
struct Eldbus_Connection; [[Represents a connection of one the type of connection with the DBus daemon.]]
struct Eldbus_Object; [[Represents an object path already attached with bus name or unique id]]
enum Eldbus.Introspection.Argument_Direction
{
none = 0,
in,
out,
}
/* DTD conversion form: http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd */
enum Eldbus.Introspection.Property_Access
{
read,
write,
readwrite,
}
/* FIXME: Properly type all of these lists. */
struct Eldbus.Introspection.Node
{
name: Eina.Stringshare *; [[optional]]
nodes: list<void *> *;
interfaces: list<void *> *;
}
struct Eldbus.Introspection.Interface
{
name: Eina.Stringshare *;
methods: list<void *> *;
signals: list<void *> *;
properties: list<void *> *;
annotations: list<void *> *;
}
struct Eldbus.Introspection.Method
{
name: Eina.Stringshare *;
arguments: list<void *> *;
annotations: list<void *> *;
}
struct Eldbus.Introspection.Property
{
name: Eina.Stringshare *;
type: Eina.Stringshare *;
access: Eldbus.Introspection.Property_Access;
annotations: list<void *> *;
}
struct Eldbus.Introspection.Annotation
{
name: Eina.Stringshare *;
value: Eina.Stringshare *;
}
struct Eldbus.Introspection.Argument
{
name: Eina.Stringshare *; [[Optional]]
type: Eina.Stringshare *;
direction: Eldbus.Introspection.Argument_Direction;
}
struct Eldbus.Introspection.Signal
{
name: Eina.Stringshare *;
arguments: list<Eldbus.Introspection.Argument *> *;
annotations: list<Eldbus.Introspection.Annotation *> *;
}