diff options
author | Colin Walters <walters@verbum.org> | 2005-05-11 18:07:22 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2005-05-11 18:07:22 +0000 |
commit | 61411a061c09def43687153e6c734ff27b7fd556 (patch) | |
tree | 486ef0556c8c5cd6bfd572b8a746f21c19f272a8 /dbus/dbus-marshal-recursive.c | |
parent | ca01b211125953bdada46b16729e156a3c365a79 (diff) |
2005-05-11 Colin Walters <walters@verbum.org>
* dbus/dbus-signature.c (dbus_signature_iter_get_signature):
New function, returns signature string for signature iter.
* dbus/dbus-signature.h: Prototype it.
* dbus/dbus-message.c (dbus_message_iter_get_signature):
New function, returns signature string for message iter.
(dbus_message_iter_get_array_len): New function, returns
length of array.
(dbus_message_iter_get_fixed_array): Fix assertion; this
function should be used when the iter is pointing to the
contents of an array
* dbus/dbus-message.h: Prototypes.
* dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
New function; returns length of an array.
* dbus/dbus-marshal-recursive.h: Prototype it.
Diffstat (limited to 'dbus/dbus-marshal-recursive.c')
-rw-r--r-- | dbus/dbus-marshal-recursive.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 6fcbd623..1427a803 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -986,6 +986,21 @@ _dbus_type_reader_read_basic (const DBusTypeReader *reader, } /** + * Returns the number of values remaining in the current array reader. + * + * @param reader the reader to read from + * @returns the number of elements remaining in the array + */ +int +_dbus_type_reader_get_array_length (const DBusTypeReader *reader) +{ + _dbus_assert (!reader->klass->types_only); + _dbus_assert (reader->klass == &array_reader_class); + + return array_reader_get_array_len (reader); +} + +/** * 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. |