summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-marshal-recursive.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2004-12-30 22:34:17 +0000
committerHavoc Pennington <hp@redhat.com>2004-12-30 22:34:17 +0000
commitdaaee020dc47f7da7e2b29f130166cfa3a4acf32 (patch)
tree30f1561db6acdca00636385b917fda0bd872db74 /dbus/dbus-marshal-recursive.h
parent7da3315f8cfc599d4b4ac2a21834550b0f10f344 (diff)
- remove DICT type
- add SIGNATURE type - fix max name len of 256, should be 255 so it fits in a byte if it's going to be a number near 256 - generalize some of the recursive type marshaling code to share between arrays and variants - just started on implementing variant
Diffstat (limited to 'dbus/dbus-marshal-recursive.h')
-rw-r--r--dbus/dbus-marshal-recursive.h57
1 files changed, 25 insertions, 32 deletions
diff --git a/dbus/dbus-marshal-recursive.h b/dbus/dbus-marshal-recursive.h
index bed30405..679dad3c 100644
--- a/dbus/dbus-marshal-recursive.h
+++ b/dbus/dbus-marshal-recursive.h
@@ -53,11 +53,6 @@ struct DBusTypeReader
} array;
struct {
- int len_pos;
-
- } dict;
-
- struct {
dbus_uint32_t finished : 1;
} strct;
} u;
@@ -71,7 +66,7 @@ struct DBusTypeWriter
DBusString *value_str;
int value_pos;
- dbus_uint32_t inside_array : 1;
+ dbus_uint32_t type_pos_is_expectation : 1; /* type_pos is an insertion point or an expected next type */
int container_type;
union
@@ -82,11 +77,6 @@ struct DBusTypeWriter
int element_type_pos; /* position in type_str of array element type */
int element_type_len;
} array;
-
- struct {
- int len_pos;
-
- } dict;
} u;
};
@@ -108,27 +98,30 @@ void _dbus_type_reader_recurse (DBusTypeReader *reader,
DBusTypeReader *subreader);
dbus_bool_t _dbus_type_reader_next (DBusTypeReader *reader);
-void _dbus_type_writer_init (DBusTypeWriter *writer,
- int byte_order,
- DBusString *type_str,
- int type_pos,
- DBusString *value_str,
- int value_pos);
-dbus_bool_t _dbus_type_writer_write_basic (DBusTypeWriter *writer,
- int type,
- const void *value);
-dbus_bool_t _dbus_type_writer_write_array (DBusTypeWriter *writer,
- int type,
- const void *array,
- int array_len);
-dbus_bool_t _dbus_type_writer_recurse (DBusTypeWriter *writer,
- int container_type,
- DBusTypeWriter *sub);
-dbus_bool_t _dbus_type_writer_recurse_array (DBusTypeWriter *writer,
- const char *element_type,
- DBusTypeWriter *sub);
-dbus_bool_t _dbus_type_writer_unrecurse (DBusTypeWriter *writer,
- DBusTypeWriter *sub);
+void _dbus_type_writer_init (DBusTypeWriter *writer,
+ int byte_order,
+ DBusString *type_str,
+ int type_pos,
+ DBusString *value_str,
+ int value_pos);
+dbus_bool_t _dbus_type_writer_write_basic (DBusTypeWriter *writer,
+ int type,
+ const void *value);
+dbus_bool_t _dbus_type_writer_write_array (DBusTypeWriter *writer,
+ int type,
+ const void *array,
+ int array_len);
+dbus_bool_t _dbus_type_writer_recurse_struct (DBusTypeWriter *writer,
+ DBusTypeWriter *sub);
+dbus_bool_t _dbus_type_writer_recurse_array (DBusTypeWriter *writer,
+ const char *element_type,
+ DBusTypeWriter *sub);
+dbus_bool_t _dbus_type_writer_recurse_variant (DBusTypeWriter *writer,
+ const char *contained_type,
+ DBusTypeWriter *sub);
+dbus_bool_t _dbus_type_writer_unrecurse (DBusTypeWriter *writer,
+ DBusTypeWriter *sub);
+
#endif /* DBUS_MARSHAL_RECURSIVE_H */