Modified to get current time to match stc
[platform/core/connectivity/net-config.git] / include / netsupplicant.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __NETCONFIG_NETSUPPLICANT_H__
21 #define __NETCONFIG_NETSUPPLICANT_H__
22
23 #include "netdbus.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #define  WIFI_IFNAME                                    "wlan0"
30 /* Adhoc solution to use P2P interface */
31 #define  WIFI_P2P_IFNAME                                "p2p0"
32
33 #define SUPPLICANT_SERVICE                              "fi.w1.wpa_supplicant1"
34 #define SUPPLICANT_INTERFACE                    "fi.w1.wpa_supplicant1"
35 #define SUPPLICANT_IFACE_INTERFACE              SUPPLICANT_INTERFACE ".Interface"
36 #define SUPPLICANT_IFACE_BSS                    SUPPLICANT_INTERFACE ".BSS"
37 #define SUPPLICANT_IFACE_WPS                    SUPPLICANT_INTERFACE ".Interface.WPS"
38 #define SUPPLICANT_IFACE_DPP                    SUPPLICANT_INTERFACE ".Interface.DPP"
39 #define SUPPLICANT_PATH                                 "/fi/w1/wpa_supplicant1"
40
41 struct dbus_input_arguments {
42         int type;
43         void *data;
44 };
45
46 /* Returns Supplicant interface.
47  * Need to release interface using g_free */
48 char *netconfig_wifi_get_supplicant_interface(void);
49 /* Adhoc solution to use P2P interface */
50 char *netconfig_wifi_get_supplicant_p2p_interface(void);
51
52 GList *setup_input_args(GList *list, struct dbus_input_arguments *items);
53 GVariant *netconfig_supplicant_invoke_dbus_method(const char *dest, const char *path,
54                 const char *interface_name, const char *method,
55                 GVariant *params);
56 gboolean netconfig_supplicant_invoke_dbus_method_nonblock(const char *dest,
57                 const char *path, const char *interface_name,
58                 const char *method, GVariant *params,
59                 GAsyncReadyCallback notify_func);
60 GVariant *netconfig_supplicant_invoke_dbus_interface_property_get(const char *interface,
61                         const char *key);
62 gboolean netconfig_supplicant_invoke_dbus_interface_property_set(const char *interface,
63                         const char *key, GVariant *message,
64                         GAsyncReadyCallback notify_func);
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif /* __NETCONFIG_NETSUPPLICANT_H__ */