5 * Copyright (C) 2012 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <dbus/dbus.h>
25 #define CONNMAN_SERVICE "net.connman"
27 #define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE ".Manager"
28 #define CONNMAN_MANAGER_PATH "/"
30 #define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
32 void dbus_property_append_basic(DBusMessageIter *iter,
33 const char *key, int type, void *val);
35 static inline void dbus_dict_open(DBusMessageIter *iter, DBusMessageIter *dict)
37 dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
38 DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
39 DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
40 DBUS_DICT_ENTRY_END_CHAR_AS_STRING, dict);
43 static inline void dbus_dict_open_variant(DBusMessageIter *iter,
44 DBusMessageIter *dict)
46 dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT,
47 DBUS_TYPE_ARRAY_AS_STRING
48 DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
49 DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
50 DBUS_DICT_ENTRY_END_CHAR_AS_STRING, dict);
53 static inline void dbus_array_open(DBusMessageIter *iter, DBusMessageIter *dict)
55 dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT,
56 DBUS_TYPE_ARRAY_AS_STRING
57 DBUS_TYPE_STRING_AS_STRING,
61 static inline void dbus_dict_close(DBusMessageIter *iter, DBusMessageIter *dict)
63 dbus_message_iter_close_container(iter, dict);