Revise unncessary functions
[framework/connectivity/net-config.git] / include / dbus.h
1 /*\r
2  * Network Configuration Module\r
3  *\r
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
5  *\r
6  * Contact: Danny JS Seo <S.Seo@samsung.com>\r
7  *\r
8  * Licensed under the Apache License, Version 2.0 (the "License");\r
9  * you may not use this file except in compliance with the License.\r
10  * You may obtain a copy of the License at\r
11  *\r
12  * http://www.apache.org/licenses/LICENSE-2.0\r
13  *\r
14  * Unless required by applicable law or agreed to in writing, software\r
15  * distributed under the License is distributed on an "AS IS" BASIS,\r
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
17  * See the License for the specific language governing permissions and\r
18  * limitations under the License.\r
19  *\r
20  */\r
21 \r
22 #ifndef __NETCONFIG_DBUS_H__\r
23 #define __NETCONFIG_DBUS_H__\r
24 \r
25 #ifdef __cplusplus\r
26 extern "C" {\r
27 #endif\r
28 \r
29 #include <glib.h>\r
30 #include <dbus/dbus.h>\r
31 #include <dbus/dbus-glib.h>\r
32 \r
33 #define CONNMAN_SERVICE                                 "net.connman"
34 #define CONNMAN_PATH                                    "/net/connman"
35 \r
36 #define SUPPLICANT_SERVICE                              "fi.w1.wpa_supplicant1"
37 #define SUPPLICANT_INTERFACE                    "fi.w1.wpa_supplicant1"
38 #define SUPPLICANT_PATH                                 "/fi/w1/wpa_supplicant1"
39 #define SUPPLICANT_GLOBAL_INTERFACE             "org.freedesktop.DBus.Properties"\r
40 \r
41 #define CONNMAN_MANAGER_INTERFACE               CONNMAN_SERVICE ".Manager"\r
42 #define CONNMAN_SERVICE_INTERFACE               CONNMAN_SERVICE ".Service"\r
43 #define CONNMAN_TECHNOLOGY_INTERFACE    CONNMAN_SERVICE ".Technology"\r
44 #define CONNMAN_MANAGER_PATH                    "/"\r
45
46 #define CONNMAN_WIFI_SERVICE_PROFILE_PREFIX             CONNMAN_PATH "/service/wifi_"
47 #define CONNMAN_WIFI_TECHNOLOGY_PREFIX                  CONNMAN_PATH "/technology/wifi"
48 \r
49 #define DBUS_PATH_MAX_BUFLEN            512\r
50 #define DBUS_STATE_MAX_BUFLEN           64\r
51 \r
52 typedef enum {\r
53         NETCONFIG_DBUS_RESULT_GET_BGSCAN_MODE,\r
54         NETCONFIG_DBUS_RESULT_DEFAULT_TECHNOLOGY,\r
55 } netconfig_dbus_result_type;\r
56 \r
57 struct dbus_input_arguments {\r
58         int type;\r
59         void *data;\r
60 };\r
61 \r
62 char *netconfig_wifi_get_connected_service_name(DBusMessage *message);
63 DBusMessage *netconfig_invoke_dbus_method(const char *dest, DBusConnection *connection,\r
64                 const char *path, const char *interface_name, const char *method);\r
65 DBusMessage *netconfig_supplicant_invoke_dbus_method(const char *dest,\r
66                 DBusConnection *connection,\r
67                 const char *path, const char *interface_name,\r
68                 const char *method, GList *args);\r
69 DBusMessage *netconfig_dbus_send_request(const char *destination, char *param_array[]);\r
70 void netconfig_dbus_parse_recursive(DBusMessageIter *iter,\r
71                 netconfig_dbus_result_type result_type, void *data);\r
72 char *netconfig_dbus_get_string(DBusMessage *msg);\r
73 \r
74 DBusGConnection *netconfig_setup_dbus(void);\r
75 \r
76 #ifdef __cplusplus\r
77 }\r
78 #endif\r
79 \r
80 #endif /* __NETCONFIG_DBUS_H__ */\r