summaryrefslogtreecommitdiff
path: root/dbus/dbus-string.h
diff options
context:
space:
mode:
authorAleksandar Kanchev <kanchev@itestra.com>2012-07-09 18:09:04 +0200
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-12-02 11:13:24 +0000
commit880f5199aa8b6d6e864d25099e04bad410b76ace (patch)
treed4d966fe390a4f3bc74dd1b645540a4c4fca5608 /dbus/dbus-string.h
parent1e7653d74914eb0111bd39c39f422a25bae3eda9 (diff)
downloaddbus-baserock/genivi/dbus-1.9.4.tar.gz
DBusMessage: add support for custom marshalingbaserock/genivi/dbus-1.9.4
Add functions to support querying and manipulating the message body and signature. This is useful for code generators, which can generate custom marshaling functions based on a given IDL. Those functions tend to be optimized and faster than the generic iterator based marshaling.
Diffstat (limited to 'dbus/dbus-string.h')
-rw-r--r--dbus/dbus-string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h
index 44860feb..aaee82c2 100644
--- a/dbus/dbus-string.h
+++ b/dbus/dbus-string.h
@@ -61,6 +61,7 @@ struct DBusString
*/
#define _dbus_string_get_data(s) ((char*)(((DBusString*)(s))->dummy1))
#define _dbus_string_get_length(s) (((DBusString*)(s))->dummy2)
+#define _dbus_string_get_allocated(s) (((DBusString*)(s))->dummy3 - _DBUS_STRING_ALLOCATION_PADDING)
#define _dbus_string_set_byte(s, i, b) ((((unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) = (unsigned char) (b))
#define _dbus_string_get_byte(s, i) (((const unsigned char*)(((DBusString*)(s))->dummy1))[(i)])
#define _dbus_string_get_const_data(s) ((const char*)(((DBusString*)(s))->dummy1))
@@ -133,6 +134,9 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str,
#ifndef _dbus_string_get_length
int _dbus_string_get_length (const DBusString *str);
#endif /* !_dbus_string_get_length */
+#ifndef _dbus_string_get_allocated
+int _dbus_string_get_allocated (const DBusString *str);
+#endif /* !_dbus_string_get_allocated */
dbus_bool_t _dbus_string_lengthen (DBusString *str,
int additional_length);