Typedefs | |
typedef DBusMessage | DBusMessage |
Opaque data type representing a message received from or to be sent to another application. | |
Functions | |
DBusMessage * | dbus_message_new (int message_type) |
Constructs a new message of the given message type. | |
DBusMessage * | dbus_message_new_method_call (const char *service, const char *path, const char *interface, const char *method) |
Constructs a new message to invoke a method on a remote object. | |
DBusMessage * | dbus_message_new_method_return (DBusMessage *method_call) |
Constructs a message that is a reply to a method call. | |
DBusMessage * | dbus_message_new_signal (const char *path, const char *interface, const char *name) |
Constructs a new message representing a signal emission. | |
DBusMessage * | dbus_message_new_error (DBusMessage *reply_to, const char *error_name, const char *error_message) |
Creates a new message that is an error reply to a certain message. | |
DBusMessage * | dbus_message_new_error_printf (DBusMessage *reply_to, const char *error_name, const char *error_format,...) |
Creates a new message that is an error reply to a certain message. | |
DBusMessage * | dbus_message_copy (const DBusMessage *message) |
Creates a new message that is an exact replica of the message specified, except that its refcount is set to 1. | |
DBusMessage * | dbus_message_ref (DBusMessage *message) |
Increments the reference count of a DBusMessage. | |
void | dbus_message_unref (DBusMessage *message) |
Decrements the reference count of a DBusMessage. | |
int | dbus_message_get_type (DBusMessage *message) |
Gets the type of a message. | |
dbus_bool_t | dbus_message_set_path (DBusMessage *message, const char *object_path) |
Sets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the one a signal is being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL). | |
const char * | dbus_message_get_path (DBusMessage *message) |
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL). | |
dbus_bool_t | dbus_message_get_path_decomposed (DBusMessage *message, char ***path) |
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL) in a decomposed format (one array element per path component). | |
dbus_bool_t | dbus_message_set_interface (DBusMessage *message, const char *interface) |
Sets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the interface a signal is being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL). | |
const char * | dbus_message_get_interface (DBusMessage *message) |
Gets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL). | |
dbus_bool_t | dbus_message_set_member (DBusMessage *message, const char *member) |
Sets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE_SIGNAL). | |
const char * | dbus_message_get_member (DBusMessage *message) |
Gets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE_SIGNAL). | |
dbus_bool_t | dbus_message_set_error_name (DBusMessage *message, const char *error_name) |
Sets the name of the error (DBUS_MESSAGE_TYPE_ERROR). | |
const char * | dbus_message_get_error_name (DBusMessage *message) |
Gets the error name (DBUS_MESSAGE_TYPE_ERROR only). | |
dbus_bool_t | dbus_message_set_destination (DBusMessage *message, const char *destination) |
Sets the message's destination service. | |
const char * | dbus_message_get_destination (DBusMessage *message) |
Gets the destination service of a message. | |
dbus_bool_t | dbus_message_append_args (DBusMessage *message, int first_arg_type,...) |
Appends fields to a message given a variable argument list. | |
dbus_bool_t | dbus_message_get_args (DBusMessage *message, DBusError *error, int first_arg_type,...) |
Gets arguments from a message given a variable argument list. | |
dbus_bool_t | dbus_message_get_args_valist (DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args) |
This function takes a va_list for use by language bindings. | |
dbus_bool_t | dbus_message_iter_get_args (DBusMessageIter *iter, DBusError *error, int first_arg_type,...) |
Gets arguments from a message iterator given a variable argument list. | |
dbus_bool_t | dbus_message_iter_init (DBusMessage *message, DBusMessageIter *iter) |
Initializes a DBusMessageIter representing the arguments of the message passed in. | |
dbus_bool_t | dbus_message_iter_has_next (DBusMessageIter *iter) |
Checks if an iterator has any more fields. | |
dbus_bool_t | dbus_message_iter_next (DBusMessageIter *iter) |
Moves the iterator to the next field. | |
int | dbus_message_iter_get_arg_type (DBusMessageIter *iter) |
Returns the argument type of the argument that the message iterator points at. | |
int | dbus_message_iter_get_array_type (DBusMessageIter *iter) |
Returns the element type of the array that the message iterator points at. | |
char * | dbus_message_iter_get_string (DBusMessageIter *iter) |
Returns the string value that an iterator may point to. | |
char * | dbus_message_iter_get_object_path (DBusMessageIter *iter) |
Returns the object path value that an iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_custom (DBusMessageIter *iter, char **name, unsigned char **value, int *len) |
Returns the name and data from a custom type that an iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_args_valist (DBusMessageIter *iter, DBusError *error, int first_arg_type, va_list var_args) |
This function takes a va_list for use by language bindings. | |
unsigned char | dbus_message_iter_get_byte (DBusMessageIter *iter) |
Returns the byte value that an iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_boolean (DBusMessageIter *iter) |
Returns the boolean value that an iterator may point to. | |
dbus_int32_t | dbus_message_iter_get_int32 (DBusMessageIter *iter) |
Returns the 32 bit signed integer value that an iterator may point to. | |
dbus_uint32_t | dbus_message_iter_get_uint32 (DBusMessageIter *iter) |
Returns the 32 bit unsigned integer value that an iterator may point to. | |
dbus_int64_t | dbus_message_iter_get_int64 (DBusMessageIter *iter) |
Returns the 64 bit signed integer value that an iterator may point to. | |
dbus_uint64_t | dbus_message_iter_get_uint64 (DBusMessageIter *iter) |
Returns the 64 bit unsigned integer value that an iterator may point to. | |
double | dbus_message_iter_get_double (DBusMessageIter *iter) |
Returns the double value that an iterator may point to. | |
dbus_bool_t | dbus_message_iter_init_array_iterator (DBusMessageIter *iter, DBusMessageIter *array_iter, int *array_type) |
Initializes an iterator for the array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_init_dict_iterator (DBusMessageIter *iter, DBusMessageIter *dict_iter) |
Initializes an iterator for the dict that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_byte_array (DBusMessageIter *iter, unsigned char **value, int *len) |
Returns the byte array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_boolean_array (DBusMessageIter *iter, unsigned char **value, int *len) |
Returns the boolean array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_int32_array (DBusMessageIter *iter, dbus_int32_t **value, int *len) |
Returns the 32 bit signed integer array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_uint32_array (DBusMessageIter *iter, dbus_uint32_t **value, int *len) |
Returns the 32 bit unsigned integer array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_int64_array (DBusMessageIter *iter, dbus_int64_t **value, int *len) |
Returns the 64 bit signed integer array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_uint64_array (DBusMessageIter *iter, dbus_uint64_t **value, int *len) |
Returns the 64 bit unsigned integer array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_double_array (DBusMessageIter *iter, double **value, int *len) |
Returns the double array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_string_array (DBusMessageIter *iter, char ***value, int *len) |
Returns the string array that the iterator may point to. | |
dbus_bool_t | dbus_message_iter_get_object_path_array (DBusMessageIter *iter, char ***value, int *len) |
Returns the object path array that the iterator may point to. | |
char * | dbus_message_iter_get_dict_key (DBusMessageIter *iter) |
Returns the key name fot the dict entry that an iterator may point to. | |
void | dbus_message_append_iter_init (DBusMessage *message, DBusMessageIter *iter) |
Initializes a DBusMessageIter pointing to the end of the message. | |
dbus_bool_t | dbus_message_iter_append_nil (DBusMessageIter *iter) |
Appends a nil value to the message. | |
dbus_bool_t | dbus_message_iter_append_boolean (DBusMessageIter *iter, dbus_bool_t value) |
Appends a boolean value to the message. | |
dbus_bool_t | dbus_message_iter_append_byte (DBusMessageIter *iter, unsigned char value) |
Appends a byte to the message. | |
dbus_bool_t | dbus_message_iter_append_int32 (DBusMessageIter *iter, dbus_int32_t value) |
Appends a 32 bit signed integer to the message. | |
dbus_bool_t | dbus_message_iter_append_uint32 (DBusMessageIter *iter, dbus_uint32_t value) |
Appends a 32 bit unsigned integer to the message. | |
dbus_bool_t | dbus_message_iter_append_int64 (DBusMessageIter *iter, dbus_int64_t value) |
Appends a 64 bit signed integer to the message. | |
dbus_bool_t | dbus_message_iter_append_uint64 (DBusMessageIter *iter, dbus_uint64_t value) |
Appends a 64 bit unsigned integer to the message. | |
dbus_bool_t | dbus_message_iter_append_double (DBusMessageIter *iter, double value) |
Appends a double value to the message. | |
dbus_bool_t | dbus_message_iter_append_string (DBusMessageIter *iter, const char *value) |
Appends a UTF-8 string to the message. | |
dbus_bool_t | dbus_message_iter_append_object_path (DBusMessageIter *iter, const char *value) |
Appends an object path to the message. | |
dbus_bool_t | dbus_message_iter_append_custom (DBusMessageIter *iter, const char *name, const unsigned char *data, int len) |
Appends a custom type data chunk to the message. | |
dbus_bool_t | dbus_message_iter_append_dict_key (DBusMessageIter *iter, const char *value) |
Appends a dict key name to the message. | |
dbus_bool_t | dbus_message_iter_append_array (DBusMessageIter *iter, DBusMessageIter *array_iter, int element_type) |
Appends an array to the message and initializes an iterator that can be used to append to the array. | |
dbus_bool_t | dbus_message_iter_append_dict (DBusMessageIter *iter, DBusMessageIter *dict_iter) |
Appends a dict to the message and initializes an iterator that can be used to append to the dict. | |
dbus_bool_t | dbus_message_append_args_valist (DBusMessage *message, int first_arg_type, va_list var_args) |
This function takes a va_list for use by language bindings. | |
dbus_bool_t | dbus_message_iter_append_boolean_array (DBusMessageIter *iter, unsigned const char *value, int len) |
Appends a boolean array to the message. | |
dbus_bool_t | dbus_message_iter_append_int32_array (DBusMessageIter *iter, const dbus_int32_t *value, int len) |
Appends a 32 bit signed integer array to the message. | |
dbus_bool_t | dbus_message_iter_append_uint32_array (DBusMessageIter *iter, const dbus_uint32_t *value, int len) |
Appends a 32 bit unsigned integer array to the message. | |
dbus_bool_t | dbus_message_iter_append_int64_array (DBusMessageIter *iter, const dbus_int64_t *value, int len) |
Appends a 64 bit signed integer array to the message. | |
dbus_bool_t | dbus_message_iter_append_uint64_array (DBusMessageIter *iter, const dbus_uint64_t *value, int len) |
Appends a 64 bit unsigned integer array to the message. | |
dbus_bool_t | dbus_message_iter_append_double_array (DBusMessageIter *iter, const double *value, int len) |
Appends a double array to the message. | |
dbus_bool_t | dbus_message_iter_append_byte_array (DBusMessageIter *iter, unsigned const char *value, int len) |
Appends a byte array to the message. | |
dbus_bool_t | dbus_message_iter_append_string_array (DBusMessageIter *iter, const char **value, int len) |
Appends a string array to the message. | |
dbus_bool_t | dbus_message_iter_append_object_path_array (DBusMessageIter *iter, const char **value, int len) |
Appends an object path array to the message. | |
dbus_bool_t | dbus_message_set_sender (DBusMessage *message, const char *sender) |
Sets the message sender. | |
void | dbus_message_set_no_reply (DBusMessage *message, dbus_bool_t no_reply) |
Sets a flag indicating that the message does not want a reply; if this flag is set, the other end of the connection may (but is not required to) optimize by not sending method return or error replies. | |
dbus_bool_t | dbus_message_get_no_reply (DBusMessage *message) |
Returns TRUE if the message does not expect a reply. | |
void | dbus_message_set_auto_activation (DBusMessage *message, dbus_bool_t auto_activation) |
Sets a flag indicating that the addressed service will be auto-activated before the message is delivered. | |
dbus_bool_t | dbus_message_get_auto_activation (DBusMessage *message) |
Returns TRUE if the message will cause the addressed service to be auto-activated. | |
const char * | dbus_message_get_sender (DBusMessage *message) |
Gets the service which originated this message, or NULL if unknown or inapplicable. | |
const char * | dbus_message_get_signature (DBusMessage *message) |
Gets the type signature of the message, i.e. | |
dbus_bool_t | dbus_message_is_method_call (DBusMessage *message, const char *interface, const char *method) |
Checks whether the message is a method call with the given interface and member fields. | |
dbus_bool_t | dbus_message_is_signal (DBusMessage *message, const char *interface, const char *signal_name) |
Checks whether the message is a signal with the given interface and member fields. | |
dbus_bool_t | dbus_message_is_error (DBusMessage *message, const char *error_name) |
Checks whether the message is an error reply with the given error name. | |
dbus_bool_t | dbus_message_has_destination (DBusMessage *message, const char *service) |
Checks whether the message was sent to the given service. | |
dbus_bool_t | dbus_message_has_sender (DBusMessage *message, const char *service) |
Checks whether the message has the given service as its sender. | |
dbus_bool_t | dbus_message_has_signature (DBusMessage *message, const char *signature) |
Checks whether the message has the given signature; see dbus_message_get_signature() for more details on what the signature looks like. | |
dbus_bool_t | dbus_set_error_from_message (DBusError *error, DBusMessage *message) |
Sets a DBusError based on the contents of the given message. |
A DBusMessage is the most basic unit of communication over a DBusConnection. A DBusConnection represents a stream of messages received from a remote application, and a stream of messages sent to a remote application.
|
Appends fields to a message given a variable argument list. The variable argument list should contain the type of the argument followed by the value to add. Array values are specified by an int typecode followed by a pointer to the array followed by an int giving the length of the array. The argument list must be terminated with #DBUS_TYPE_INVALID. This function doesn't support dicts or non-fundamental arrays. This function supports #DBUS_TYPE_INT64 and #DBUS_TYPE_UINT64 only if #DBUS_HAVE_INT64 is defined.
Definition at line 2032 of file dbus-message.c. References dbus_bool_t, dbus_message_append_args_valist(), FALSE, and NULL. Referenced by dbus_bus_acquire_service(), dbus_bus_activate_service(), dbus_bus_add_match(), dbus_bus_get_unix_user(), dbus_bus_remove_match(), dbus_bus_service_exists(), and dbus_g_proxy_new_for_service_owner(). |
|
|
Initializes a DBusMessageIter pointing to the end of the message. This iterator can be used to append data to the message.
Definition at line 3296 of file dbus-message.c. References _dbus_string_get_length(), body, DBusMessageRealIter::changed_stamp, changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter, DBusMessageRealIter::end, DBusMessageRealIter::message, NULL, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. Referenced by dbus_message_append_args_valist(), and dbus_message_new_error(). |
|
Creates a new message that is an exact replica of the message specified, except that its refcount is set to 1.
Definition at line 1649 of file dbus-message.c. References _dbus_string_copy(), _dbus_string_free(), _dbus_string_get_length(), _dbus_string_init_preallocated(), body, byte_order, client_serial, dbus_free(), dbus_new0, header, header_fields, header_padding, locked, NULL, refcount, reply_serial, and DBusAtomic::value. |
|
Gets arguments from a message given a variable argument list. The variable argument list should contain the type of the argumen followed by a pointer to where the value should be stored. The list is terminated with #DBUS_TYPE_INVALID.
Definition at line 2063 of file dbus-message.c. References dbus_bool_t, dbus_message_get_args_valist(), FALSE, and NULL. Referenced by dbus_bus_acquire_service(), dbus_bus_activate_service(), dbus_bus_get_unix_user(), dbus_bus_register(), dbus_bus_service_exists(), dbus_g_proxy_new_for_service_owner(), and dbus_set_error_from_message(). |
|
This function takes a va_list for use by language bindings.
Definition at line 2094 of file dbus-message.c. References dbus_message_iter_get_args_valist(), dbus_message_iter_init(), FALSE, and NULL. Referenced by dbus_g_proxy_end_call(), and dbus_message_get_args(). |
|
Returns TRUE if the message will cause the addressed service to be auto-activated.
Definition at line 4396 of file dbus-message.c. References _dbus_string_get_const_data_len(), FALSE, FLAGS_OFFSET, header, and NULL. |
|
Gets the destination service of a message.
Definition at line 2004 of file dbus-message.c. References NULL. Referenced by dbus_message_has_destination(). |
|
Gets the error name (DBUS_MESSAGE_TYPE_ERROR only).
Definition at line 1968 of file dbus-message.c. References NULL. Referenced by dbus_message_is_error(), and dbus_set_error_from_message(). |
|
Gets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL). The interface name is fully-qualified (namespaced).
Definition at line 1891 of file dbus-message.c. References NULL. Referenced by _dbus_connection_message_sent(), _dbus_connection_queue_received_message_link(), dbus_connection_dispatch(), and dbus_connection_send_preallocated(). |
|
Gets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE_SIGNAL).
Definition at line 1930 of file dbus-message.c. References NULL. Referenced by dbus_connection_dispatch(), and dbus_connection_send_preallocated(). |
|
Returns TRUE if the message does not expect a reply.
Definition at line 4350 of file dbus-message.c. References _dbus_string_get_const_data_len(), FALSE, FLAGS_OFFSET, header, and NULL. |
|
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL).
Definition at line 1824 of file dbus-message.c. References NULL. |
|
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL) in a decomposed format (one array element per path component). Free the returned array with dbus_free_string_array(). An empty but non-NULL path array means the path "/". So the path "/foo/bar" becomes { "foo", "bar", NULL } and the path "/" becomes { NULL }.
Definition at line 1847 of file dbus-message.c. Referenced by _dbus_object_tree_dispatch_and_unlock(). |
|
Gets the service which originated this message, or NULL if unknown or inapplicable.
Definition at line 4415 of file dbus-message.c. References NULL. Referenced by dbus_message_has_sender(). |
|
Gets the type signature of the message, i.e. the arguments in the message payload. The signature includes only "in" arguments for #DBUS_MESSAGE_TYPE_METHOD_CALL and only "out" arguments for #DBUS_MESSAGE_TYPE_METHOD_RETURN, so is slightly different from what you might expect (it does not include the signature of the entire C++-style method). The signature is a string made up of type codes such as #DBUS_TYPE_STRING. The string is terminated with nul (nul is also the value of #DBUS_TYPE_INVALID).
Definition at line 4440 of file dbus-message.c. References NULL. Referenced by _dbus_connection_message_sent(), _dbus_connection_queue_received_message_link(), dbus_connection_dispatch(), and dbus_message_has_signature(). |
|
Gets the type of a message. Types include DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR, DBUS_MESSAGE_TYPE_SIGNAL, but other types are allowed and all code must silently ignore messages of unknown type. DBUS_MESSAGE_TYPE_INVALID will never be returned, however.
Definition at line 1783 of file dbus-message.c. References _dbus_assert, _dbus_string_get_byte(), and header. Referenced by _dbus_connection_message_sent(), _dbus_connection_queue_received_message_link(), _dbus_pending_call_complete_and_unlock(), dbus_connection_dispatch(), dbus_connection_send_preallocated(), dbus_g_proxy_end_call(), dbus_message_is_error(), and dbus_set_error_from_message(). |
|
Checks whether the message was sent to the given service. If the message has no service specified or has a different name, returns FALSE.
Definition at line 4575 of file dbus-message.c. References dbus_message_get_destination(), FALSE, and NULL. |
|
Checks whether the message has the given service as its sender. If the message has no sender specified or has a different sender, returns FALSE. Note that if a peer application owns multiple services, its messages will have only one of those services as the sender (usually the base service). So you can't use this function to prove the sender didn't own service Foo, you can only use it to prove that it did.
Definition at line 4606 of file dbus-message.c. References dbus_message_get_sender(), FALSE, and NULL. |
|
Checks whether the message has the given signature; see dbus_message_get_signature() for more details on what the signature looks like.
Definition at line 4632 of file dbus-message.c. References dbus_message_get_signature(), FALSE, and NULL. |
|
Checks whether the message is an error reply with the given error name. If the message is not #DBUS_MESSAGE_TYPE_ERROR, or has a different name, returns FALSE.
Definition at line 4544 of file dbus-message.c. References dbus_message_get_error_name(), dbus_message_get_type(), FALSE, and NULL. |
|
Checks whether the message is a method call with the given interface and member fields. If the message is not #DBUS_MESSAGE_TYPE_METHOD_CALL, or has a different interface or member field, returns FALSE.
Definition at line 4494 of file dbus-message.c. |
|
Checks whether the message is a signal with the given interface and member fields. If the message is not #DBUS_MESSAGE_TYPE_SIGNAL, or has a different interface or member field, returns FALSE.
Definition at line 4520 of file dbus-message.c. Referenced by dbus_connection_dispatch(). |
|
Appends an array to the message and initializes an iterator that can be used to append to the array.
Definition at line 3821 of file dbus-message.c. References _dbus_marshal_uint32(), _dbus_string_get_length(), _dbus_string_set_length(), _dbus_warn(), DBusMessageRealIter::array_type_done, DBusMessageRealIter::array_type_pos, DBusMessageRealIter::changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter::container_start, dbus_bool_t, dbus_uint32_t, DBusMessageRealIter, DBusMessageRealIter::end, FALSE, DBusMessageRealIter::message, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. |
|
Appends a boolean value to the message.
Definition at line 3486 of file dbus-message.c. References dbus_bool_t. Referenced by dbus_message_append_args_valist(). |
|
Appends a boolean array to the message.
Definition at line 4116 of file dbus-message.c. |
|
Appends a byte to the message.
Definition at line 3501 of file dbus-message.c. Referenced by dbus_message_append_args_valist(). |
|
Appends a byte array to the message.
Definition at line 4225 of file dbus-message.c. |
|
Appends a custom type data chunk to the message. A custom type is simply an arbitrary UTF-8 string used as a type tag, plus an array of arbitrary bytes to be interpreted according to the type tag.
Definition at line 3660 of file dbus-message.c. References _dbus_marshal_byte_array(), _dbus_marshal_string(), _dbus_string_set_length(), DBusMessageRealIter, and FALSE. Referenced by dbus_message_append_args_valist(). |
|
Appends a dict to the message and initializes an iterator that can be used to append to the dict.
Definition at line 3882 of file dbus-message.c. References _dbus_marshal_uint32(), _dbus_string_get_length(), _dbus_string_set_length(), DBusMessageRealIter::changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter::container_start, dbus_uint32_t, DBusMessageRealIter, DBusMessageRealIter::end, FALSE, DBusMessageRealIter::message, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. |
|
Appends a dict key name to the message. The iterator used must point to a dict.
Definition at line 3699 of file dbus-message.c. References _dbus_assert, _dbus_marshal_string(), _dbus_warn(), DBusMessageRealIter, and FALSE. |
|
Appends a double value to the message.
Definition at line 3579 of file dbus-message.c. Referenced by dbus_message_append_args_valist(). |
|
Appends a double array to the message.
Definition at line 4208 of file dbus-message.c. |
|
Appends a 32 bit signed integer to the message.
Definition at line 3515 of file dbus-message.c. References dbus_int32_t. Referenced by dbus_message_append_args_valist(). |
|
Appends a 32 bit signed integer array to the message.
Definition at line 4133 of file dbus-message.c. References dbus_int32_t. |
|
Appends a 64 bit signed integer to the message. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 3547 of file dbus-message.c. References dbus_int64_t. Referenced by dbus_message_append_args_valist(). |
|
Appends a 64 bit signed integer array to the message. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 4171 of file dbus-message.c. References dbus_int64_t. |
|
Appends a nil value to the message.
Definition at line 3439 of file dbus-message.c. References DBusMessageRealIter, and FALSE. Referenced by dbus_message_append_args_valist(). |
|
Appends an object path to the message.
Definition at line 3626 of file dbus-message.c. References _dbus_marshal_string(), _dbus_string_set_length(), DBusMessageRealIter, and FALSE. Referenced by dbus_message_append_args_valist(). |
|
Appends an object path array to the message.
Definition at line 4273 of file dbus-message.c. References _dbus_marshal_string_array(), _dbus_string_set_length(), DBusMessageRealIter, FALSE, and NULL. Referenced by dbus_message_append_args_valist(). |
|
Appends a UTF-8 string to the message.
Definition at line 3595 of file dbus-message.c. References _dbus_marshal_string(), _dbus_string_set_length(), DBusMessageRealIter, and FALSE. Referenced by dbus_message_append_args_valist(), and dbus_message_new_error(). |
|
Appends a string array to the message.
Definition at line 4242 of file dbus-message.c. References _dbus_marshal_string_array(), _dbus_string_set_length(), DBusMessageRealIter, FALSE, and NULL. Referenced by dbus_message_append_args_valist(). |
|
Appends a 32 bit unsigned integer to the message.
Definition at line 3529 of file dbus-message.c. References dbus_uint32_t. Referenced by dbus_message_append_args_valist(). |
|
Appends a 32 bit unsigned integer array to the message.
Definition at line 4150 of file dbus-message.c. References dbus_uint32_t. |
|
Appends a 64 bit unsigned integer to the message. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 3563 of file dbus-message.c. References dbus_uint64_t. Referenced by dbus_message_append_args_valist(). |
|
Appends a 64 bit unsigned integer array to the message. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 4190 of file dbus-message.c. References dbus_uint64_t. |
|
Returns the argument type of the argument that the message iterator points at.
Definition at line 2341 of file dbus-message.c. References DBusMessageRealIter. Referenced by dbus_message_iter_get_args_valist(). |
|
Gets arguments from a message iterator given a variable argument list. The variable argument list should contain the type of the argumen followed by a pointer to where the value should be stored. The list is terminated with 0.
Definition at line 2121 of file dbus-message.c. References dbus_bool_t, dbus_message_iter_get_args_valist(), FALSE, and NULL. |
|
This function takes a va_list for use by language bindings. This function supports #DBUS_TYPE_INT64 and #DBUS_TYPE_UINT64 only if #DBUS_HAVE_INT64 is defined.
Definition at line 2572 of file dbus-message.c. References _dbus_type_to_string(), _dbus_warn(), dbus_bool_t, dbus_int32_t, dbus_int64_t, dbus_message_iter_get_arg_type(), dbus_message_iter_get_array_type(), dbus_message_iter_get_boolean(), dbus_message_iter_get_boolean_array(), dbus_message_iter_get_byte_array(), dbus_message_iter_get_custom(), dbus_message_iter_get_double_array(), dbus_message_iter_get_int32_array(), dbus_message_iter_get_int64_array(), dbus_message_iter_get_object_path(), dbus_message_iter_get_object_path_array(), dbus_message_iter_get_string(), dbus_message_iter_get_string_array(), dbus_message_iter_get_uint32_array(), dbus_message_iter_get_uint64_array(), dbus_message_iter_next(), dbus_set_error(), dbus_uint32_t, dbus_uint64_t, FALSE, and NULL. Referenced by dbus_message_get_args_valist(), and dbus_message_iter_get_args(). |
|
Returns the element type of the array that the message iterator points at. Note that you need to check that the iterator points to an array prior to using this function.
Definition at line 2414 of file dbus-message.c. References _dbus_assert, DBusMessageRealIter, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the boolean value that an iterator may point to. Note that you need to check that the iterator points to a boolean value before using this function.
Definition at line 2812 of file dbus-message.c. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the boolean array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function.
Definition at line 3076 of file dbus-message.c. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the byte value that an iterator may point to. Note that you need to check that the iterator points to a byte value before using this function.
Definition at line 2793 of file dbus-message.c. |
|
Returns the byte array that the iterator may point to. Note that you need to check that the iterator points to a byte array prior to using this function.
Definition at line 3057 of file dbus-message.c. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the name and data from a custom type that an iterator may point to. Note that you need to check that the iterator points to a custom type before using this function.
Definition at line 2495 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_byte_array(), _dbus_demarshal_string(), dbus_free(), DBusMessageRealIter, FALSE, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the key name fot the dict entry that an iterator may point to. Note that you need to check that the iterator points to a dict entry before using this function.
Definition at line 3275 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_string(), DBusMessageRealIter, and NULL. |
|
Returns the double value that an iterator may point to. Note that you need to check that the iterator points to a string value before using this function.
Definition at line 2915 of file dbus-message.c. |
|
Returns the double array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function.
Definition at line 3179 of file dbus-message.c. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the 32 bit signed integer value that an iterator may point to. Note that you need to check that the iterator points to a 32-bit integer value before using this function.
Definition at line 2831 of file dbus-message.c. References dbus_int32_t. |
|
Returns the 32 bit signed integer array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function.
Definition at line 3095 of file dbus-message.c. References dbus_int32_t. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the 64 bit signed integer value that an iterator may point to. Note that you need to check that the iterator points to a 64-bit integer value before using this function. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 2873 of file dbus-message.c. References dbus_int64_t. |
|
Returns the 64 bit signed integer array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 3137 of file dbus-message.c. References dbus_int64_t. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the object path value that an iterator may point to. Note that you need to check that the iterator points to an object path value before using this function.
Definition at line 2466 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_string(), DBusMessageRealIter, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the object path array that the iterator may point to. Note that you need to check that the iterator points to an object path array prior to using this function. The returned value is a NULL-terminated array of strings. Each string is a separate malloc block, and the array itself is a malloc block. You can free this type of array with dbus_free_string_array().
Definition at line 3242 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_string_array(), DBusMessageRealIter, FALSE, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the string value that an iterator may point to. Note that you need to check that the iterator points to a string value before using this function.
Definition at line 2442 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_string(), DBusMessageRealIter, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the string array that the iterator may point to. Note that you need to check that the iterator points to a string array prior to using this function. The returned value is a NULL-terminated array of strings. Each string is a separate malloc block, and the array itself is a malloc block. You can free this type of string array with dbus_free_string_array().
Definition at line 3203 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_string_array(), DBusMessageRealIter, FALSE, and NULL. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the 32 bit unsigned integer value that an iterator may point to. Note that you need to check that the iterator points to a 32-bit unsigned integer value before using this function.
Definition at line 2850 of file dbus-message.c. References dbus_int32_t. |
|
Returns the 32 bit unsigned integer array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function.
Definition at line 3114 of file dbus-message.c. References dbus_uint32_t. Referenced by dbus_message_iter_get_args_valist(). |
|
Returns the 64 bit unsigned integer value that an iterator may point to. Note that you need to check that the iterator points to a 64-bit unsigned integer value before using this function. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 2894 of file dbus-message.c. References dbus_uint64_t. |
|
Returns the 64 bit unsigned integer array that the iterator may point to. Note that you need to check that the iterator points to an array of the correct type prior to using this function. This function only exists if #DBUS_HAVE_INT64 is defined.
Definition at line 3158 of file dbus-message.c. References dbus_uint64_t. Referenced by dbus_message_iter_get_args_valist(). |
|
Checks if an iterator has any more fields.
Definition at line 2279 of file dbus-message.c. References _dbus_marshal_get_arg_end_pos(), DBusMessageRealIter, and FALSE. |
|
Initializes a DBusMessageIter representing the arguments of the message passed in.
Definition at line 2148 of file dbus-message.c. References _dbus_assert, _dbus_string_get_length(), DBusMessageRealIter::array_type_pos, body, DBusMessageRealIter::changed_stamp, changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter::container_start, DBusMessageRealIter, DBusMessageRealIter::end, FALSE, DBusMessageRealIter::message, NULL, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. Referenced by dbus_message_get_args_valist(). |
|
Initializes an iterator for the array that the iterator may point to. Note that you need to check that the iterator points to an array prior to using this function. The array element type is returned in array_type, and the array iterator can only be used to get that type of data.
Definition at line 2938 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_uint32(), DBusMessageRealIter::array_type_done, DBusMessageRealIter::array_type_pos, DBusMessageRealIter::changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter::container_start, dbus_uint32_t, DBusMessageRealIter, DBusMessageRealIter::end, FALSE, DBusMessageRealIter::message, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. |
|
Initializes an iterator for the dict that the iterator may point to. Note that you need to check that the iterator points to a dict prior to using this function.
Definition at line 2990 of file dbus-message.c. References _dbus_assert, _dbus_demarshal_uint32(), DBusMessageRealIter::changed_stamp, DBusMessageRealIter::container_length_pos, DBusMessageRealIter::container_start, dbus_uint32_t, DBusMessageRealIter, DBusMessageRealIter::end, FALSE, DBusMessageRealIter::message, DBusMessageRealIter::parent_iter, DBusMessageRealIter::pos, DBusMessageRealIter::type, and DBusMessageRealIter::wrote_dict_key. |
|
Moves the iterator to the next field.
Definition at line 2310 of file dbus-message.c. References _dbus_marshal_get_arg_end_pos(), DBusMessageRealIter, and FALSE. Referenced by dbus_message_iter_get_args_valist(). |
|
Constructs a new message of the given message type. Types include #DBUS_MESSAGE_TYPE_METHOD_CALL, #DBUS_MESSAGE_TYPE_SIGNAL, and so forth.
Definition at line 1383 of file dbus-message.c. References dbus_message_unref(), and NULL. |
|
Creates a new message that is an error reply to a certain message. Error replies are possible in response to method calls primarily.
Definition at line 1544 of file dbus-message.c. References dbus_message_append_iter_init(), dbus_message_get_serial(), dbus_message_iter_append_string(), dbus_message_set_no_reply(), dbus_message_set_reply_serial(), dbus_message_unref(), NULL, and TRUE. Referenced by dbus_connection_dispatch(), dbus_connection_send_with_reply(), and dbus_message_new_error_printf(). |
|
Creates a new message that is an error reply to a certain message. Error replies are possible in response to method calls primarily.
Definition at line 1609 of file dbus-message.c. References _dbus_string_append_printf_valist(), _dbus_string_free(), _dbus_string_get_const_data(), _dbus_string_init(), dbus_message_new_error(), and NULL. |
|
Constructs a new message to invoke a method on a remote object. Returns NULL if memory can't be allocated for the message. The service may be NULL in which case no service is set; this is appropriate when using D-BUS in a peer-to-peer context (no message bus). The interface may be NULL, which means that if multiple methods with the given name exist it is undefined which one will be invoked.
Definition at line 1422 of file dbus-message.c. References dbus_message_unref(), and NULL. Referenced by dbus_bus_acquire_service(), dbus_bus_activate_service(), dbus_bus_add_match(), dbus_bus_get_unix_user(), dbus_bus_register(), dbus_bus_remove_match(), dbus_bus_service_exists(), dbus_g_proxy_begin_call(), dbus_g_proxy_call_no_reply(), and dbus_g_proxy_new_for_service_owner(). |
|
Constructs a message that is a reply to a method call. Returns NULL if memory can't be allocated for the message.
Definition at line 1457 of file dbus-message.c. References dbus_message_get_serial(), dbus_message_set_no_reply(), dbus_message_set_reply_serial(), dbus_message_unref(), NULL, and TRUE. |
|
Constructs a new message representing a signal emission. Returns NULL if memory can't be allocated for the message. A signal is identified by its originating interface, and the name of the signal.
Definition at line 1507 of file dbus-message.c. References dbus_message_set_no_reply(), dbus_message_unref(), NULL, and TRUE. Referenced by _dbus_connection_new_for_transport(). |
|
Increments the reference count of a DBusMessage.
Definition at line 1714 of file dbus-message.c. References _dbus_assert, _dbus_atomic_inc(), dbus_int32_t, NULL, and refcount. Referenced by _dbus_pending_call_complete_and_unlock(), and dbus_message_get_g_type(). |
|
Sets a flag indicating that the addressed service will be auto-activated before the message is delivered. When this flag is set, the message is held until the service is succesfully activated or fail to activate. In case of failure, the reply will be an activation error.
Definition at line 4372 of file dbus-message.c. References _dbus_string_get_data_len(), dbus_bool_t, FLAGS_OFFSET, header, locked, and NULL. |
|
Sets the message's destination service.
Definition at line 1985 of file dbus-message.c. References FALSE, locked, and NULL. Referenced by dbus_g_proxy_send(). |
|
Sets the name of the error (DBUS_MESSAGE_TYPE_ERROR). The name is fully-qualified (namespaced).
Definition at line 1948 of file dbus-message.c. |
|
Sets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the interface a signal is being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL).
Definition at line 1869 of file dbus-message.c. References FALSE, locked, and NULL. Referenced by dbus_g_proxy_send(). |
|
Sets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE_SIGNAL). The interface name is fully-qualified (namespaced).
Definition at line 1909 of file dbus-message.c. |
|
Sets a flag indicating that the message does not want a reply; if this flag is set, the other end of the connection may (but is not required to) optimize by not sending method return or error replies. If this flag is set, there is no way to know whether the message successfully arrived at the remote end.
Definition at line 4326 of file dbus-message.c. References _dbus_string_get_data_len(), dbus_bool_t, FLAGS_OFFSET, header, locked, and NULL. Referenced by dbus_g_proxy_call_no_reply(), dbus_message_new_error(), dbus_message_new_method_return(), and dbus_message_new_signal(). |
|
Sets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the one a signal is being emitted from (for DBUS_MESSAGE_TYPE_SIGNAL).
Definition at line 1803 of file dbus-message.c. References FALSE, locked, and NULL. Referenced by dbus_g_proxy_send(). |
|
Sets the message sender.
Definition at line 4303 of file dbus-message.c. |
|
Decrements the reference count of a DBusMessage.
Definition at line 1745 of file dbus-message.c. References _dbus_assert, _dbus_atomic_dec(), _dbus_data_slot_list_free(), _dbus_list_clear(), _dbus_list_foreach(), _dbus_string_free(), body, dbus_free(), dbus_int32_t, header, NULL, refcount, size_counters, and slot_list. Referenced by _dbus_connection_message_sent(), _dbus_connection_new_for_transport(), _dbus_message_loader_unref(), dbus_bus_acquire_service(), dbus_bus_activate_service(), dbus_bus_add_match(), dbus_bus_get_unix_user(), dbus_bus_register(), dbus_bus_remove_match(), dbus_bus_service_exists(), dbus_connection_dispatch(), dbus_connection_send_with_reply(), dbus_connection_send_with_reply_and_block(), dbus_g_proxy_new_for_service_owner(), dbus_message_get_g_type(), dbus_message_new(), dbus_message_new_error(), dbus_message_new_method_call(), dbus_message_new_method_return(), dbus_message_new_signal(), dbus_pending_call_block(), and dbus_pending_call_unref(). |
|
Sets a DBusError based on the contents of the given message. The error is only set if the message is an error message, as in DBUS_MESSAGE_TYPE_ERROR. The name of the error is set to the name of the message, and the error message is set to the first argument if the argument exists and is a string. The return value indicates whether the error was set (the error is set if and only if the message is an error message). So you can check for an error reply and convert it to DBusError in one go.
Definition at line 4666 of file dbus-message.c. References dbus_free(), dbus_message_get_args(), dbus_message_get_error_name(), dbus_message_get_type(), dbus_set_error(), FALSE, and NULL. Referenced by dbus_bus_acquire_service(), dbus_bus_activate_service(), dbus_bus_get_unix_user(), dbus_bus_register(), dbus_connection_send_with_reply_and_block(), dbus_g_proxy_end_call(), and dbus_g_proxy_new_for_service_owner(). |