sig
exception Error of string * string
type bus
type message
type pending_call
type watch
type timeout
type service = string
type interface = string
type path = string
type add_watch_fn = DBus.watch -> bool
type rm_watch_fn = DBus.watch -> unit
type toggle_watch_fn = DBus.watch -> unit
type add_timeout_fn = DBus.timeout -> bool
type rm_timeout_fn = DBus.timeout -> unit
type toggle_timeout_fn = DBus.timeout -> unit
type watch_fns =
DBus.add_watch_fn * DBus.rm_watch_fn * DBus.toggle_watch_fn option
type timeout_fns =
DBus.add_timeout_fn * DBus.rm_timeout_fn *
DBus.toggle_timeout_fn option
type error_name =
ERR_FAILED
| ERR_NO_MEMORY
| ERR_SERVICE_UNKNOWN
| ERR_NAME_HAS_NO_OWNER
| ERR_NO_REPLY
| ERR_IO_ERROR
| ERR_BAD_ADDRESS
| ERR_NOT_SUPPORTED
| ERR_LIMITS_EXCEEDED
| ERR_ACCESS_DENIED
| ERR_AUTH_FAILED
| ERR_NO_SERVER
| ERR_TIMEOUT
| ERR_NO_NETWORK
| ERR_ADDRESS_IN_USE
| ERR_DISCONNECTED
| ERR_INVALID_ARGS
| ERR_FILE_NOT_FOUND
| ERR_FILE_EXISTS
| ERR_UNKNOWN_METHOD
| ERR_TIMED_OUT
| ERR_MATCH_RULE_NOT_FOUND
| ERR_MATCH_RULE_INVALID
| ERR_SPAWN_EXEC_FAILED
| ERR_SPAWN_FORK_FAILED
| ERR_SPAWN_CHILD_EXITED
| ERR_SPAWN_CHILD_SIGNALED
| ERR_SPAWN_FAILED
| ERR_SPAWN_SETUP_FAILED
| ERR_SPAWN_CONFIG_INVALID
| ERR_SPAWN_SERVICE_INVALID
| ERR_SPAWN_SERVICE_NOT_FOUND
| ERR_SPAWN_PERMISSIONS_INVALID
| ERR_SPAWN_FILE_INVALID
| ERR_SPAWN_NO_MEMORY
| ERR_UNIX_PROCESS_ID_UNKNOWN
| ERR_INVALID_SIGNATURE
| ERR_INVALID_FILE_CONTENT
| ERR_SELINUX_SECURITY_CONTEXT_UNKNOWN
| ERR_ADT_AUDIT_DATA_UNKNOWN
| ERR_OBJECT_PATH_IN_USE
type ty_sig =
SigByte
| SigBool
| SigInt16
| SigUInt16
| SigInt32
| SigUInt32
| SigInt64
| SigUInt64
| SigDouble
| SigString
| SigObjectPath
| SigVariant
| SigArray of DBus.ty_sig
| SigStruct of DBus.ty_sig list
| SigDict of DBus.ty_sig * DBus.ty_sig
type ty_array =
Unknowns
| Bytes of char list
| Bools of bool list
| Int16s of int list
| UInt16s of int list
| Int32s of int32 list
| UInt32s of int32 list
| Int64s of int64 list
| UInt64s of int64 list
| Doubles of float list
| Strings of string list
| ObjectPaths of string list
| Structs of DBus.ty_sig list * DBus.ty list list
| Variants of DBus.ty list
| Dicts of (DBus.ty_sig * DBus.ty_sig) * (DBus.ty * DBus.ty) list
| Arrays of DBus.ty_sig * DBus.ty_array list
and ty =
Unknown
| Byte of char
| Bool of bool
| Int16 of int
| UInt16 of int
| Int32 of int32
| UInt32 of int32
| Int64 of int64
| UInt64 of int64
| Double of float
| String of string
| ObjectPath of string
| Array of DBus.ty_array
| Struct of DBus.ty list
| Variant of DBus.ty
val string_of_ty : DBus.ty -> string
val string_of_error_name : DBus.error_name -> string
module Bus :
sig
type ty = Session | System | Starter
type flags = Replace_existing
type grab_flag = AllowReplacement | ReplaceExisting | DoNotQueue
type request_reply =
PrimaryOwner
| InQueue
| Exists
| AlreadyOwner
| ReqUnknown of int
type release_reply =
Released
| NonExistent
| NotOwner
| RelUnknown of int
val get : DBus.Bus.ty -> DBus.bus
val get_private : DBus.Bus.ty -> DBus.bus
val register : DBus.bus -> unit
val set_unique_name : DBus.bus -> string -> bool
val get_unique_name : DBus.bus -> string
val request_name :
DBus.bus ->
string -> DBus.Bus.grab_flag list -> DBus.Bus.request_reply
val release_name : DBus.bus -> string -> DBus.Bus.release_reply
val has_owner : DBus.bus -> string -> bool
val add_match : DBus.bus -> string -> bool -> unit
val remove_match : DBus.bus -> string -> bool -> unit
end
module Message :
sig
type message_type =
Invalid
| Method_call
| Method_return
| Error
| Signal
type message_header = {
serial : int32;
ty : DBus.Message.message_type;
destination : DBus.service option;
path : DBus.path option;
interface : DBus.interface option;
member : string option;
error_name : DBus.error_name option;
sender : string option;
}
val string_of_message_ty : DBus.Message.message_type -> string
val create : DBus.Message.message_type -> DBus.message
val new_method_call :
DBus.service -> DBus.path -> DBus.interface -> string -> DBus.message
val new_method_return : DBus.message -> DBus.message
val new_signal : DBus.path -> DBus.interface -> string -> DBus.message
val new_error :
DBus.message -> DBus.error_name -> string -> DBus.message
val get_header : DBus.message -> DBus.Message.message_header
val append : DBus.message -> DBus.ty list -> unit
val get : DBus.message -> DBus.ty list
val marshal : DBus.message -> string
val set_path : DBus.message -> DBus.path -> unit
val set_interface : DBus.message -> DBus.interface -> unit
val set_member : DBus.message -> string -> unit
val set_error_name : DBus.message -> DBus.error_name -> unit
val set_destination : DBus.message -> DBus.service -> unit
val set_sender : DBus.message -> string -> unit
val set_reply_serial : DBus.message -> int32 -> unit
val set_auto_start : DBus.message -> bool -> unit
val has_path : DBus.message -> DBus.path -> bool
val has_interface : DBus.message -> DBus.interface -> bool
val has_member : DBus.message -> string -> bool
val has_destination : DBus.message -> DBus.service -> bool
val has_sender : DBus.message -> string -> bool
val has_signature : DBus.message -> string -> bool
val get_type : DBus.message -> DBus.Message.message_type
val get_path : DBus.message -> DBus.path option
val get_interface : DBus.message -> DBus.interface option
val get_member : DBus.message -> string option
val get_error_name : DBus.message -> DBus.error_name option
val get_destination : DBus.message -> DBus.service option
val get_sender : DBus.message -> string option
val get_signature : DBus.message -> string option
val get_serial : DBus.message -> int32
val get_reply_serial : DBus.message -> int32
val get_auto_start : DBus.message -> bool
val is_signal : DBus.message -> DBus.interface -> string -> bool
val is_method_call : DBus.message -> DBus.interface -> string -> bool
val is_error : DBus.message -> string -> bool
end
module Connection :
sig
type dispatch_status = Data_remains | Complete | Need_memory
val send : DBus.bus -> DBus.message -> int32
val send_with_reply :
DBus.bus -> DBus.message -> int -> DBus.pending_call
val send_with_reply_and_block :
DBus.bus -> DBus.message -> int -> DBus.message
val add_filter : DBus.bus -> (DBus.bus -> DBus.message -> bool) -> unit
val flush : DBus.bus -> unit
val read_write : DBus.bus -> int -> bool
val read_write_dispatch : DBus.bus -> int -> bool
val pop_message : DBus.bus -> DBus.message option
val get_dispatch_status : DBus.bus -> DBus.Connection.dispatch_status
val dispatch : DBus.bus -> DBus.Connection.dispatch_status
val get_fd : DBus.bus -> Unix.file_descr
val set_watch_functions : DBus.bus -> DBus.watch_fns -> unit
val set_timeout_functions : DBus.bus -> DBus.timeout_fns -> unit
val get_max_message_size : DBus.bus -> int
val set_max_message_size : DBus.bus -> int -> unit
val get_max_received_size : DBus.bus -> int
val set_max_received_size : DBus.bus -> int -> unit
val get_outgoing_size : DBus.bus -> int
val set_allow_anonymous : DBus.bus -> bool -> unit
end
module PendingCall :
sig
val block : DBus.pending_call -> unit
val cancel : DBus.pending_call -> unit
val get_completed : DBus.pending_call -> bool
val steal_reply : DBus.pending_call -> DBus.message
end
module Watch :
sig
type flags = Readable | Writable
val get_unix_fd : DBus.watch -> Unix.file_descr
val get_enabled : DBus.watch -> bool
val get_flags : DBus.watch -> DBus.Watch.flags list
val handle : DBus.watch -> DBus.Watch.flags list -> unit
end
module Timeout :
sig
val get_interval : DBus.timeout -> int
val get_enabled : DBus.timeout -> bool
val handle : DBus.timeout -> unit
end
module Helper :
sig
val new_message_request_name :
string -> DBus.Bus.grab_flag list -> DBus.message
val new_message_release_name : string -> DBus.message
end
end