162ec72ef3bf8cec3f40816103b8ff6efdf2e0bb
[platform/upstream/connman.git] / tools / supplicant-dbus.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #include <dbus/dbus.h>
23
24 #define SUPPLICANT_SERVICE      "fi.w1.wpa_supplicant1"
25 #define SUPPLICANT_INTERFACE    "fi.w1.wpa_supplicant1"
26 #define SUPPLICANT_PATH         "/fi/w1/wpa_supplicant1"
27
28 typedef void (* supplicant_dbus_array_function) (DBusMessageIter *iter,
29                                                         void *user_data);
30
31 typedef void (* supplicant_dbus_property_function) (const char *key,
32                                 DBusMessageIter *iter, void *user_data);
33
34 typedef void (* supplicant_dbus_setup_function) (DBusMessageIter *iter,
35                                                         void *user_data);
36
37 typedef void (* supplicant_dbus_result_function) (const char *error,
38                                 DBusMessageIter *iter, void *user_data);
39
40 void supplicant_dbus_setup(DBusConnection *conn);
41
42 void supplicant_dbus_array_foreach(DBusMessageIter *iter,
43                                 supplicant_dbus_array_function function,
44                                                         void *user_data);
45
46 void supplicant_dbus_property_foreach(DBusMessageIter *iter,
47                                 supplicant_dbus_property_function function,
48                                                         void *user_data);
49
50 int supplicant_dbus_property_get_all(const char *path, const char *interface,
51                                 supplicant_dbus_property_function function,
52                                                         void *user_data);
53
54 int supplicant_dbus_property_set(const char *path, const char *interface,
55                                 const char *key, const char *signature,
56                                 supplicant_dbus_setup_function setup,
57                                 supplicant_dbus_result_function function,
58                                                         void *user_data);