diff options
author | Tudor Marcu <tudor.a.marcu@intel.com> | 2012-09-12 15:05:57 -0700 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-09-14 16:32:00 +0300 |
commit | 529206c3be39a9c3ff1632316b1b669003e54b60 (patch) | |
tree | a74a84b88fbb2f550e93018b44e168e88269d16d /include/dbus.h | |
parent | 713085354f3abcf2db65b499506042af1b651d52 (diff) | |
download | connman-529206c3be39a9c3ff1632316b1b669003e54b60.tar.gz connman-529206c3be39a9c3ff1632316b1b669003e54b60.tar.bz2 connman-529206c3be39a9c3ff1632316b1b669003e54b60.zip |
dbus.h: Update include/dbus.h with more container support
Add a couple more functions for opening D-Bus message containers
with different signatures currently used by the command line client.
Diffstat (limited to 'include/dbus.h')
-rw-r--r-- | include/dbus.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/dbus.h b/include/dbus.h index 3f8dbadc..bf5f8c14 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -96,6 +96,25 @@ static inline void connman_dbus_dict_open(DBusMessageIter *iter, DBUS_DICT_ENTRY_END_CHAR_AS_STRING, dict); } +static inline void connman_dbus_dict_open_variant(DBusMessageIter *iter, + DBusMessageIter *dict) +{ + dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, + DBUS_TYPE_ARRAY_AS_STRING + 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_array_open(DBusMessageIter *iter, + DBusMessageIter *dict) +{ + dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, + DBUS_TYPE_ARRAY_AS_STRING + DBUS_TYPE_STRING_AS_STRING, + dict); +} + static inline void connman_dbus_dict_close(DBusMessageIter *iter, DBusMessageIter *dict) { |