diff options
author | Mohamed Abbas <mohamed.abbas@intel.com> | 2011-09-13 09:55:15 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-09-13 10:53:52 +0200 |
commit | f251712760f3741a00458b652c5571c5ba39a700 (patch) | |
tree | 0956b5d9df525dbb39de9b2d42f83fc0b2f5d117 /gsupplicant/dbus.h | |
parent | ff76ad35726a05cd5bf66ab09c2681f3bee8912d (diff) | |
download | connman-f251712760f3741a00458b652c5571c5ba39a700.tar.gz connman-f251712760f3741a00458b652c5571c5ba39a700.tar.bz2 connman-f251712760f3741a00458b652c5571c5ba39a700.zip |
gsupplicant: Add support to append char ** entries to dbus dict
Diffstat (limited to 'gsupplicant/dbus.h')
-rw-r--r-- | gsupplicant/dbus.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gsupplicant/dbus.h b/gsupplicant/dbus.h index 642e8b15..fbada070 100644 --- a/gsupplicant/dbus.h +++ b/gsupplicant/dbus.h @@ -37,6 +37,11 @@ typedef void (*supplicant_dbus_setup_function) (DBusMessageIter *iter, typedef void (*supplicant_dbus_result_function) (const char *error, DBusMessageIter *iter, void *user_data); +void supplicant_dbus_property_append_array(DBusMessageIter *iter, + const char *key, int type, + supplicant_dbus_array_function function, + void *user_data); + void supplicant_dbus_setup(DBusConnection *conn); void supplicant_dbus_array_foreach(DBusMessageIter *iter, @@ -111,3 +116,18 @@ supplicant_dbus_dict_append_fixed_array(DBusMessageIter *dict, supplicant_dbus_property_append_fixed_array(&entry, key, type, val, len); dbus_message_iter_close_container(dict, &entry); } + +static inline void +supplicant_dbus_dict_append_array(DBusMessageIter *dict, + const char *key, int type, + supplicant_dbus_array_function function, + void *user_data) +{ + DBusMessageIter entry; + + dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY, + NULL, &entry); + supplicant_dbus_property_append_array(&entry, key, type, + function, user_data); + dbus_message_iter_close_container(dict, &entry); +} |