[TSAM-14049] fix null pointer reference
[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
31 #define SUPPLICANT_SERVICE                              "fi.w1.wpa_supplicant1"
32 #define SUPPLICANT_INTERFACE                    "fi.w1.wpa_supplicant1"
33 #define SUPPLICANT_IFACE_INTERFACE              SUPPLICANT_INTERFACE ".Interface"
34 #define SUPPLICANT_IFACE_BSS                    SUPPLICANT_INTERFACE ".BSS"
35 #define SUPPLICANT_IFACE_WPS                    SUPPLICANT_INTERFACE ".Interface.WPS"
36 #define SUPPLICANT_PATH                                 "/fi/w1/wpa_supplicant1"
37
38 struct dbus_input_arguments {
39         int type;
40         void *data;
41 };
42
43 /* Returns Supplicant interface
44  * Do not free the returned interface */
45 const char *netconfig_wifi_get_supplicant_interface(void);
46
47 GList *setup_input_args(GList *list, struct dbus_input_arguments *items);
48 GVariant *netconfig_supplicant_invoke_dbus_method(const char *dest, const char *path,
49                 const char *interface_name, const char *method,
50                 GVariant *params);
51 gboolean netconfig_supplicant_invoke_dbus_method_nonblock(const char *dest,
52                 const char *path, const char *interface_name,
53                 const char *method, GVariant *params,
54                 GAsyncReadyCallback notify_func);
55 GVariant *netconfig_supplicant_invoke_dbus_interface_property_get(const char *interface,
56                         const char *key);
57 gboolean netconfig_supplicant_invoke_dbus_interface_property_set(const char *interface,
58                         const char *key, GVariant *message,
59                         GAsyncReadyCallback notify_func);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif /* __NETCONFIG_NETSUPPLICANT_H__ */