package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/D_bus_message/index.html
Module Wrappers.D_bus_message
type t = [ `d_bus_message | `object_ ] Gobject.objval new_ : unit -> tCreate a new DBusMessage
val new_method_call : string option -> string -> string option -> string -> tCreate a new DBusMessage
val new_signal : string -> string -> string -> tCreate a new DBusMessage
If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does nothing and returns %FALSE.
Otherwise this method encodes the error in @message as a #GError using g_dbus_error_set_dbus_error() using the information in the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as well as the first string item in @message's body.
val set_unix_fd_list :
t ->
[ `unix_fd_list | `object_ ] Gobject.obj option ->
unitSets the UNIX file descriptors associated with @message. As a side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field is set to the number of fds in @fd_list (or cleared if @fd_list is %NULL).
This method is only available on UNIX.
When designing D-Bus APIs that are intended to be interoperable, please note that non-GDBus implementations of D-Bus can usually only access file descriptors if they are referenced by a value of type %G_VARIANT_TYPE_HANDLE in the body of the message.
val set_signature : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
val set_sender : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
val set_path : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
val set_message_type : t -> Gio_enums.dbusmessagetype -> unitSets @message to be of @type.
val set_member : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
val set_interface : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
val set_header :
t ->
Gio_enums.dbusmessageheaderfield ->
Gvariant.t option ->
unitSets a header field on @message.
If @value is floating, @message assumes ownership of @value.
val set_flags : t -> Gio_enums.dbusmessageflags -> unitSets the flags to set on @message.
val set_error_name : t -> string -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
val set_destination : t -> string option -> unitConvenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
val set_byte_order : t -> Gio_enums.dbusmessagebyteorder -> unitSets the byte order of @message.
val set_body : t -> Gvariant.t -> unitSets the body @message. As a side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the type string of @body (or cleared if @body is %NULL).
If @body is floating, @message assumes ownership of @body.
val print : t -> int -> stringProduces a human-readable multi-line description of @message.
The contents of the description has no ABI guarantees, the contents and formatting is subject to change at any time. Typical output looks something like this: ``` Flags: none Version: 0 Serial: 4 Headers: path -> objectpath '/org/gtk/GDBus/TestObject' interface -> 'org.gtk.GDBus.TestInterface' member -> 'GimmeStdout' destination -> ':1.146' Body: () UNIX File Descriptors: (none) ``` or ``` Flags: no-reply-expected Version: 0 Serial: 477 Headers: reply-serial -> uint32 4 destination -> ':1.159' sender -> ':1.146' num-unix-fds -> uint32 1 Body: () UNIX File Descriptors: fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 ```
Creates a new #GDBusMessage that is an error reply to @method_call_message.
val lock : t -> unitIf @message is locked, does nothing. Otherwise locks the message.
val get_unix_fd_list : t -> [ `unix_fd_list | `object_ ] Gobject.obj optionGets the UNIX file descriptors associated with @message, if any.
This method is only available on UNIX.
The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE values in the body of the message. For example, if g_variant_get_handle() returns 5, that is intended to be a reference to the file descriptor that can be accessed by `g_unix_fd_list_get (list, 5, ...)`.
val get_signature : t -> stringConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
This will always be non-%NULL, but may be an empty string.
val get_sender : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
val get_path : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
val get_message_type : t -> Gio_enums.dbusmessagetypeGets the type of @message.
val get_member : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
val get_locked : t -> boolChecks whether @message is locked. To monitor changes to this value, conncet to the #GObject::notify signal to listen for changes on the #GDBusMessage:locked property.
val get_interface : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
val get_header : t -> Gio_enums.dbusmessageheaderfield -> Gvariant.t optionGets a header field on @message.
The caller is responsible for checking the type of the returned #GVariant matches what is expected.
val get_flags : t -> Gio_enums.dbusmessageflagsGets the flags for @message.
val get_error_name : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
val get_destination : t -> string optionConvenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
val get_byte_order : t -> Gio_enums.dbusmessagebyteorderGets the byte order of @message.
val get_body : t -> Gvariant.t optionGets the body of a message.
val get_arg0_path : t -> string optionConvenience to get the first item in the body of @message.
See method@Gio.DBusMessage.get_arg0 for returning string-typed arg0 values.
val get_arg0 : t -> string optionConvenience to get the first item in the body of @message.
See method@Gio.DBusMessage.get_arg0_path for returning object-path-typed arg0 values.
Copies @message. The copy is a deep copy and the returned #GDBusMessage is completely identical except that it is guaranteed to not be locked.
This operation can fail if e.g. @message contains file descriptors and the per-process or system-wide open files limit is reached.