diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-19 00:24:47 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-19 00:24:47 -0800 |
commit | 0c87b66b1687f815151bc9303ba6ae4dad09d93a (patch) | |
tree | 1c6d426fdc6f4feb8e0f2e51cf6aad3469b03019 /include/dbus.h | |
parent | 9b5472dbf0453de3e3e53584c9697a8f5de2010c (diff) | |
download | connman-0c87b66b1687f815151bc9303ba6ae4dad09d93a.tar.gz connman-0c87b66b1687f815151bc9303ba6ae4dad09d93a.tar.bz2 connman-0c87b66b1687f815151bc9303ba6ae4dad09d93a.zip |
Add helpers for appending flexible D-Bus arrays
Diffstat (limited to 'include/dbus.h')
-rw-r--r-- | include/dbus.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/dbus.h b/include/dbus.h index a3c36afe..09a0a6ce 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -45,16 +45,13 @@ extern "C" { #define CONNMAN_CONNECTION_INTERFACE CONNMAN_SERVICE ".Connection" #define CONNMAN_PROVIDER_INTERFACE CONNMAN_SERVICE ".Provider" +typedef void (* connman_dbus_append_cb_t) (DBusMessageIter *iter); + DBusConnection *connman_dbus_get_connection(void); void connman_dbus_property_append_variant(DBusMessageIter *property, const char *key, int type, void *val); -void connman_dbus_dict_append_array(DBusMessageIter *dict, - const char *key, int type, void *val, int len); -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) { @@ -70,6 +67,14 @@ static inline void connman_dbus_dict_close(DBusMessageIter *iter, dbus_message_iter_close_container(iter, dict); } +void connman_dbus_dict_append_variant(DBusMessageIter *dict, + const char *key, int type, void *val); + +void connman_dbus_dict_append_fixed_array(DBusMessageIter *dict, + const char *key, int type, void *val, int len); +void connman_dbus_dict_append_variable_array(DBusMessageIter *dict, + const char *key, int type, connman_dbus_append_cb_t function); + dbus_bool_t connman_dbus_validate_ident(const char *ident); char *connman_dbus_encode_string(const char *value); |