summaryrefslogtreecommitdiff
path: root/include/dbus.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-18 23:54:22 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-18 23:54:22 -0800
commit8c11229ed0fa132280a92305bb96c8fb88961c8b (patch)
treef46f8ec7e38345501d67e8d47cafbeca4cd8888c /include/dbus.h
parentedf83518677fce7cc169d84bb6e5bcd1f81994b9 (diff)
downloadconnman-8c11229ed0fa132280a92305bb96c8fb88961c8b.tar.gz
connman-8c11229ed0fa132280a92305bb96c8fb88961c8b.tar.bz2
connman-8c11229ed0fa132280a92305bb96c8fb88961c8b.zip
Create helpers for dictionary containers
Diffstat (limited to 'include/dbus.h')
-rw-r--r--include/dbus.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dbus.h b/include/dbus.h
index c9f4a627..a3c36afe 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -55,6 +55,21 @@ void connman_dbus_dict_append_array(DBusMessageIter *dict,
void connman_dbus_dict_append_variant(DBusMessageIter *dict,
const char *key, int type, void *val);
+static inline void connman_dbus_dict_open(DBusMessageIter *iter,
+ DBusMessageIter *dict)
+{
+ dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
+ DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING, dict);
+}
+
+static inline void connman_dbus_dict_close(DBusMessageIter *iter,
+ DBusMessageIter *dict)
+{
+ dbus_message_iter_close_container(iter, dict);
+}
+
dbus_bool_t connman_dbus_validate_ident(const char *ident);
char *connman_dbus_encode_string(const char *value);