5 * Copyright (C) 2013 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 #ifndef __CONNMANCTL_DBUS_HELPERS_H
24 #define __CONNMANCTL_DBUS_HELPERS_H
26 #include <dbus/dbus.h>
32 #define CONNMAN_SERVICE "net.connman"
33 #define CONNMAN_PATH "/"
34 #define VPN_SERVICE CONNMAN_SERVICE ".vpn"
37 void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre,
38 const char *dict, const char *sep);
40 typedef int (*connmanctl_dbus_method_return_func_t)(DBusMessageIter *iter,
41 int errnum, const char *error, void *user_data);
43 typedef void (*connmanctl_dbus_append_func_t)(DBusMessageIter *iter,
46 int __connmanctl_dbus_method_call(DBusConnection *connection,
47 const char *service, const char *path, const char *interface,
48 const char *method, connmanctl_dbus_method_return_func_t cb,
49 void * user_data, connmanctl_dbus_append_func_t append_fn,
52 int __connmanctl_dbus_set_property(DBusConnection *connection,
53 const char *path, const char *interface,
54 connmanctl_dbus_method_return_func_t cb, void * user_data,
55 const char *property, int type, void *value);
57 void __connmanctl_dbus_append_dict(DBusMessageIter *iter,
58 connmanctl_dbus_append_func_t append_fn, void *append_data);
60 void __connmanctl_dbus_append_dict_entry(DBusMessageIter *iter,
61 const char *property, int type, void *value);
63 int __connmanctl_dbus_set_property_dict(DBusConnection *connection,
64 const char *path, const char *interface,
65 connmanctl_dbus_method_return_func_t cb, void * user_data,
66 const char *property, int type,
67 connmanctl_dbus_append_func_t append_fn,
68 void *append_user_data);
70 #if defined TIZEN_EXT_WIFI_MESH
71 int __connmanctl_dbus_mesh_dict(DBusConnection *connection,
72 const char *path, const char *interface,
73 connmanctl_dbus_method_return_func_t cb, void *user_data,
74 const char *property, int type,
75 connmanctl_dbus_append_func_t append_fn,
76 void *append_user_data);
79 void __connmanctl_dbus_append_dict_string_array(DBusMessageIter *iter,
80 const char *property, connmanctl_dbus_append_func_t append_fn,
81 void *append_user_data);
82 int __connmanctl_dbus_set_property_array(DBusConnection *connection,
83 const char *path, const char *interface,
84 connmanctl_dbus_method_return_func_t cb, void *user_data,
85 const char *property, int type,
86 connmanctl_dbus_append_func_t append_fn,
87 void *append_user_data);
89 int __connmanctl_dbus_session_change(DBusConnection *connection,
90 const char *session_path,
91 connmanctl_dbus_method_return_func_t cb, void * user_data,
92 const char *property, int type, void *value);
94 int __connmanctl_dbus_session_change_array(DBusConnection *connection,
95 const char *session_path,
96 connmanctl_dbus_method_return_func_t cb, void *user_data,
98 connmanctl_dbus_append_func_t append_fn,
99 void *append_user_data);