forked from enlightenment/efl
Eldbus: Move more types to eldbus_types.eot.
This commit is contained in:
parent
63f717caaf
commit
df8cbbc419
|
@ -164,19 +164,6 @@ EAPI int eldbus_shutdown(void);
|
||||||
* Callback that is called when the connection is freed.
|
* Callback that is called when the connection is freed.
|
||||||
*/
|
*/
|
||||||
typedef void (*Eldbus_Free_Cb)(void *data, const void *deadptr);
|
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
|
* @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_connection.h"
|
||||||
#include "eldbus_message.h"
|
#include "eldbus_message.h"
|
||||||
#include "eldbus_signal_handler.h"
|
#include "eldbus_signal_handler.h"
|
||||||
|
|
|
@ -50,7 +50,7 @@ eldbus_introspection_parse(const char *xml)
|
||||||
static void *
|
static void *
|
||||||
_eldbus_introspection_parse_node(Eina_Simple_XML_Node_Tag *tag)
|
_eldbus_introspection_parse_node(Eina_Simple_XML_Node_Tag *tag)
|
||||||
{
|
{
|
||||||
Eldbus_Introspection_Node *node;;
|
Eldbus_Introspection_Node *node;
|
||||||
Eldbus_Introspection_Element_Parse_Table table[] = {
|
Eldbus_Introspection_Element_Parse_Table table[] = {
|
||||||
{ "node", _eldbus_introspection_parse_node, NULL },
|
{ "node", _eldbus_introspection_parse_node, NULL },
|
||||||
{ "interface", _eldbus_introspection_parse_interface, NULL },
|
{ "interface", _eldbus_introspection_parse_interface, NULL },
|
||||||
|
|
|
@ -5,67 +5,6 @@
|
||||||
#include <Eo.h>
|
#include <Eo.h>
|
||||||
|
|
||||||
#include "eldbus_types.eot.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
|
* @brief Parses the introspection xml abstracting it to an object tree
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
import eldbus_types;
|
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) {
|
class Eldbus.Model_Arguments (Eo.Base, Efl.Model.Base) {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
methods {
|
methods {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import eldbus_types;
|
||||||
|
|
||||||
class Eldbus.Model_Method (Eldbus.Model_Arguments) {
|
class Eldbus.Model_Method (Eldbus.Model_Arguments) {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
methods {
|
methods {
|
||||||
|
@ -7,7 +9,7 @@ class Eldbus.Model_Method (Eldbus.Model_Arguments) {
|
||||||
@since 1.16]]
|
@since 1.16]]
|
||||||
params {
|
params {
|
||||||
@in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
|
@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 {
|
call {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import eldbus_types;
|
||||||
|
|
||||||
class Eldbus.Model_Object (Eo.Base, Efl.Model.Base) {
|
class Eldbus.Model_Object (Eo.Base, Efl.Model.Base) {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
data: Eldbus_Model_Object_Data;
|
data: Eldbus_Model_Object_Data;
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Eina.h>
|
||||||
|
|
||||||
#include "eldbus_model_proxy_private.h"
|
#include "eldbus_model_proxy_private.h"
|
||||||
#include "eldbus_model_private.h"
|
#include "eldbus_model_private.h"
|
||||||
|
|
||||||
#include <Eina.h>
|
|
||||||
|
|
||||||
#define MY_CLASS ELDBUS_MODEL_PROXY_CLASS
|
#define MY_CLASS ELDBUS_MODEL_PROXY_CLASS
|
||||||
#define MY_CLASS_NAME "Eldbus_Model_Proxy"
|
#define MY_CLASS_NAME "Eldbus_Model_Proxy"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import eldbus_types;
|
||||||
|
|
||||||
class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
|
class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
methods {
|
methods {
|
||||||
|
@ -7,7 +9,7 @@ class Eldbus.Model_Proxy (Eo.Base, Efl.Model.Base) {
|
||||||
@since 1.16]]
|
@since 1.16]]
|
||||||
params {
|
params {
|
||||||
@in object: Eldbus_Object *; [[Eldbus object]]
|
@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 {
|
@property name {
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Eldbus.Model_Signal (Eldbus.Model_Arguments) {
|
||||||
@since 1.16]]
|
@since 1.16]]
|
||||||
params {
|
params {
|
||||||
@in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
|
@in proxy: Eldbus.Proxy*; [[Eldbus proxy]]
|
||||||
@in signal: const(Eldbus_Introspection_Signal)*; [[The introspected method]]
|
@in signal: const(Eldbus.Introspection.Signal)*; [[The introspected method]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,73 @@
|
||||||
|
import eina_types;
|
||||||
|
|
||||||
struct Eldbus.Proxy;
|
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 *> *;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue