25#include "dbus-internals.h"
26#include "dbus-marshal-validate.h"
27#include "dbus-marshal-recursive.h"
28#include "dbus-marshal-basic.h"
29#include "dbus-signature.h"
30#include "dbus-string.h"
55 const unsigned char *p;
56 const unsigned char *end;
69 element_count_stack =
NULL;
84 result = DBUS_INVALID_SIGNATURE_TOO_LONG;
88 p = _dbus_string_get_const_udata_len (type_str, type_pos, 0);
90 end = _dbus_string_get_const_udata_len (type_str, type_pos + len, 0);
100 _dbus_assert (opened_brackets[struct_depth + dict_entry_depth] ==
'\0');
124 result = DBUS_INVALID_EXCEEDED_MAXIMUM_ARRAY_RECURSION;
134 result = DBUS_INVALID_EXCEEDED_MAXIMUM_STRUCT_RECURSION;
147 _dbus_assert (opened_brackets[struct_depth + dict_entry_depth - 1] ==
'\0');
152 if (struct_depth == 0)
154 result = DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED;
160 result = DBUS_INVALID_STRUCT_HAS_NO_FIELDS;
166 last_bracket = opened_brackets[struct_depth + dict_entry_depth - 1];
170 result = DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED;
177 opened_brackets[struct_depth + dict_entry_depth] =
'\0';
183 result = DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY;
187 dict_entry_depth += 1;
191 result = DBUS_INVALID_EXCEEDED_MAXIMUM_DICT_ENTRY_RECURSION;
204 _dbus_assert (opened_brackets[struct_depth + dict_entry_depth - 1] ==
'\0');
209 if (dict_entry_depth == 0)
211 result = DBUS_INVALID_DICT_ENTRY_ENDED_BUT_NOT_STARTED;
217 last_bracket = opened_brackets[struct_depth + dict_entry_depth - 1];
221 result = DBUS_INVALID_DICT_ENTRY_ENDED_BUT_NOT_STARTED;
225 dict_entry_depth -= 1;
226 opened_brackets[struct_depth + dict_entry_depth] =
'\0';
231 if (element_count != 2)
233 if (element_count == 0)
234 result = DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS;
235 else if (element_count == 1)
236 result = DBUS_INVALID_DICT_ENTRY_HAS_ONLY_ONE_FIELD;
238 result = DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS;
247 result = DBUS_INVALID_UNKNOWN_TYPECODE;
272 const unsigned char *p1;
277 result = DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE;
291 result = DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE;
303 result = DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE;
307 if (struct_depth > 0)
309 result = DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED;
313 if (dict_entry_depth > 0)
315 result = DBUS_INVALID_DICT_ENTRY_STARTED_BUT_NOT_ENDED;
338 const unsigned char *p,
339 const unsigned char *end,
340 const unsigned char **new_p)
351 return DBUS_INVALID_NESTED_TOO_DEEPLY;
356 const unsigned char *a;
360 _dbus_verbose (
" validating value of type %s type reader %p type_pos %d p %p end %p %d remain\n",
367 return DBUS_INVALID_NOT_ENOUGH_DATA;
369 switch (current_type)
385 a = _DBUS_ALIGN_ADDRESS (p, alignment);
387 return DBUS_INVALID_NOT_ENOUGH_DATA;
391 return DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL;
400 return DBUS_INVALID_NOT_ENOUGH_DATA;
404 if (!(v == 0 || v == 1))
405 return DBUS_INVALID_BOOLEAN_NOT_ZERO_OR_ONE;
415 dbus_uint32_t claimed_len;
417 a = _DBUS_ALIGN_ADDRESS (p, 4);
419 return DBUS_INVALID_NOT_ENOUGH_DATA;
423 return DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL;
439 return DBUS_INVALID_UNKNOWN_TYPECODE;
444 a = _DBUS_ALIGN_ADDRESS (p, alignment);
448 return DBUS_INVALID_NOT_ENOUGH_DATA;
453 return DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL;
458 if (claimed_len > (
unsigned long) (end - p))
459 return DBUS_INVALID_LENGTH_OUT_OF_BOUNDS;
466 _dbus_string_get_length (&str)))
467 return DBUS_INVALID_BAD_PATH;
476 _dbus_string_get_length (&str)))
477 return DBUS_INVALID_BAD_UTF8_IN_STRING;
485 const unsigned char *array_end;
489 return DBUS_INVALID_ARRAY_LENGTH_EXCEEDS_MAXIMUM;
497 array_end = p + claimed_len;
510 alignment == 4 || alignment == 8);
515 if ((claimed_len & (alignment - 1)) != 0)
516 return DBUS_INVALID_ARRAY_LENGTH_INCORRECT;
525 while (p < array_end)
529 if (!(v == 0 || v == 1))
530 return DBUS_INVALID_BOOLEAN_NOT_ZERO_OR_ONE;
544 while (p < array_end)
546 validity = validate_body_helper (&sub, byte_order,
FALSE,
555 return DBUS_INVALID_ARRAY_LENGTH_INCORRECT;
562 return DBUS_INVALID_NOT_ENOUGH_DATA;
565 return DBUS_INVALID_STRING_MISSING_NUL;
573 dbus_uint32_t claimed_len;
581 if (claimed_len + 1 > (
unsigned long) (end - p))
582 return DBUS_INVALID_SIGNATURE_LENGTH_OUT_OF_BOUNDS;
587 _dbus_string_get_length (&str));
596 return DBUS_INVALID_SIGNATURE_MISSING_NUL;
600 _dbus_verbose (
"p = %p end = %p claimed_len %u\n", p, end, claimed_len);
613 dbus_uint32_t claimed_len;
617 int contained_alignment;
625 if (claimed_len + 1 > (
unsigned long) (end - p))
626 return DBUS_INVALID_VARIANT_SIGNATURE_LENGTH_OUT_OF_BOUNDS;
630 _dbus_string_get_length (&sig));
636 return DBUS_INVALID_VARIANT_SIGNATURE_BAD;
642 return DBUS_INVALID_VARIANT_SIGNATURE_MISSING_NUL;
647 return DBUS_INVALID_VARIANT_SIGNATURE_EMPTY;
651 a = _DBUS_ALIGN_ADDRESS (p, contained_alignment);
653 return DBUS_INVALID_NOT_ENOUGH_DATA;
657 return DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL;
665 validity = validate_body_helper (&sub, byte_order,
FALSE,
672 return DBUS_INVALID_VARIANT_SIGNATURE_SPECIFIES_MULTIPLE_VALUES;
684 a = _DBUS_ALIGN_ADDRESS (p, 8);
686 return DBUS_INVALID_NOT_ENOUGH_DATA;
690 return DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL;
696 validity = validate_body_helper (&sub, byte_order,
TRUE,
710 _dbus_verbose (
" validated value of type %s type reader %p type_pos %d p %p end %p %d remain\n",
717 _dbus_verbose (
"not enough data!!! p = %p end = %p end-p = %d\n",
718 p, end, (
int) (end - p));
719 return DBUS_INVALID_NOT_ENOUGH_DATA;
722 if (walk_reader_to_end)
756 int expected_signature_start,
758 int *bytes_remaining,
764 const unsigned char *p;
765 const unsigned char *end;
770 _dbus_assert (value_pos <= _dbus_string_get_length (value_str) - len);
772 _dbus_verbose (
"validating body from pos %d len %d sig '%s'\n",
773 value_pos, len, _dbus_string_get_const_data_len (expected_signature,
774 expected_signature_start,
778 expected_signature, expected_signature_start);
780 p = _dbus_string_get_const_udata_len (value_str, value_pos, len);
783 validity = validate_body_helper (&reader, byte_order,
TRUE, 0, p, end, &p);
789 *bytes_remaining = end - p;
805#define VALID_INITIAL_NAME_CHARACTER(c) \
806 ( ((c) >= 'A' && (c) <= 'Z') || \
807 ((c) >= 'a' && (c) <= 'z') || \
814#define VALID_NAME_CHARACTER(c) \
815 ( ((c) >= '0' && (c) <= '9') || \
816 ((c) >= 'A' && (c) <= 'Z') || \
817 ((c) >= 'a' && (c) <= 'z') || \
841 const unsigned char *s;
842 const unsigned char *end;
843 const unsigned char *last_slash;
849 if (len > _dbus_string_get_length (str) - start)
855 s = _dbus_string_get_const_udata (str) + start;
867 if ((s - last_slash) < 2)
881 if ((end - last_slash) < 2 &&
894 case DBUS_INVALID_FOR_UNKNOWN_REASON:
return "Unknown reason";
895 case DBUS_VALID_BUT_INCOMPLETE:
return "Valid but incomplete";
896 case DBUS_VALIDITY_UNKNOWN:
return "Validity unknown";
898 case DBUS_INVALID_UNKNOWN_TYPECODE:
return "Unknown typecode";
899 case DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE:
return "Missing array element type";
900 case DBUS_INVALID_SIGNATURE_TOO_LONG:
return "Signature is too long";
901 case DBUS_INVALID_EXCEEDED_MAXIMUM_ARRAY_RECURSION:
return "Exceeded maximum array recursion";
902 case DBUS_INVALID_EXCEEDED_MAXIMUM_STRUCT_RECURSION:
return "Exceeded maximum struct recursion";
903 case DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED:
return "Struct ended but not started";
904 case DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED:
return "Struct started but not ended";
905 case DBUS_INVALID_STRUCT_HAS_NO_FIELDS:
return "Struct has no fields";
906 case DBUS_INVALID_ALIGNMENT_PADDING_NOT_NUL:
return "Alignment padding not null";
907 case DBUS_INVALID_BOOLEAN_NOT_ZERO_OR_ONE:
return "Boolean is not zero or one";
908 case DBUS_INVALID_NOT_ENOUGH_DATA:
return "Not enough data";
910 case DBUS_INVALID_BAD_BYTE_ORDER:
return "Bad byte order";
911 case DBUS_INVALID_BAD_PROTOCOL_VERSION:
return "Bad protocol version";
912 case DBUS_INVALID_BAD_MESSAGE_TYPE:
return "Bad message type";
913 case DBUS_INVALID_BAD_SERIAL:
return "Bad serial";
914 case DBUS_INVALID_INSANE_FIELDS_ARRAY_LENGTH:
return "Insane fields array length";
915 case DBUS_INVALID_INSANE_BODY_LENGTH:
return "Insane body length";
916 case DBUS_INVALID_MESSAGE_TOO_LONG:
return "Message too long";
917 case DBUS_INVALID_HEADER_FIELD_CODE:
return "Header field code";
918 case DBUS_INVALID_HEADER_FIELD_HAS_WRONG_TYPE:
return "Header field has wrong type";
919 case DBUS_INVALID_USES_LOCAL_INTERFACE:
return "Uses local interface";
920 case DBUS_INVALID_USES_LOCAL_PATH:
return "Uses local path";
921 case DBUS_INVALID_HEADER_FIELD_APPEARS_TWICE:
return "Header field appears twice";
922 case DBUS_INVALID_BAD_DESTINATION:
return "Bad destination";
923 case DBUS_INVALID_BAD_INTERFACE:
return "Bad interface";
924 case DBUS_INVALID_BAD_MEMBER:
return "Bad member";
925 case DBUS_INVALID_BAD_ERROR_NAME:
return "Bad error name";
926 case DBUS_INVALID_BAD_SENDER:
return "Bad sender";
927 case DBUS_INVALID_MISSING_PATH:
return "Missing path";
928 case DBUS_INVALID_MISSING_INTERFACE:
return "Missing interface";
929 case DBUS_INVALID_MISSING_MEMBER:
return "Missing member";
930 case DBUS_INVALID_MISSING_ERROR_NAME:
return "Missing error name";
931 case DBUS_INVALID_MISSING_REPLY_SERIAL:
return "Missing reply serial";
932 case DBUS_INVALID_LENGTH_OUT_OF_BOUNDS:
return "Length out of bounds";
933 case DBUS_INVALID_ARRAY_LENGTH_EXCEEDS_MAXIMUM:
return "Array length exceeds maximum";
934 case DBUS_INVALID_BAD_PATH:
return "Bad path";
935 case DBUS_INVALID_SIGNATURE_LENGTH_OUT_OF_BOUNDS:
return "Signature length out of bounds";
936 case DBUS_INVALID_BAD_UTF8_IN_STRING:
return "Bad utf8 in string";
937 case DBUS_INVALID_ARRAY_LENGTH_INCORRECT:
return "Array length incorrect";
938 case DBUS_INVALID_VARIANT_SIGNATURE_LENGTH_OUT_OF_BOUNDS:
return "Variant signature length out of bounds";
939 case DBUS_INVALID_VARIANT_SIGNATURE_BAD:
return "Variant signature bad";
940 case DBUS_INVALID_VARIANT_SIGNATURE_EMPTY:
return "Variant signature empty";
941 case DBUS_INVALID_VARIANT_SIGNATURE_SPECIFIES_MULTIPLE_VALUES:
return "Variant signature specifies multiple values";
942 case DBUS_INVALID_VARIANT_SIGNATURE_MISSING_NUL:
return "Variant signature missing nul";
943 case DBUS_INVALID_STRING_MISSING_NUL:
return "String missing nul";
944 case DBUS_INVALID_SIGNATURE_MISSING_NUL:
return "Signature missing nul";
945 case DBUS_INVALID_EXCEEDED_MAXIMUM_DICT_ENTRY_RECURSION:
return "Exceeded maximum dict entry recursion";
946 case DBUS_INVALID_DICT_ENTRY_ENDED_BUT_NOT_STARTED:
return "Dict entry ended but not started";
947 case DBUS_INVALID_DICT_ENTRY_STARTED_BUT_NOT_ENDED:
return "Dict entry started but not ended";
948 case DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS:
return "Dict entry has no fields";
949 case DBUS_INVALID_DICT_ENTRY_HAS_ONLY_ONE_FIELD:
return "Dict entry has only one field";
950 case DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS:
return "Dict entry has too many fields";
951 case DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY:
return "Dict entry not inside array";
952 case DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE:
return "Dict key must be basic type";
953 case DBUS_INVALID_MISSING_UNIX_FDS:
return "Unix file descriptor missing";
954 case DBUS_INVALID_NESTED_TOO_DEEPLY:
return "Variants cannot be used to create a hugely recursive tree of values";
955 case DBUS_VALIDITY_LAST:
979 const unsigned char *s;
980 const unsigned char *end;
981 const unsigned char *iface;
982 const unsigned char *last_dot;
988 if (len > _dbus_string_get_length (str) - start)
998 iface = _dbus_string_get_const_udata (str) + start;
1005 if (_DBUS_UNLIKELY (*s ==
'.'))
1016 if (_DBUS_UNLIKELY ((s + 1) == end))
1031 if (_DBUS_UNLIKELY (last_dot ==
NULL))
1055 const unsigned char *s;
1056 const unsigned char *end;
1057 const unsigned char *member;
1063 if (len > _dbus_string_get_length (str) - start)
1072 member = _dbus_string_get_const_udata (str) + start;
1124#define VALID_INITIAL_BUS_NAME_CHARACTER(c) \
1125 ( ((c) >= 'A' && (c) <= 'Z') || \
1126 ((c) >= 'a' && (c) <= 'z') || \
1127 ((c) == '_') || ((c) == '-'))
1133#define VALID_BUS_NAME_CHARACTER(c) \
1134 ( ((c) >= '0' && (c) <= '9') || \
1135 ((c) >= 'A' && (c) <= 'Z') || \
1136 ((c) >= 'a' && (c) <= 'z') || \
1137 ((c) == '_') || ((c) == '-'))
1140_dbus_validate_bus_name_full (
const DBusString *str,
1145 const unsigned char *s;
1146 const unsigned char *end;
1147 const unsigned char *iface;
1148 const unsigned char *last_dot;
1154 if (len > _dbus_string_get_length (str) - start)
1164 iface = _dbus_string_get_const_udata (str) + start;
1179 if (_DBUS_UNLIKELY ((s + 1) == end))
1195 else if (_DBUS_UNLIKELY (*s ==
'.'))
1206 if (_DBUS_UNLIKELY ((s + 1) == end))
1221 if (!is_namespace && _DBUS_UNLIKELY (last_dot ==
NULL))
1245 return _dbus_validate_bus_name_full (str, start, len,
FALSE);
1266 return _dbus_validate_bus_name_full (str, start, len,
TRUE);
#define _DBUS_INT_TO_POINTER(integer)
Safely stuffs an integer into a pointer, to be extracted later with _DBUS_POINTER_TO_INT.
#define _dbus_assert_not_reached(explanation)
Aborts with an error message if called.
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
#define _DBUS_POINTER_TO_INT(pointer)
Safely casts a void* to an integer; should only be used on void* that actually contain integers,...
#define _DBUS_N_ELEMENTS(array)
Computes the number of elements in a fixed-size array using sizeof().
#define _DBUS_INT32_MAX
Maximum value of type "int32".
void * _dbus_list_pop_last(DBusList **list)
Removes the last value in the list and returns it.
void _dbus_list_clear(DBusList **list)
Frees all links in the list and sets the list head to NULL.
dbus_bool_t _dbus_list_append(DBusList **list, void *data)
Appends a value to the list.
#define NULL
A null pointer, defined appropriately for C or C++.
#define TRUE
Expands to "1".
#define FALSE
Expands to "0".
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 curr...
DBusValidity
This is primarily used in unit testing, so we can verify that each invalid message is invalid for the...
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.
#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.
int _dbus_type_get_alignment(int typecode)
Gets the alignment requirement for the given type; will be 1, 4, or 8.
#define DEFINE_DBUS_NAME_CHECK(what)
Define a name check to be used in _dbus_return_if_fail() statements.
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.
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_uint32_t _dbus_unpack_uint32(int byte_order, const unsigned char *data)
Unpacks a 32 bit unsigned integer from a data pointer.
int _dbus_first_type_in_signature(const DBusString *str, int pos)
Get the first type in the signature.
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.
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_type_reader_next(DBusTypeReader *reader)
Skip to the next value on this "level".
dbus_bool_t _dbus_validate_bus_namespace(const DBusString *str, int start, int len)
Checks that the given range of the string is a prefix of a valid bus name in the D-Bus protocol.
#define VALID_INITIAL_NAME_CHARACTER(c)
Determine wether the given character is valid as the first character in a name.
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.
const char * _dbus_type_to_string(int typecode)
Returns a string describing the given type.
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 expect...
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 t...
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_VALIDITY_UNKNOWN_OOM_ERROR
can't determine validity due to OOM
@ DBUS_INVALID_TOO_MUCH_DATA
trailing junk makes it invalid
@ DBUS_VALID
the data is valid
#define DBUS_TYPE_SIGNATURE
Type code marking a D-Bus type signature.
#define DBUS_MAXIMUM_SIGNATURE_LENGTH
This one is 255 so it fits in a byte.
#define DBUS_DICT_ENTRY_END_CHAR
Code marking the end of a dict entry type in a type signature.
#define DBUS_TYPE_OBJECT_PATH
Type code marking a D-Bus object path.
#define DBUS_TYPE_BYTE
Type code marking an 8-bit unsigned integer.
#define DBUS_TYPE_INT16
Type code marking a 16-bit signed integer.
#define DBUS_TYPE_VARIANT
Type code marking a D-Bus variant type.
#define DBUS_MAXIMUM_ARRAY_LENGTH
Max length of a marshaled array in bytes (64M, 2^26) We use signed int for lengths so must be INT_MAX...
#define DBUS_TYPE_INT32
Type code marking a 32-bit signed integer.
#define DBUS_TYPE_UNIX_FD
Type code marking a unix file descriptor.
#define DBUS_TYPE_BOOLEAN
Type code marking a boolean.
#define DBUS_STRUCT_BEGIN_CHAR
Code marking the start of a struct type in a type signature.
#define DBUS_TYPE_STRING
Type code marking a UTF-8 encoded, nul-terminated Unicode string.
#define DBUS_MAXIMUM_NAME_LENGTH
Max length in bytes of a bus name, interface, or member (not object path, paths are unlimited).
#define DBUS_TYPE_ARRAY
Type code marking a D-Bus array type.
#define DBUS_TYPE_INVALID
Type code that is never equal to a legitimate type code.
#define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH
Depth of recursion in the type tree.
#define DBUS_TYPE_INT64
Type code marking a 64-bit signed integer.
#define DBUS_TYPE_DOUBLE
Type code marking an 8-byte double in IEEE 754 format.
#define DBUS_TYPE_UINT64
Type code marking a 64-bit unsigned integer.
#define DBUS_TYPE_DICT_ENTRY
Type code used to represent a dict entry; however, this type code does not appear in type signatures,...
#define DBUS_DICT_ENTRY_BEGIN_CHAR
Code marking the start of a dict entry type in a type signature.
#define DBUS_TYPE_UINT16
Type code marking a 16-bit unsigned integer.
#define DBUS_TYPE_STRUCT
STRUCT and DICT_ENTRY are sort of special since their codes can't appear in a type string,...
#define DBUS_STRUCT_END_CHAR
Code marking the end of a struct type in a type signature.
#define DBUS_TYPE_UINT32
Type code marking a 32-bit unsigned integer.
dbus_bool_t dbus_type_is_basic(int typecode)
A "basic type" is a somewhat arbitrary concept, but the intent is to include those types that are ful...
dbus_bool_t dbus_type_is_fixed(int typecode)
Tells you whether values of this type can change length if you set them to some other value.
dbus_bool_t dbus_type_is_valid(int typecode)
Return TRUE if the argument is a valid typecode.
dbus_bool_t _dbus_string_validate_utf8(const DBusString *str, int start, int len)
Checks that the given range of the string is valid UTF-8.
void _dbus_string_init_const_len(DBusString *str, const char *value, int len)
Initializes a constant string with a length.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
The type reader is an iterator for reading values from a block of values.
int type_pos
current position in signature