summaryrefslogtreecommitdiff
path: root/tools/supplicant-dbus.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-31 01:31:45 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-31 01:31:45 -0800
commit2b1e2d01d040dceac55aa3efca707a7ce8521f9c (patch)
treeb50f254d852c4cebd465c908151ec91ffc220628 /tools/supplicant-dbus.h
parentcd07fbeb1af81232dfb452ec7494bdc33051371e (diff)
downloadconnman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.tar.gz
connman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.tar.bz2
connman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.zip
Add interface creation function to supplicant test program
Diffstat (limited to 'tools/supplicant-dbus.h')
-rw-r--r--tools/supplicant-dbus.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/supplicant-dbus.h b/tools/supplicant-dbus.h
index 162ec72e..8251504c 100644
--- a/tools/supplicant-dbus.h
+++ b/tools/supplicant-dbus.h
@@ -56,3 +56,38 @@ int supplicant_dbus_property_set(const char *path, const char *interface,
supplicant_dbus_setup_function setup,
supplicant_dbus_result_function function,
void *user_data);
+
+int supplicant_dbus_method_call(const char *path,
+ const char *interface, const char *method,
+ supplicant_dbus_setup_function setup,
+ supplicant_dbus_result_function function,
+ void *user_data);
+
+void supplicant_dbus_property_append_basic(DBusMessageIter *iter,
+ const char *key, int type, void *val);
+
+static inline void supplicant_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 supplicant_dbus_dict_close(DBusMessageIter *iter,
+ DBusMessageIter *dict)
+{
+ dbus_message_iter_close_container(iter, dict);
+}
+
+static inline void supplicant_dbus_dict_append_basic(DBusMessageIter *dict,
+ const char *key, int type, void *val)
+{
+ DBusMessageIter entry;
+
+ dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
+ NULL, &entry);
+ supplicant_dbus_property_append_basic(&entry, key, type, val);
+ dbus_message_iter_close_container(dict, &entry);
+}