forked from enlightenment/efl
eolian: ban void_ptr in stable APIs
This required some refactoring in eldbus and tests but otherwise seems good to go.
This commit is contained in:
parent
d964a04da1
commit
635a2df7e7
|
@ -212,7 +212,25 @@ typedef void (*Eldbus_Signal_Cb)(void *data, const Eldbus_Message *msg);
|
|||
* @}
|
||||
*/
|
||||
|
||||
#include "eldbus_types.eot.h"
|
||||
/* FIXME: these are duplicated as @extern in eldbus_types.eot */
|
||||
|
||||
/** Represents a client object bound to an interface
|
||||
*
|
||||
* @ingroup Eldbus
|
||||
*/
|
||||
typedef struct _Eldbus_Proxy Eldbus_Proxy;
|
||||
|
||||
/** Represents a connection of one the type of connection with the DBus daemon.
|
||||
*
|
||||
* @ingroup Eldbus
|
||||
*/
|
||||
typedef struct _Eldbus_Connection Eldbus_Connection;
|
||||
|
||||
/** Represents an object path already attached with bus name or unique id
|
||||
*
|
||||
* @ingroup Eldbus
|
||||
*/
|
||||
typedef struct _Eldbus_Object Eldbus_Object;
|
||||
|
||||
#include "eldbus_connection.h"
|
||||
#include "eldbus_message.h"
|
||||
|
|
|
@ -4,7 +4,109 @@
|
|||
#include <Eina.h>
|
||||
#include <Eo.h>
|
||||
|
||||
#include "eldbus_types.eot.h"
|
||||
/* FIXME: these are duplicated as @extern in eldbus_types.eot */
|
||||
|
||||
/** Argument direction
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_NONE = 0, /**< No direction */
|
||||
ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_IN, /**< Incoming direction */
|
||||
ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_OUT /**< Outgoing direction */
|
||||
} Eldbus_Introspection_Argument_Direction;
|
||||
|
||||
/** Property access rights
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READ = 0, /**< Property can be read */
|
||||
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_WRITE, /**< Property can be written */
|
||||
ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READWRITE /**< Property can be read and
|
||||
* written */
|
||||
} Eldbus_Introspection_Property_Access;
|
||||
|
||||
/** DBus Node
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Node
|
||||
{
|
||||
Eina_Stringshare *name; /**< Node name (optional) */
|
||||
Eina_List *nodes; /**< List with nodes */
|
||||
Eina_List *interfaces; /**< List with interfaces */
|
||||
} Eldbus_Introspection_Node;
|
||||
|
||||
/** DBus Interface
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Interface
|
||||
{
|
||||
Eina_Stringshare *name; /**< Interface name */
|
||||
Eina_List *methods; /**< List with interface methods */
|
||||
Eina_List *signals; /**< List with interface signals */
|
||||
Eina_List *properties; /**< List with interface properties */
|
||||
Eina_List *annotations; /**< List with interface annotations */
|
||||
} Eldbus_Introspection_Interface;
|
||||
|
||||
/** DBus Method
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Method
|
||||
{
|
||||
Eina_Stringshare *name; /**< Method name */
|
||||
Eina_List *arguments; /**< List with method arguments */
|
||||
Eina_List *annotations; /**< List with method annotations */
|
||||
} Eldbus_Introspection_Method;
|
||||
|
||||
/** DBus Property
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Property
|
||||
{
|
||||
Eina_Stringshare *name; /**< Property name */
|
||||
Eina_Stringshare *type; /**< Property type */
|
||||
Eldbus_Introspection_Property_Access access; /**< Property access rights */
|
||||
Eina_List *annotations; /**< List with property annotations */
|
||||
} Eldbus_Introspection_Property;
|
||||
|
||||
/** DBus Annotation
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Annotation
|
||||
{
|
||||
Eina_Stringshare *name; /**< Annotation name */
|
||||
Eina_Stringshare *value; /**< Annotation value */
|
||||
} Eldbus_Introspection_Annotation;
|
||||
|
||||
/** DBus Argument
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Argument
|
||||
{
|
||||
Eina_Stringshare *name; /**< Argument name (optional) */
|
||||
Eina_Stringshare *type; /**< Argument type */
|
||||
Eldbus_Introspection_Argument_Direction direction; /**< Argument direction */
|
||||
} Eldbus_Introspection_Argument;
|
||||
|
||||
/** DBus Signal
|
||||
*
|
||||
* @ingroup Eldbus_Introspection
|
||||
*/
|
||||
typedef struct _Eldbus_Introspection_Signal
|
||||
{
|
||||
Eina_Stringshare *name; /**< Signal name */
|
||||
Eina_List *arguments; /**< List with signal arguments */
|
||||
Eina_List *annotations; /**< List with signal annotations */
|
||||
} Eldbus_Introspection_Signal;
|
||||
|
||||
/**
|
||||
* @brief Parses the introspection xml abstracting it to an object tree
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
struct Eldbus.Proxy; [[Represents a client object bound to an interface]]
|
||||
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]]
|
||||
struct @beta @extern Eldbus.Proxy; [[Represents a client object bound to an interface]]
|
||||
struct @beta @extern Eldbus.Connection; [[Represents a connection of one the type of connection with the DBus daemon.]]
|
||||
struct @beta @extern Eldbus.Object; [[Represents an object path already attached with bus name or unique id]]
|
||||
|
||||
enum @extern Eldbus.Connection.Type
|
||||
enum @beta @extern Eldbus.Connection.Type
|
||||
{
|
||||
[[Eldbus connection type]]
|
||||
unknown = 0, [[Sentinel, not a real type]]
|
||||
|
@ -13,7 +13,7 @@ enum @extern Eldbus.Connection.Type
|
|||
last, [[Sentinel, not a real type]]
|
||||
}
|
||||
|
||||
enum Eldbus.Introspection.Argument_Direction
|
||||
enum @beta @extern Eldbus.Introspection.Argument_Direction
|
||||
{
|
||||
[[Argument direction]]
|
||||
none = 0, [[No direction]]
|
||||
|
@ -23,7 +23,7 @@ enum Eldbus.Introspection.Argument_Direction
|
|||
|
||||
/* DTD conversion form: http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd */
|
||||
|
||||
enum Eldbus.Introspection.Property_Access
|
||||
enum @beta @extern Eldbus.Introspection.Property_Access
|
||||
{
|
||||
[[Property access rights]]
|
||||
read, [[Property can be read]]
|
||||
|
@ -32,7 +32,7 @@ enum Eldbus.Introspection.Property_Access
|
|||
}
|
||||
|
||||
/* FIXME: Properly type all of these lists. */
|
||||
struct Eldbus.Introspection.Node
|
||||
struct @beta @extern Eldbus.Introspection.Node
|
||||
{
|
||||
[[DBus Node]]
|
||||
name: stringshare; [[Node name (optional)]]
|
||||
|
@ -40,7 +40,7 @@ struct Eldbus.Introspection.Node
|
|||
interfaces: list<void_ptr>; [[List with interfaces]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Interface
|
||||
struct @beta @extern Eldbus.Introspection.Interface
|
||||
{
|
||||
[[DBus Interface]]
|
||||
name: stringshare; [[Interface name]]
|
||||
|
@ -50,7 +50,7 @@ struct Eldbus.Introspection.Interface
|
|||
annotations: list<void_ptr>; [[List with interface annotations]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Method
|
||||
struct @beta @extern Eldbus.Introspection.Method
|
||||
{
|
||||
[[DBus Method]]
|
||||
name: stringshare; [[Method name]]
|
||||
|
@ -58,7 +58,7 @@ struct Eldbus.Introspection.Method
|
|||
annotations: list<void_ptr>; [[List with method annotations]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Property
|
||||
struct @beta @extern Eldbus.Introspection.Property
|
||||
{
|
||||
[[DBus Property]]
|
||||
name: stringshare; [[Property name]]
|
||||
|
@ -67,14 +67,14 @@ struct Eldbus.Introspection.Property
|
|||
annotations: list<void_ptr>; [[List with property annotations]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Annotation
|
||||
struct @beta @extern Eldbus.Introspection.Annotation
|
||||
{
|
||||
[[DBus Annotation]]
|
||||
name: stringshare; [[Annotation name]]
|
||||
value: stringshare; [[Annotation value]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Argument
|
||||
struct @beta @extern Eldbus.Introspection.Argument
|
||||
{
|
||||
[[DBus Argument]]
|
||||
name: stringshare; [[Argument name (optional)]]
|
||||
|
@ -82,7 +82,7 @@ struct Eldbus.Introspection.Argument
|
|||
direction: Eldbus.Introspection.Argument_Direction; [[Argument direction]]
|
||||
}
|
||||
|
||||
struct Eldbus.Introspection.Signal
|
||||
struct @beta @extern Eldbus.Introspection.Signal
|
||||
{
|
||||
[[DBus Signal]]
|
||||
name: stringshare; [[Signal name]]
|
||||
|
|
|
@ -289,6 +289,17 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
switch (id)
|
||||
{
|
||||
case KW_void_ptr:
|
||||
if (vals->stable)
|
||||
{
|
||||
_eo_parser_log(&tp->base,
|
||||
"deprecated builtin type '%s' not allowed in stable context",
|
||||
tp->base.name);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
return _validate_ownable(tp);
|
||||
}
|
||||
/* user defined */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
interface Evas.Ector.Buffer
|
||||
interface @beta Evas.Ector.Buffer
|
||||
{
|
||||
[[Binding layer between ector buffers and evas images.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Name1.Name2.Type_Generation extends Efl.Object
|
||||
class @beta Name1.Name2.Type_Generation extends Efl.Object
|
||||
{
|
||||
data: Type_Generation_Data;
|
||||
methods {
|
||||
|
|
Loading…
Reference in New Issue