module OBus_introspect_ext:sig
..end
This module implement an extended introspection format, which can
be encoded into standard introspection documents by using
annotations.
By default, introspection document do not convey semantical
informations, such as enumeration or flags. However it is possible
to attach information to interfaces and members.
This module implement an extended introspection format, which can
be encoded into standard introspection documents by using
annotations.
This module implement an extended introspection format, which can
be encoded into standard introspection documents by using
annotations.
val obus_enum : string
org.ocamlcore.forge.obus.Enum
annotationval obus_flag : string
org.ocamlcore.forge.obus.Flag
annotationval obus_type : string
org.ocamlcore.forge.obus.Type
annotationval obus_itype : string
org.ocamlcore.forge.obus.IType
annotationval obus_otype : string
org.ocamlcore.forge.obus.OType
annotationtype
basic = private
| |
Byte |
|||
| |
Boolean |
|||
| |
Int16 |
|||
| |
Int32 |
|||
| |
Int64 |
|||
| |
Uint16 |
|||
| |
Uint32 |
|||
| |
Uint64 |
|||
| |
Double |
|||
| |
String |
|||
| |
Signature |
|||
| |
Object_path |
|||
| |
Unix_fd |
|||
| |
Enum of |
(* |
An enumeration. The first argument is the real D-Bus type and
the second is a list of
(constant, keyword) .
For example:
Note that the real D-Bus type must be | *) |
| |
Flag of |
(* |
A flag. The first argument is the real type and the second
is a list of
(bits, keyword) .
For example:
Note that the real D-Bus type must be | *) |
type
single =
| |
Basic of |
| |
Structure of |
| |
Array of |
| |
Dict of |
| |
Variant |
typesequence =
single list
val byte : basic
val boolean : basic
val int16 : basic
val int32 : basic
val int64 : basic
val uint16 : basic
val uint32 : basic
val uint64 : basic
val double : basic
val string : basic
val signature : basic
val object_path : basic
val unix_fd : basic
val enum : OBus_value.T.basic ->
(OBus_value.V.basic * string) list -> basic
val flag : OBus_value.T.basic ->
(OBus_value.V.basic * string) list -> basic
val basic : basic -> single
val structure : single list -> single
val array : single -> single
val dict : basic ->
single -> single
val variant : single
type
term = private
| |
Term of |
(* |
A term. Arguments are
| *) |
| |
Tuple of |
(* |
A list of terms, packed into a tuple. Tuple are always
mapped to D-Bus structure. Moreover it is ensured that there
is never type of the form
Tuple[t] . | *) |
val term : string -> term list -> term
val tuple : term list -> term
type
symbol = private
| |
Sym_enum of |
| |
Sym_flag of |
val sym_enum : OBus_value.T.basic ->
(OBus_value.V.basic * string) list -> symbol
val sym_flag : OBus_value.T.basic ->
(OBus_value.V.basic * string) list -> symbol
val strip_basic : basic -> OBus_value.T.basic
val strip_single : single -> OBus_value.T.single
val strip_sequence : sequence -> OBus_value.T.sequence
val project_basic : OBus_value.T.basic -> basic
val project_single : OBus_value.T.single -> single
val project_sequence : OBus_value.T.sequence -> sequence
val term_of_basic : OBus_value.T.basic -> term
val term_of_single : OBus_value.T.single -> term
val term_of_sequence : OBus_value.T.sequence -> term
typeenv =
(string * symbol) list
exception Resolve_error of string
val resolve : env ->
term -> single
resolve env term
resolves symbols of term
using env
, and
returns the extended type it denotes. It raises OBus_introspect_ext.Resolve_error
if a symbol of term
is not found in env
.typename =
string
typeannotation =
name * string
typeargument =
name option * term
typeaccess =
OBus_introspect.access
=
| |
Read |
| |
Write |
| |
Read_write |
type
member =
| |
Method of |
| |
Signal of |
| |
Property of |
typeinterface =
name * member list *
(string * symbol) list *
annotation list
val encode : interface -> OBus_introspect.interface
val decode : OBus_introspect.interface -> interface