28 #include <dbus/dbus-macros.h>
29 #include <dbus/dbus-types.h>
30 #include <dbus/dbus-memory.h>
44 #if defined(DBUS_WIN) && defined(_DEBUG)
57 #ifdef DBUS_DISABLE_ASSERT
62 #define _dbus_string_get_data(s) ((char*)(((DBusString*)(s))->dummy1))
63 #define _dbus_string_get_length(s) (((DBusString*)(s))->dummy2)
64 #define _dbus_string_set_byte(s, i, b) ((((unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) = (unsigned char) (b))
65 #define _dbus_string_get_byte(s, i) (((const unsigned char*)(((DBusString*)(s))->dummy1))[(i)])
66 #define _dbus_string_get_const_data(s) ((const char*)(((DBusString*)(s))->dummy1))
67 #define _dbus_string_get_const_data_len(s,start,len) (((const char*)(((DBusString*)(s))->dummy1)) + (start))
91 #ifndef _dbus_string_get_data
95 #ifndef _dbus_string_get_const_data
102 #ifndef _dbus_string_get_const_data_len
108 #ifndef _dbus_string_set_byte
114 #ifndef _dbus_string_get_byte
149 #ifndef _dbus_string_get_length
164 static inline unsigned int
165 _dbus_string_get_length_uint (
const DBusString *str)
172 int additional_length);
175 int length_to_remove);
195 unsigned long value);
202 ...) _DBUS_GNUC_PRINTF (2, 3);
206 va_list args) _DBUS_GNUC_PRINTF (2, 0);
209 const
unsigned char octets[2]);
212 const
unsigned char octets[4]);
215 const
unsigned char octets[8]);
263 unsigned long *value_return,
325 void _dbus_string_delete_first_word (
DBusString *str);
327 void _dbus_string_delete_leading_blanks (
DBusString *str);
364 static inline
unsigned char *
370 static inline unsigned char *
371 _dbus_string_get_udata_len (
DBusString *str,
int start,
int len)
376 static inline const unsigned char *
377 _dbus_string_get_const_udata (
const DBusString *str)
382 static inline const unsigned char *
383 _dbus_string_get_const_udata_len (
const DBusString *str,
int start,
int len)
393 #define _DBUS_STRING_ALLOCATION_PADDING 8
402 #define _DBUS_STRING_DEFINE_STATIC(name, str) \
403 static const char _dbus_static_string_##name[] = str; \
404 static const DBusString name = { _dbus_static_string_##name, \
405 sizeof(_dbus_static_string_##name), \
406 sizeof(_dbus_static_string_##name) + \
407 _DBUS_STRING_ALLOCATION_PADDING, \
408 TRUE, TRUE, FALSE, 0 }