From 0123e6a927772af6d56ddbe3f75a443ab40646d1 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 28 May 2004 13:10:36 +0000 Subject: 2004-05-28 Michael Meeks * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): fix no int64 case. * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl. * dbus/dbus-message.c (_dbus_message_iter_get_basic_type), (_dbus_message_iter_get_basic_type_array): impl. drastically simplify ~all relevant _get methods to use these. (_dbus_message_iter_append_basic_array), (dbus_message_iter_append_basic): impl drastically simplify ~all relevant _append methods to use these. * dbus/dbus-message-builder.c (parse_basic_type) (parse_basic_array, lookup_basic_type): impl. (_dbus_message_data_load): prune scads of duplicate / cut & paste coding. * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) (_dbus_demarshal_basic_type): implement, (demarshal_and_validate_len/arg): beef up debug. (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl. --- dbus/dbus-marshal.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'dbus/dbus-marshal.h') diff --git a/dbus/dbus-marshal.h b/dbus/dbus-marshal.h index b1b8e2c9..1c34c531 100644 --- a/dbus/dbus-marshal.h +++ b/dbus/dbus-marshal.h @@ -184,6 +184,10 @@ dbus_bool_t _dbus_marshal_double (DBusString *str, dbus_bool_t _dbus_marshal_string (DBusString *str, int byte_order, const char *value); +dbus_bool_t _dbus_marshal_basic_type (DBusString *str, + char type, + void *value, + int byte_order); dbus_bool_t _dbus_marshal_byte_array (DBusString *str, int byte_order, const unsigned char *value, @@ -210,6 +214,12 @@ dbus_bool_t _dbus_marshal_double_array (DBusString *str, int byte_order, const double *value, int len); +dbus_bool_t _dbus_marshal_basic_type_array (DBusString *str, + char element_type, + const void *value, + int len, + int byte_order); + dbus_bool_t _dbus_marshal_string_array (DBusString *str, int byte_order, const char **value, @@ -241,6 +251,11 @@ dbus_uint64_t _dbus_demarshal_uint64 (const DBusString *str, int pos, int *new_pos); #endif /* DBUS_HAVE_INT64 */ +void _dbus_demarshal_basic_type (const DBusString *str, + int type, + void *value, + int byte_order, + int *pos); char * _dbus_demarshal_string (const DBusString *str, int byte_order, int pos, @@ -283,6 +298,13 @@ dbus_bool_t _dbus_demarshal_double_array (const DBusString *str, int *new_pos, double **array, int *array_len); +dbus_bool_t _dbus_demarshal_basic_type_array (const DBusString *str, + int type, + void **array, + int *array_len, + int byte_order, + int *pos); + dbus_bool_t _dbus_demarshal_string_array (const DBusString *str, int byte_order, int pos, -- cgit