Data Structures | |
struct | HeaderFieldType |
struct | DBusTypeReaderClass |
Virtual table for a type reader. More... | |
struct | ReplacementBlock |
Defines | |
#define | FIELDS_ARRAY_SIGNATURE_OFFSET 6 |
Offset from start of _dbus_header_signature_str to the signature of the fields array. | |
#define | FIELDS_ARRAY_ELEMENT_SIGNATURE_OFFSET 7 |
Offset from start of _dbus_header_signature_str to the signature of an element of the fields array. | |
#define | BYTE_ORDER_OFFSET 0 |
Offset to byte order from start of header. | |
#define | TYPE_OFFSET 1 |
Offset to type from start of header. | |
#define | FLAGS_OFFSET 2 |
Offset to flags from start of header. | |
#define | VERSION_OFFSET 3 |
Offset to version from start of header. | |
#define | BODY_LENGTH_OFFSET 4 |
Offset to body length from start of header. | |
#define | SERIAL_OFFSET 8 |
Offset to client serial from start of header. | |
#define | FIELDS_ARRAY_LENGTH_OFFSET 12 |
Offset to fields array length from start of header. | |
#define | FIRST_FIELD_OFFSET 16 |
Offset to first field in header. | |
#define | EXPECTED_TYPE_OF_FIELD(field) (_dbus_header_field_types[field].type) |
Macro to look up the correct type for a field. | |
#define | MAX_POSSIBLE_HEADER_PADDING 7 |
The most padding we could ever need for a header. | |
#define | HEADER_END_BEFORE_PADDING(header) (_dbus_string_get_length (&(header)->data) - (header)->padding) |
Compute the end of the header, ignoring padding. | |
#define | RECURSIVE_MARSHAL_READ_TRACE 0 |
turn this on to get deluged in TypeReader verbose spam | |
#define | RECURSIVE_MARSHAL_WRITE_TRACE 0 |
turn this on to get deluged in TypeWriter verbose spam | |
#define | ARRAY_READER_LEN_POS(reader) ((reader)->u.array.start_pos - ((int)(reader)->array_len_offset) - 4) |
compute position of array length given array_len_offset, which is the offset back from start_pos to end of the len | |
#define | VALID_INITIAL_NAME_CHARACTER(c) |
Determine wether the given character is valid as the first character in a name. | |
#define | VALID_NAME_CHARACTER(c) |
Determine wether the given character is valid as a second or later character in a name. | |
#define | VALID_INITIAL_BUS_NAME_CHARACTER(c) |
Determine wether the given character is valid as the first character in a bus name. | |
#define | VALID_BUS_NAME_CHARACTER(c) |
Determine wether the given character is valid as a second or later character in a bus name. | |
Enumerations | |
enum | { MARSHAL_AS_STRING, MARSHAL_AS_SIGNATURE, MARSHAL_AS_BYTE_ARRAY } |
Functions | |
void | _dbus_pack_uint32 (dbus_uint32_t value, int byte_order, unsigned char *data) |
Packs a 32 bit unsigned integer into a data pointer. | |
void | _dbus_marshal_set_uint32 (DBusString *str, int pos, dbus_uint32_t value, int byte_order) |
Sets the 4 bytes at the given offset to a marshaled unsigned integer, replacing anything found there previously. | |
dbus_bool_t | _dbus_marshal_set_basic (DBusString *str, int pos, int type, const void *value, int byte_order, int *old_end_pos, int *new_end_pos) |
Sets an existing basic type value to a new value. | |
dbus_uint32_t | _dbus_marshal_read_uint32 (const DBusString *str, int pos, int byte_order, int *new_pos) |
Convenience function to demarshal a 32 bit unsigned integer. | |
void | _dbus_marshal_read_basic (const DBusString *str, int pos, int type, void *value, int byte_order, int *new_pos) |
Demarshals a basic-typed value. | |
void | _dbus_marshal_read_fixed_multi (const DBusString *str, int pos, int element_type, void *value, int n_elements, int byte_order, int *new_pos) |
Reads a block of fixed-length basic values, as an optimization vs. | |
dbus_bool_t | _dbus_marshal_write_basic (DBusString *str, int insert_at, int type, const void *value, int byte_order, int *pos_after) |
Marshals a basic-typed value. | |
void | _dbus_swap_array (unsigned char *data, int n_elements, int alignment) |
Swaps the elements of an array to the opposite byte order. | |
dbus_bool_t | _dbus_marshal_write_fixed_multi (DBusString *str, int insert_at, int element_type, const void *value, int n_elements, int byte_order, int *pos_after) |
Marshals a block of values of fixed-length type all at once, as an optimization. | |
void | _dbus_marshal_skip_basic (const DBusString *str, int type, int byte_order, int *pos) |
Skips over a basic-typed value, reporting the following position. | |
void | _dbus_marshal_skip_array (const DBusString *str, int element_type, int byte_order, int *pos) |
Skips an array, returning the next position. | |
int | _dbus_type_get_alignment (int typecode) |
Gets the alignment requirement for the given type; will be 1, 4, or 8. | |
dbus_bool_t | _dbus_type_is_valid (int typecode) |
Return TRUE if the typecode is a valid typecode. | |
const char * | _dbus_type_to_string (int typecode) |
Returns a string describing the given type. | |
void | _dbus_verbose_bytes (const unsigned char *data, int len, int offset) |
If in verbose mode, print a block of binary data. | |
void | _dbus_verbose_bytes_of_string (const DBusString *str, int start, int len) |
Dump the given part of the string to verbose log. | |
int | _dbus_first_type_in_signature (const DBusString *str, int pos) |
Get the first type in the signature. | |
int | _dbus_first_type_in_signature_c_str (const char *str, int pos) |
Similar to _dbus_first_type_in_signature, but operates on a C string buffer. | |
void | _dbus_marshal_byteswap (const DBusString *signature, int signature_start, int old_byte_order, int new_byte_order, DBusString *value_str, int value_pos) |
Byteswaps the marshaled data in the given value_str. | |
_DBUS_STRING_DEFINE_STATIC (_dbus_header_signature_str, DBUS_HEADER_SIGNATURE) | |
Static DBusString containing the signature of a message header. | |
_DBUS_STRING_DEFINE_STATIC (_dbus_local_interface_str, DBUS_INTERFACE_LOCAL) | |
Static DBusString containing the local interface. | |
_DBUS_STRING_DEFINE_STATIC (_dbus_local_path_str, DBUS_PATH_LOCAL) | |
Static DBusString containing the local path. | |
int | _dbus_header_get_message_type (DBusHeader *header) |
Gets the type of the message. | |
void | _dbus_header_set_serial (DBusHeader *header, dbus_uint32_t serial) |
Sets the serial number of a header. | |
dbus_uint32_t | _dbus_header_get_serial (DBusHeader *header) |
See dbus_message_get_serial(). | |
void | _dbus_header_reinit (DBusHeader *header, int byte_order) |
Re-initializes a header that was previously initialized and never freed. | |
dbus_bool_t | _dbus_header_init (DBusHeader *header, int byte_order) |
Initializes a header, but doesn't prepare it for use; to make the header valid, you have to call _dbus_header_create(). | |
void | _dbus_header_free (DBusHeader *header) |
Frees a header. | |
dbus_bool_t | _dbus_header_copy (const DBusHeader *header, DBusHeader *dest) |
Initializes dest with a copy of the given header. | |
dbus_bool_t | _dbus_header_create (DBusHeader *header, int message_type, const char *destination, const char *path, const char *interface, const char *member, const char *error_name) |
Fills in the primary fields of the header, so the header is ready for use. | |
dbus_bool_t | _dbus_header_have_message_untrusted (int max_message_length, DBusValidity *validity, int *byte_order, int *fields_array_len, int *header_len, int *body_len, const DBusString *str, int start, int len) |
Given data long enough to contain the length of the message body and the fields array, check whether the data is long enough to contain the entire message (assuming the claimed lengths are accurate). | |
dbus_bool_t | _dbus_header_load (DBusHeader *header, DBusValidationMode mode, DBusValidity *validity, int byte_order, int fields_array_len, int header_len, int body_len, const DBusString *str, int start, int len) |
Creates a message header from potentially-untrusted data. | |
void | _dbus_header_update_lengths (DBusHeader *header, int body_len) |
Fills in the correct body length. | |
dbus_bool_t | _dbus_header_set_field_basic (DBusHeader *header, int field, int type, const void *value) |
Sets the value of a field with basic type. | |
dbus_bool_t | _dbus_header_get_field_basic (DBusHeader *header, int field, int type, void *value) |
Gets the value of a field with basic type. | |
dbus_bool_t | _dbus_header_get_field_raw (DBusHeader *header, int field, const DBusString **str, int *pos) |
Gets the raw marshaled data for a field. | |
dbus_bool_t | _dbus_header_delete_field (DBusHeader *header, int field) |
Deletes a field, if it exists. | |
void | _dbus_header_toggle_flag (DBusHeader *header, dbus_uint32_t flag, dbus_bool_t value) |
Toggles a message flag bit, turning on the bit if value = TRUE and flipping it off if value = FALSE. | |
dbus_bool_t | _dbus_header_get_flag (DBusHeader *header, dbus_uint32_t flag) |
Gets a message flag bit, returning TRUE if the bit is set. | |
void | _dbus_header_byteswap (DBusHeader *header, int new_order) |
Swaps the header into the given order if required. | |
void | _dbus_type_signature_next (const char *type_str, int *type_pos) |
Skips to the next "complete" type inside a type signature. | |
void | _dbus_type_reader_init (DBusTypeReader *reader, int byte_order, const DBusString *type_str, int type_pos, const DBusString *value_str, int value_pos) |
Initializes a type reader. | |
void | _dbus_type_reader_init_from_mark (DBusTypeReader *reader, int byte_order, const DBusString *type_str, const DBusString *value_str, const DBusTypeMark *mark) |
Initializes a type reader that's been compressed into a DBusTypeMark. | |
void | _dbus_type_reader_init_types_only (DBusTypeReader *reader, const DBusString *type_str, int type_pos) |
Like _dbus_type_reader_init() but the iteration is over the signature, not over values. | |
void | _dbus_type_reader_init_types_only_from_mark (DBusTypeReader *reader, const DBusString *type_str, const DBusTypeMark *mark) |
Like _dbus_type_reader_init_from_mark() but only iterates over the signature, not the values. | |
void | _dbus_type_reader_save_mark (const DBusTypeReader *reader, DBusTypeMark *mark) |
Compresses a type reader into a DBusTypeMark, useful for example if you want to cache a bunch of positions in a block of values. | |
int | _dbus_type_reader_get_current_type (const DBusTypeReader *reader) |
Gets the type of the value the reader is currently pointing to; or for a types-only reader gets the type it's currently pointing to. | |
int | _dbus_type_reader_get_element_type (const DBusTypeReader *reader) |
Gets the type of an element of the array the reader is currently pointing to. | |
int | _dbus_type_reader_get_value_pos (const DBusTypeReader *reader) |
Gets the current position in the value block. | |
void | _dbus_type_reader_read_raw (const DBusTypeReader *reader, const unsigned char **value_location) |
Get the address of the marshaled value in the data being read. | |
void | _dbus_type_reader_read_basic (const DBusTypeReader *reader, void *value) |
Reads a basic-typed value, as with _dbus_marshal_read_basic(). | |
int | _dbus_type_reader_get_array_length (const DBusTypeReader *reader) |
Returns the number of values remaining in the current array reader. | |
void | _dbus_type_reader_read_fixed_multi (const DBusTypeReader *reader, void *value, int *n_elements) |
Reads a block of fixed-length basic values, from the current point in an array to the end of the array. | |
void | _dbus_type_reader_recurse (DBusTypeReader *reader, DBusTypeReader *sub) |
Initialize a new reader pointing to the first type and corresponding value that's a child of the current container. | |
dbus_bool_t | _dbus_type_reader_next (DBusTypeReader *reader) |
Skip to the next value on this "level". | |
dbus_bool_t | _dbus_type_reader_has_next (const DBusTypeReader *reader) |
Check whether there's another value on this "level". | |
void | _dbus_type_reader_get_signature (const DBusTypeReader *reader, const DBusString **str_p, int *start_p, int *len_p) |
Gets the string and range of said string containing the signature of the current value. | |
dbus_bool_t | _dbus_type_reader_set_basic (DBusTypeReader *reader, const void *value, const DBusTypeReader *realign_root) |
Sets a new value for the basic type value pointed to by the reader, leaving the reader valid to continue reading. | |
dbus_bool_t | _dbus_type_reader_delete (DBusTypeReader *reader, const DBusTypeReader *realign_root) |
Recursively deletes any value pointed to by the reader, leaving the reader valid to continue reading. | |
dbus_bool_t | _dbus_type_reader_greater_than (const DBusTypeReader *lhs, const DBusTypeReader *rhs) |
Compares two readers, which must be iterating over the same value data. | |
void | _dbus_type_writer_init (DBusTypeWriter *writer, int byte_order, DBusString *type_str, int type_pos, DBusString *value_str, int value_pos) |
Initialize a write iterator, which is used to write out values in serialized D-BUS format. | |
void | _dbus_type_writer_init_types_delayed (DBusTypeWriter *writer, int byte_order, DBusString *value_str, int value_pos) |
Initialize a write iterator, with the signature to be provided later. | |
void | _dbus_type_writer_add_types (DBusTypeWriter *writer, DBusString *type_str, int type_pos) |
Adds type string to the writer, if it had none. | |
void | _dbus_type_writer_remove_types (DBusTypeWriter *writer) |
Removes type string from the writer. | |
void | _dbus_type_writer_init_values_only (DBusTypeWriter *writer, int byte_order, const DBusString *type_str, int type_pos, DBusString *value_str, int value_pos) |
Like _dbus_type_writer_init(), except the type string passed in should correspond to an existing signature that matches what you're going to write out. | |
dbus_bool_t | _dbus_type_writer_recurse (DBusTypeWriter *writer, int container_type, const DBusString *contained_type, int contained_type_start, DBusTypeWriter *sub) |
Opens a new container and writes out the initial information for that container. | |
dbus_bool_t | _dbus_type_writer_append_array (DBusTypeWriter *writer, const DBusString *contained_type, int contained_type_start, DBusTypeWriter *sub) |
Append to an existing array. | |
dbus_bool_t | _dbus_type_writer_unrecurse (DBusTypeWriter *writer, DBusTypeWriter *sub) |
Closes a container created by _dbus_type_writer_recurse() and writes any additional information to the values block. | |
dbus_bool_t | _dbus_type_writer_write_basic (DBusTypeWriter *writer, int type, const void *value) |
Writes out a basic type. | |
dbus_bool_t | _dbus_type_writer_write_fixed_multi (DBusTypeWriter *writer, int element_type, const void *value, int n_elements) |
Writes a block of fixed-length basic values, i.e. | |
dbus_bool_t | _dbus_type_writer_write_reader_partial (DBusTypeWriter *writer, DBusTypeReader *reader, const DBusTypeReader *start_after, int start_after_new_pos, int start_after_new_len, DBusList **fixups) |
Iterate through all values in the given reader, writing a copy of each value to the writer. | |
dbus_bool_t | _dbus_type_writer_write_reader (DBusTypeWriter *writer, DBusTypeReader *reader) |
Iterate through all values in the given reader, writing a copy of each value to the writer. | |
void | _dbus_type_writer_set_enabled (DBusTypeWriter *writer, dbus_bool_t enabled) |
If disabled, a writer can still be iterated forward and recursed/unrecursed but won't write any values. | |
DBusValidity | _dbus_validate_signature_with_reason (const DBusString *type_str, int type_pos, int len) |
Verifies that the range of type_str from type_pos to type_end is a valid signature. | |
DBusValidity | _dbus_validate_body_with_reason (const DBusString *expected_signature, int expected_signature_start, int byte_order, int *bytes_remaining, const DBusString *value_str, int value_pos, int len) |
Verifies that the range of value_str from value_pos to value_end is a legitimate value of type expected_signature. | |
dbus_bool_t | _dbus_validate_path (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid object path name in the D-BUS protocol. | |
dbus_bool_t | _dbus_validate_interface (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid interface name in the D-BUS protocol. | |
dbus_bool_t | _dbus_validate_member (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid member name in the D-BUS protocol. | |
dbus_bool_t | _dbus_validate_error_name (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid error name in the D-BUS protocol. | |
dbus_bool_t | _dbus_validate_bus_name (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid bus name in the D-BUS protocol. | |
dbus_bool_t | _dbus_validate_signature (const DBusString *str, int start, int len) |
Checks that the given range of the string is a valid message type signature in the D-BUS protocol. | |
DEFINE_DBUS_NAME_CHECK (path) | |
define _dbus_check_is_valid_path() | |
DEFINE_DBUS_NAME_CHECK (interface) | |
define _dbus_check_is_valid_interface() | |
DEFINE_DBUS_NAME_CHECK (member) | |
define _dbus_check_is_valid_member() | |
DEFINE_DBUS_NAME_CHECK (error_name) | |
define _dbus_check_is_valid_error_name() | |
DEFINE_DBUS_NAME_CHECK (bus_name) | |
define _dbus_check_is_valid_bus_name() | |
DEFINE_DBUS_NAME_CHECK (signature) | |
define _dbus_check_is_valid_signature() |
Types and functions related to converting primitive data types from wire format to native machine format, and vice versa.
A signature is just a string with multiple types one after the other. for example a type is "i" or "(ii)", a signature is "i(ii)" where i is int and (ii) is struct { int; int; }
|
Value: ( ((c) >= '0' && (c) <= '9') || \ ((c) >= 'A' && (c) <= 'Z') || \ ((c) >= 'a' && (c) <= 'z') || \ ((c) == '_') || ((c) == '-'))
Definition at line 940 of file dbus-marshal-validate.c. Referenced by _dbus_validate_bus_name(). |
|
Value: ( ((c) >= 'A' && (c) <= 'Z') || \ ((c) >= 'a' && (c) <= 'z') || \ ((c) == '_') || ((c) == '-'))
Definition at line 931 of file dbus-marshal-validate.c. Referenced by _dbus_validate_bus_name(). |
|
Value: ( ((c) >= 'A' && (c) <= 'Z') || \ ((c) >= 'a' && (c) <= 'z') || \ ((c) == '_') )
Definition at line 685 of file dbus-marshal-validate.c. Referenced by _dbus_validate_interface(), and _dbus_validate_member(). |
|
Value: ( ((c) >= '0' && (c) <= '9') || \ ((c) >= 'A' && (c) <= 'Z') || \ ((c) >= 'a' && (c) <= 'z') || \ ((c) == '_') )
Definition at line 694 of file dbus-marshal-validate.c. Referenced by _dbus_validate_interface(), _dbus_validate_member(), and _dbus_validate_path(). |
|
Get the first type in the signature. The difference between this and just getting the first byte of the signature is that you won't get DBUS_STRUCT_BEGIN_CHAR, you'll get DBUS_TYPE_STRUCT instead.
Definition at line 1504 of file dbus-marshal-basic.c. Referenced by _dbus_type_reader_get_current_type(), _dbus_type_reader_get_element_type(), _dbus_type_reader_read_fixed_multi(), and _dbus_type_reader_recurse(). |
|
Similar to _dbus_first_type_in_signature, but operates on a C string buffer.
Definition at line 1519 of file dbus-marshal-basic.c. Referenced by dbus_signature_iter_get_current_type(), and dbus_signature_iter_get_element_type(). |
|
Swaps the header into the given order if required.
Definition at line 1462 of file dbus-marshal-header.c. References _dbus_marshal_byteswap(), DBusHeader::byte_order, and DBusHeader::data. |
|
Initializes dest with a copy of the given header. Resets the message serial to 0 on the copy.
Definition at line 477 of file dbus-marshal-header.c. References _dbus_header_set_serial(), _dbus_string_copy(), _dbus_string_free(), _dbus_string_init_preallocated(), DBusHeader::data, FALSE, and TRUE. Referenced by dbus_message_copy(). |
|
Fills in the primary fields of the header, so the header is ready for use. NULL may be specified for some or all of the fields to avoid adding those fields. Some combinations of fields don't make sense, and passing them in will trigger an assertion failure.
Definition at line 514 of file dbus-marshal-header.c. References _dbus_assert, _dbus_string_delete(), _dbus_type_writer_init_values_only(), _dbus_type_writer_recurse(), _dbus_type_writer_unrecurse(), _dbus_type_writer_write_basic(), DBusTypeWriter::byte_order, DBusHeader::data, FALSE, FIELDS_ARRAY_SIGNATURE_OFFSET, HEADER_END_BEFORE_PADDING, NULL, and TRUE. Referenced by dbus_message_new(), dbus_message_new_error(), dbus_message_new_method_call(), dbus_message_new_method_return(), and dbus_message_new_signal(). |
|
Deletes a field, if it exists.
Definition at line 1382 of file dbus-marshal-header.c. References _dbus_assert, _dbus_type_reader_delete(), FALSE, and TRUE. |
|
Frees a header.
Definition at line 463 of file dbus-marshal-header.c. References _dbus_string_free(), and DBusHeader::data. Referenced by dbus_message_copy(). |
|
Gets the value of a field with basic type. If the field doesn't exist, returns FALSE, otherwise returns TRUE.
Definition at line 1317 of file dbus-marshal-header.c. References _dbus_assert, _dbus_marshal_read_basic(), EXPECTED_TYPE_OF_FIELD, FALSE, NULL, and TRUE. Referenced by dbus_message_get_destination(), dbus_message_get_error_name(), dbus_message_get_interface(), dbus_message_get_member(), dbus_message_get_path(), dbus_message_get_reply_serial(), and dbus_message_get_sender(). |
|
Gets the raw marshaled data for a field. If the field doesn't exist, returns FALSE, otherwise returns TRUE. Returns the start of the marshaled data, i.e. usually the byte where the length starts (for strings and arrays) or for basic types just the value itself.
Definition at line 1358 of file dbus-marshal-header.c. |
|
Gets a message flag bit, returning TRUE if the bit is set.
Definition at line 1445 of file dbus-marshal-header.c. References DBusHeader::data, and FLAGS_OFFSET. Referenced by dbus_message_get_auto_start(), and dbus_message_get_no_reply(). |
|
Gets the type of the message.
Definition at line 368 of file dbus-marshal-header.c. References _dbus_assert, DBusHeader::data, and TYPE_OFFSET. Referenced by dbus_message_get_type(). |
|
See dbus_message_get_serial().
Definition at line 409 of file dbus-marshal-header.c. References _dbus_marshal_read_uint32(), DBusHeader::byte_order, DBusHeader::data, NULL, and SERIAL_OFFSET. Referenced by _dbus_header_set_serial(), and dbus_message_get_serial(). |
|
Given data long enough to contain the length of the message body and the fields array, check whether the data is long enough to contain the entire message (assuming the claimed lengths are accurate). Also checks that the lengths are in sanity parameters.
Definition at line 656 of file dbus-marshal-header.c. References _dbus_assert, _DBUS_INT32_MAX, _dbus_marshal_read_uint32(), BODY_LENGTH_OFFSET, BYTE_ORDER_OFFSET, FALSE, FIELDS_ARRAY_LENGTH_OFFSET, FIRST_FIELD_OFFSET, and NULL. Referenced by _dbus_message_loader_queue_messages(). |
|
Initializes a header, but doesn't prepare it for use; to make the header valid, you have to call _dbus_header_create().
Definition at line 446 of file dbus-marshal-header.c. References _dbus_header_reinit(), _dbus_string_init_preallocated(), DBusHeader::data, FALSE, and TRUE. |
|
Creates a message header from potentially-untrusted data. The return value is TRUE if there was enough memory and the data was valid. If it returns TRUE, the header will be created. If it returns FALSE and *validity == DBUS_VALIDITY_UNKNOWN_OOM_ERROR, then there wasn't enough memory. If it returns FALSE and *validity != DBUS_VALIDITY_UNKNOWN_OOM_ERROR then the data was invalid. The byte_order, fields_array_len, and body_len args should be from _dbus_header_have_message_untrusted(). Validation performed in _dbus_header_have_message_untrusted() is assumed to have been already done.
Definition at line 948 of file dbus-marshal-header.c. References _dbus_assert, _dbus_string_copy_len(), _dbus_string_set_length(), _dbus_string_validate_nul(), _dbus_type_reader_get_current_type(), _dbus_type_reader_get_value_pos(), _dbus_type_reader_init(), _dbus_type_reader_next(), _dbus_type_reader_read_basic(), _dbus_type_reader_recurse(), _dbus_validate_body_with_reason(), BODY_LENGTH_OFFSET, DBusHeader::byte_order, BYTE_ORDER_OFFSET, DBusHeader::data, FALSE, DBusHeader::fields, FIELDS_ARRAY_LENGTH_OFFSET, FIRST_FIELD_OFFSET, FLAGS_OFFSET, DBusHeader::padding, SERIAL_OFFSET, TRUE, TYPE_OFFSET, DBusHeaderField::value_pos, and VERSION_OFFSET. |
|
Re-initializes a header that was previously initialized and never freed. After this, to make the header valid you have to call _dbus_header_create().
Definition at line 426 of file dbus-marshal-header.c. References _dbus_string_set_length(), DBusHeader::byte_order, DBusHeader::data, and DBusHeader::padding. Referenced by _dbus_header_init(). |
|
Sets the value of a field with basic type. If the value is a string value, it isn't allowed to be NULL. If the field doesn't exist, it will be created.
Definition at line 1239 of file dbus-marshal-header.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_type_writer_append_array(), _dbus_type_writer_init_values_only(), _dbus_type_writer_unrecurse(), DBusTypeWriter::array, DBusTypeWriter::byte_order, FALSE, FIELDS_ARRAY_ELEMENT_SIGNATURE_OFFSET, FIELDS_ARRAY_LENGTH_OFFSET, FIELDS_ARRAY_SIGNATURE_OFFSET, FIRST_FIELD_OFFSET, HEADER_END_BEFORE_PADDING, TRUE, DBusTypeWriter::u, and DBusTypeWriter::value_pos. Referenced by dbus_message_set_reply_serial(). |
|
Sets the serial number of a header. This can only be done once on a header.
Definition at line 386 of file dbus-marshal-header.c. References _dbus_assert, _dbus_header_get_serial(), _dbus_marshal_set_uint32(), and SERIAL_OFFSET. Referenced by _dbus_header_copy(), and _dbus_message_set_serial(). |
|
Toggles a message flag bit, turning on the bit if value = TRUE and flipping it off if value = FALSE.
Definition at line 1423 of file dbus-marshal-header.c. References _dbus_string_get_data_len(), DBusHeader::data, and FLAGS_OFFSET. Referenced by dbus_message_set_auto_start(), and dbus_message_set_no_reply(). |
|
Fills in the correct body length.
Definition at line 1175 of file dbus-marshal-header.c. References _dbus_marshal_set_uint32(), BODY_LENGTH_OFFSET, DBusHeader::byte_order, and DBusHeader::data. Referenced by _dbus_message_lock(). |
|
Byteswaps the marshaled data in the given value_str.
Definition at line 220 of file dbus-marshal-byteswap.c. References _dbus_assert, _dbus_string_get_data_len(), _dbus_type_reader_init_types_only(), NULL, and TRUE. Referenced by _dbus_header_byteswap(). |
|
Demarshals a basic-typed value. The "value" pointer is always the address of a variable of the basic type. So e.g. if the basic type is "double" then the pointer is a double*, and if it's "char*" then the pointer is a "char**". A value of type DBusBasicValue is guaranteed to be large enough to hold any of the types that may be returned, which is handy if you are trying to do things generically. For example you can pass a DBusBasicValue* in to this function, and then pass the same DBusBasicValue* in to _dbus_marshal_basic_type() in order to move a value from one place to another.
Definition at line 503 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_marshal_read_uint32(), _dbus_type_to_string(), _dbus_warn(), DBusBasicValue::byt, dbus_type_is_basic(), DBusBasicValue::str, DBusBasicValue::u16, DBusBasicValue::u32, and DBusBasicValue::u64. Referenced by _dbus_header_get_field_basic(), and _dbus_type_reader_read_basic(). |
|
Reads a block of fixed-length basic values, as an optimization vs. reading each one individually into a new buffer. This function returns the data in-place; it does not make a copy, and it does not swap the bytes. If you ask for DBUS_TYPE_DOUBLE you will get a "const double*" back and the "value" argument should be a "const double**" and so on.
Definition at line 612 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_type_get_alignment(), _dbus_type_to_string(), dbus_type_is_basic(), and dbus_type_is_fixed(). |
|
Convenience function to demarshal a 32 bit unsigned integer.
Definition at line 465 of file dbus-marshal-basic.c. References _dbus_assert. Referenced by _dbus_header_get_serial(), _dbus_header_have_message_untrusted(), _dbus_marshal_read_basic(), _dbus_marshal_skip_array(), and _dbus_marshal_skip_basic(). |
|
Sets an existing basic type value to a new value. Arguments work the same way as _dbus_marshal_basic_type().
Definition at line 382 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_assert_not_reached, DBusBasicValue::byt, FALSE, NULL, DBusBasicValue::str, TRUE, DBusBasicValue::u16, and DBusBasicValue::u32. |
|
Sets the 4 bytes at the given offset to a marshaled unsigned integer, replacing anything found there previously.
Definition at line 265 of file dbus-marshal-basic.c. Referenced by _dbus_header_set_serial(), _dbus_header_update_lengths(), and _dbus_type_writer_unrecurse(). |
|
Skips an array, returning the next position.
Definition at line 1198 of file dbus-marshal-basic.c. References _dbus_marshal_read_uint32(), and _dbus_type_get_alignment(). |
|
Skips over a basic-typed value, reporting the following position.
Definition at line 1131 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_marshal_read_uint32(), _dbus_type_to_string(), and _dbus_warn(). |
|
Marshals a basic-typed value. The "value" pointer is always the address of a variable containing the basic type value. So for example for int32 it will be dbus_int32_t*, and for string it will be const char**. This is for symmetry with _dbus_marshal_read_basic() and to have a simple consistent rule.
Definition at line 844 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_string_insert_byte(), DBusBasicValue::byt, dbus_type_is_basic(), FALSE, NULL, DBusBasicValue::str, TRUE, DBusBasicValue::u16, and DBusBasicValue::u32. |
|
Marshals a block of values of fixed-length type all at once, as an optimization. dbus_type_is_fixed() returns TRUE for fixed-length types, which are the basic types minus the string-like types. The value argument should be the adddress of an array, so e.g. "const dbus_uint32_t**"
Definition at line 1073 of file dbus-marshal-basic.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_type_to_string(), dbus_type_is_fixed(), and FALSE. Referenced by _dbus_type_writer_write_fixed_multi(). |
|
Packs a 32 bit unsigned integer into a data pointer.
Definition at line 98 of file dbus-marshal-basic.c. |
|
Swaps the elements of an array to the opposite byte order.
Definition at line 937 of file dbus-marshal-basic.c. References _dbus_assert. |
|
Gets the alignment requirement for the given type; will be 1, 4, or 8.
Definition at line 1226 of file dbus-marshal-basic.c. References _dbus_assert_not_reached. Referenced by _dbus_marshal_read_fixed_multi(), _dbus_marshal_skip_array(), _dbus_type_reader_read_fixed_multi(), and dbus_message_iter_append_fixed_array(). |
|
Return TRUE if the typecode is a valid typecode. DBUS_TYPE_INVALID surprisingly enough is not considered valid, and random unknown bytes aren't either. This function is safe with untrusted data.
Definition at line 1274 of file dbus-marshal-basic.c. Referenced by _dbus_validate_signature_with_reason(), dbus_type_is_basic(), and dbus_type_is_container(). |
|
Recursively deletes any value pointed to by the reader, leaving the reader valid to continue reading. Any other readers will be invalidated. The provided realign_root is the reader to start from when realigning the data that follows the newly-set value. See _dbus_type_reader_set_basic() for more details on the realign_root paramter.
Definition at line 1513 of file dbus-marshal-recursive.c. References _dbus_assert, FALSE, DBusTypeReader::klass, and TRUE. Referenced by _dbus_header_delete_field(). |
|
Returns the number of values remaining in the current array reader.
Definition at line 995 of file dbus-marshal-recursive.c. References _dbus_assert, DBusTypeReader::klass, and DBusTypeReaderClass::types_only. Referenced by dbus_message_iter_get_array_len(). |
|
Gets the type of the value the reader is currently pointing to; or for a types-only reader gets the type it's currently pointing to. If the reader is at the end of a block or end of a container such as an array, returns DBUS_TYPE_INVALID.
Definition at line 881 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_first_type_in_signature(), _dbus_type_to_string(), DBusTypeReaderClass::check_finished, DBusTypeReader::finished, DBusTypeReader::klass, DBusTypeReader::type_pos, and DBusTypeReader::type_str. Referenced by _dbus_header_load(), _dbus_message_iter_get_args_valist(), _dbus_type_reader_get_element_type(), _dbus_type_reader_next(), _dbus_type_reader_read_basic(), _dbus_type_reader_set_basic(), dbus_message_iter_get_arg_type(), dbus_message_iter_get_fixed_array(), and dbus_message_iter_init(). |
|
Gets the type of an element of the array the reader is currently pointing to. It's an error to call this if _dbus_type_reader_get_current_type() doesn't return DBUS_TYPE_ARRAY for this reader.
Definition at line 916 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_first_type_in_signature(), and _dbus_type_reader_get_current_type(). Referenced by _dbus_message_iter_get_args_valist(), and dbus_message_iter_get_element_type(). |
|
Gets the string and range of said string containing the signature of the current value. Essentially a more complete version of _dbus_type_reader_get_current_type() (returns the full type rather than only the outside of the onion). Note though that the first byte in a struct signature is DBUS_STRUCT_BEGIN_CHAR while the current type will be DBUS_TYPE_STRUCT so it isn't true that the first byte of the signature is always the same as the current type. Another difference is that this function will still return a signature when inside an empty array; say you recurse into empty array of int32, the signature is "i" but the current type will always be DBUS_TYPE_INVALID since there are no elements to be currently pointing to.
Definition at line 1218 of file dbus-marshal-recursive.c. References DBusTypeReader::type_pos, and DBusTypeReader::type_str. Referenced by dbus_message_iter_get_signature(). |
|
Gets the current position in the value block.
Definition at line 933 of file dbus-marshal-recursive.c. References DBusTypeReader::value_pos. Referenced by _dbus_header_load(). |
|
Compares two readers, which must be iterating over the same value data. Returns TRUE if the first parameter is further along than the second parameter.
Definition at line 1548 of file dbus-marshal-recursive.c. References _dbus_assert, DBusTypeReader::value_pos, and DBusTypeReader::value_str. |
|
Check whether there's another value on this "level". e.g. the next field in a struct, the next value in an array. Returns FALSE at the end of the current container. You probably don't want to use this; it makes for an awkward for/while loop. A nicer one is "while ((current_type = get_current_type()) != INVALID)"
Definition at line 1187 of file dbus-marshal-recursive.c. References _dbus_type_reader_next(). Referenced by dbus_message_iter_has_next(). |
|
Initializes a type reader.
Definition at line 739 of file dbus-marshal-recursive.c. References DBusTypeReader::klass, DBusTypeReader::type_pos, DBusTypeReader::type_str, and DBusTypeReader::value_pos. Referenced by _dbus_header_load(), and dbus_message_iter_init(). |
|
Initializes a type reader that's been compressed into a DBusTypeMark. The args have to be the same as those passed in to create the original DBusTypeReader.
Definition at line 770 of file dbus-marshal-recursive.c. References DBusTypeMark::container_type, DBusTypeReaderClass::init_from_mark, DBusTypeReader::klass, DBusTypeMark::type_pos, DBusTypeReader::type_pos, DBusTypeMark::type_pos_in_value_str, DBusTypeReader::type_str, DBusTypeMark::value_pos, and DBusTypeReader::value_pos. |
|
Like _dbus_type_reader_init() but the iteration is over the signature, not over values.
Definition at line 802 of file dbus-marshal-recursive.c. References _DBUS_INT_MAX, DBusTypeReader::klass, DBusTypeReader::type_pos, and DBusTypeReader::type_str. Referenced by _dbus_marshal_byteswap(), and _dbus_validate_body_with_reason(). |
|
Like _dbus_type_reader_init_from_mark() but only iterates over the signature, not the values.
Definition at line 827 of file dbus-marshal-recursive.c. References _dbus_assert, _DBUS_INT_MAX, DBusTypeMark::container_type, DBusTypeReaderClass::init_from_mark, DBusTypeReader::klass, DBusTypeMark::type_pos, DBusTypeReader::type_pos, DBusTypeMark::type_pos_in_value_str, DBusTypeReader::type_str, and DBusTypeReaderClass::types_only. |
|
Skip to the next value on this "level". e.g. the next field in a struct, the next value in an array. Returns FALSE at the end of the current container.
Definition at line 1147 of file dbus-marshal-recursive.c. References _dbus_type_reader_get_current_type(), _dbus_type_to_string(), FALSE, DBusTypeReader::klass, DBusTypeReaderClass::next, DBusTypeReader::type_pos, DBusTypeReader::type_str, and DBusTypeReader::value_pos. Referenced by _dbus_header_load(), _dbus_message_iter_get_args_valist(), _dbus_type_reader_has_next(), and dbus_message_iter_next(). |
|
Reads a basic-typed value, as with _dbus_marshal_read_basic().
Definition at line 965 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_marshal_read_basic(), _dbus_type_reader_get_current_type(), DBusTypeReader::byte_order, DBusTypeReader::klass, DBusTypeReader::type_pos, DBusTypeReader::type_str, DBusTypeReaderClass::types_only, DBusTypeReader::value_pos, and DBusTypeReader::value_str. Referenced by _dbus_header_load(), _dbus_message_iter_get_args_valist(), and dbus_message_iter_get_basic(). |
|
Reads a block of fixed-length basic values, from the current point in an array to the end of the array. Does not work for arrays of string or container types. This function returns the array in-place; it does not make a copy, and it does not swap the bytes. If you ask for DBUS_TYPE_DOUBLE you will get a "const double*" back and the "value" argument should be a "const double**" and so on.
Definition at line 1019 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_first_type_in_signature(), _dbus_type_get_alignment(), DBusTypeReader::array, dbus_type_is_fixed(), DBusTypeReader::klass, DBusTypeReader::type_pos, DBusTypeReader::type_str, DBusTypeReaderClass::types_only, DBusTypeReader::u, DBusTypeReader::value_pos, and DBusTypeReader::value_str. Referenced by _dbus_message_iter_get_args_valist(), and dbus_message_iter_get_fixed_array(). |
|
Get the address of the marshaled value in the data being read. The address may not be aligned; you have to align it to the type of the value you want to read. Most of the demarshal routines do this for you.
Definition at line 948 of file dbus-marshal-recursive.c. References _dbus_assert, DBusTypeReader::klass, DBusTypeReaderClass::types_only, DBusTypeReader::value_pos, and DBusTypeReader::value_str. |
|
Initialize a new reader pointing to the first type and corresponding value that's a child of the current container. It's an error to call this if the current type is a non-container. Note that DBusTypeReader traverses values, not types. So if you have an empty array of array of int, you can't recurse into it. You can only recurse into each element.
Definition at line 1084 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_first_type_in_signature(), _dbus_type_to_string(), _dbus_warn(), DBusTypeReaderClass::id, DBusTypeReader::klass, DBusTypeReaderClass::recurse, DBusTypeReader::type_pos, DBusTypeReader::type_str, DBusTypeReaderClass::types_only, and DBusTypeReader::value_pos. Referenced by _dbus_header_load(), _dbus_message_iter_get_args_valist(), and dbus_message_iter_recurse(). |
|
Compresses a type reader into a DBusTypeMark, useful for example if you want to cache a bunch of positions in a block of values.
Definition at line 857 of file dbus-marshal-recursive.c. References _dbus_assert, DBusTypeReader::array, DBusTypeMark::array_len_offset, DBusTypeReader::array_len_offset, DBusTypeMark::array_start_pos, DBusTypeMark::container_type, DBusTypeReaderClass::id, DBusTypeReader::klass, DBusTypeMark::type_pos, DBusTypeReader::type_pos, DBusTypeMark::type_pos_in_value_str, DBusTypeReader::type_str, DBusTypeReader::u, DBusTypeMark::value_pos, DBusTypeReader::value_pos, and DBusTypeReader::value_str. |
|
Sets a new value for the basic type value pointed to by the reader, leaving the reader valid to continue reading. Any other readers will be invalidated if you set a variable-length type such as a string. The provided realign_root is the reader to start from when realigning the data that follows the newly-set value. The reader parameter must point to a value below the realign_root parameter. If the type being set is fixed-length, then realign_root may be NULL. Only values reachable from realign_root will be realigned, so if your string contains other values you will need to deal with those somehow yourself. It is OK if realign_root is the same reader as the reader parameter, though if you aren't setting the root it may not be such a good idea.
Definition at line 1456 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_type_reader_get_current_type(), _dbus_type_to_string(), _dbus_verbose_bytes_of_string(), dbus_type_is_basic(), dbus_type_is_fixed(), DBusTypeReader::klass, TRUE, DBusTypeReader::type_pos, DBusTypeReader::type_str, DBusTypeReaderClass::types_only, DBusTypeReader::value_pos, and DBusTypeReader::value_str. |
|
Skips to the next "complete" type inside a type signature. The signature is read starting at type_pos, and the next type position is stored in the same variable.
Definition at line 329 of file dbus-marshal-recursive.c. References _dbus_assert, NULL, and TRUE. Referenced by dbus_signature_iter_get_signature(), and dbus_signature_iter_next(). |
|
Returns a string describing the given type.
Definition at line 1308 of file dbus-marshal-basic.c. Referenced by _dbus_marshal_read_basic(), _dbus_marshal_read_fixed_multi(), _dbus_marshal_skip_basic(), _dbus_marshal_write_fixed_multi(), _dbus_message_iter_get_args_valist(), _dbus_type_reader_get_current_type(), _dbus_type_reader_next(), _dbus_type_reader_recurse(), _dbus_type_reader_set_basic(), _dbus_type_writer_unrecurse(), and dbus_message_append_args_valist(). |
|
Adds type string to the writer, if it had none.
Definition at line 1639 of file dbus-marshal-recursive.c. References DBusTypeWriter::type_pos, and DBusTypeWriter::type_str. |
|
Append to an existing array. Essentially, the writer will read an existing length at the write location; jump over that length; and write new fields. On unrecurse(), the existing length will be updated.
Definition at line 2219 of file dbus-marshal-recursive.c. References TRUE. Referenced by _dbus_header_set_field_basic(). |
|
Initialize a write iterator, which is used to write out values in serialized D-BUS format. The type_pos passed in is expected to be inside an already-valid, though potentially empty, type signature. This means that the byte after type_pos must be either DBUS_TYPE_INVALID (aka nul) or some other valid type. DBusTypeWriter won't enforce that the signature is already valid (you can append the nul byte at the end if you like), but just be aware that you need the nul byte eventually and DBusTypeWriter isn't going to write it for you.
Definition at line 1586 of file dbus-marshal-recursive.c. References DBusTypeWriter::byte_order, DBusTypeWriter::container_type, DBusTypeWriter::enabled, FALSE, TRUE, DBusTypeWriter::type_pos, DBusTypeWriter::type_pos_is_expectation, DBusTypeWriter::type_str, DBusTypeWriter::value_pos, and DBusTypeWriter::value_str. Referenced by _dbus_type_writer_init_types_delayed(), and _dbus_type_writer_init_values_only(). |
|
Initialize a write iterator, with the signature to be provided later.
Definition at line 1621 of file dbus-marshal-recursive.c. References _dbus_type_writer_init(). Referenced by dbus_message_iter_init_append(). |
|
Like _dbus_type_writer_init(), except the type string passed in should correspond to an existing signature that matches what you're going to write out. The writer will check what you write vs. this existing signature.
Definition at line 1677 of file dbus-marshal-recursive.c. References _dbus_type_writer_init(), TRUE, and DBusTypeWriter::type_pos_is_expectation. Referenced by _dbus_header_create(), and _dbus_header_set_field_basic(). |
|
Opens a new container and writes out the initial information for that container.
Definition at line 2185 of file dbus-marshal-recursive.c. References FALSE. Referenced by _dbus_header_create(), and dbus_message_iter_open_container(). |
|
Removes type string from the writer.
Definition at line 1656 of file dbus-marshal-recursive.c. References DBusTypeWriter::type_pos, and DBusTypeWriter::type_str. |
|
If disabled, a writer can still be iterated forward and recursed/unrecursed but won't write any values. Types will still be written unless the writer is a "values only" writer, because the writer needs access to a valid signature to be able to iterate.
Definition at line 2823 of file dbus-marshal-recursive.c. References DBusTypeWriter::enabled, and FALSE. Referenced by _dbus_type_writer_write_reader_partial(). |
|
Closes a container created by _dbus_type_writer_recurse() and writes any additional information to the values block.
Definition at line 2255 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_marshal_set_uint32(), _dbus_type_to_string(), DBusTypeWriter::array, DBusTypeWriter::byte_order, DBusTypeWriter::container_type, FALSE, TRUE, DBusTypeWriter::type_pos, DBusTypeWriter::type_pos_is_expectation, DBusTypeWriter::type_str, DBusTypeWriter::u, DBusTypeWriter::value_pos, and DBusTypeWriter::value_str. Referenced by _dbus_header_create(), _dbus_header_set_field_basic(), and dbus_message_iter_close_container(). |
|
Writes out a basic type.
Definition at line 2387 of file dbus-marshal-recursive.c. References _dbus_assert_not_reached, _dbus_string_alloc_space(), FALSE, TRUE, DBusTypeWriter::type_pos_is_expectation, and DBusTypeWriter::type_str. Referenced by _dbus_header_create(), and dbus_message_iter_append_basic(). |
|
Writes a block of fixed-length basic values, i.e. those that are both dbus_type_is_fixed() and _dbus_type_is_basic(). The block must be written inside an array. The value parameter should be the address of said array of values, so e.g. if it's an array of double, pass in "const double**"
Definition at line 2435 of file dbus-marshal-recursive.c. References _dbus_assert, _dbus_assert_not_reached, _dbus_marshal_write_fixed_multi(), DBusTypeWriter::container_type, dbus_type_is_fixed(), FALSE, TRUE, DBusTypeWriter::type_pos, DBusTypeWriter::type_pos_is_expectation, and DBusTypeWriter::value_pos. Referenced by dbus_message_iter_append_fixed_array(). |
|
Iterate through all values in the given reader, writing a copy of each value to the writer. The reader will be moved forward to its end position.
Definition at line 2807 of file dbus-marshal-recursive.c. References _dbus_type_writer_write_reader_partial(). |
|
Iterate through all values in the given reader, writing a copy of each value to the writer. The reader will be moved forward to its end position. If a reader start_after is provided, it should be a reader for the same data as the reader to be written. Only values occurring after the value pointed to by start_after will be written to the writer. If start_after is provided, then the copy of the reader will be partial. This means that array lengths will not have been copied. The assumption is that you wrote a new version of the value at start_after to the writer. You have to pass in the start position and length of the new value. (If you are deleting the value at start_after, pass in 0 for the length.) If the fixups parameter is non-NULL, then any array length that was read but not written due to start_after will be provided as a DBusArrayLenFixup. The fixup contains the position of the array length in the source data, and the correct array length assuming you combine the source data before start_after with the written data at start_after and beyond.
Definition at line 2753 of file dbus-marshal-recursive.c. References _dbus_string_delete(), _dbus_type_writer_set_enabled(), DBusTypeWriter::enabled, FALSE, TRUE, DBusTypeWriter::type_pos, DBusTypeWriter::type_str, DBusTypeWriter::value_pos, and DBusTypeWriter::value_str. Referenced by _dbus_type_writer_write_reader(). |
|
Verifies that the range of value_str from value_pos to value_end is a legitimate value of type expected_signature. If this function returns TRUE, it will be safe to iterate over the values with DBusTypeReader. The signature is assumed to be already valid. If bytes_remaining is not NULL, then leftover bytes will be stored there and DBUS_VALID returned. If it is NULL, then DBUS_INVALID_TOO_MUCH_DATA will be returned if bytes are left over.
Definition at line 635 of file dbus-marshal-validate.c. References _dbus_assert, _dbus_type_reader_init_types_only(), and TRUE. Referenced by _dbus_header_load(). |
|
Checks that the given range of the string is a valid bus name in the D-BUS protocol. This includes a length restriction, etc., see the specification.
Definition at line 960 of file dbus-marshal-validate.c. References _dbus_assert, FALSE, NULL, TRUE, VALID_BUS_NAME_CHARACTER, and VALID_INITIAL_BUS_NAME_CHARACTER. |
|
Checks that the given range of the string is a valid error name in the D-BUS protocol. This includes a length restriction, etc., see the specification.
Definition at line 919 of file dbus-marshal-validate.c. References _dbus_validate_interface(). |
|
Checks that the given range of the string is a valid interface name in the D-BUS protocol. This includes a length restriction and an ASCII subset, see the specification.
Definition at line 782 of file dbus-marshal-validate.c. References _dbus_assert, FALSE, NULL, TRUE, VALID_INITIAL_NAME_CHARACTER, and VALID_NAME_CHARACTER. Referenced by _dbus_validate_error_name(). |
|
Checks that the given range of the string is a valid member name in the D-BUS protocol. This includes a length restriction, etc., see the specification.
Definition at line 858 of file dbus-marshal-validate.c. References _dbus_assert, FALSE, TRUE, VALID_INITIAL_NAME_CHARACTER, and VALID_NAME_CHARACTER. |
|
Checks that the given range of the string is a valid object path name in the D-BUS protocol. Part of the validation ensures that the object path contains only ASCII.
Definition at line 717 of file dbus-marshal-validate.c. References _dbus_assert, FALSE, TRUE, and VALID_NAME_CHARACTER. |
|
Checks that the given range of the string is a valid message type signature in the D-BUS protocol.
Definition at line 1059 of file dbus-marshal-validate.c. References _dbus_assert, _dbus_validate_signature_with_reason(), and FALSE. Referenced by dbus_signature_validate(). |
|
Verifies that the range of type_str from type_pos to type_end is a valid signature. If this function returns TRUE, it will be safe to iterate over the signature with a types-only DBusTypeReader. The range passed in should NOT include the terminating nul/DBUS_TYPE_INVALID.
Definition at line 54 of file dbus-marshal-validate.c. References _dbus_assert, _DBUS_INT32_MAX, _DBUS_INT_TO_POINTER, _dbus_list_append(), _dbus_list_clear(), _dbus_list_pop_last(), _DBUS_POINTER_TO_INT, _dbus_type_is_valid(), dbus_type_is_basic(), and NULL. Referenced by _dbus_validate_signature(). |
|
If in verbose mode, print a block of binary data.
Definition at line 1365 of file dbus-marshal-basic.c. References _dbus_assert. Referenced by _dbus_verbose_bytes_of_string(). |
|
Dump the given part of the string to verbose log.
Definition at line 1448 of file dbus-marshal-basic.c. References _dbus_assert, and _dbus_verbose_bytes(). Referenced by _dbus_message_test(), _dbus_read(), _dbus_type_reader_set_basic(), and _dbus_write(). |