3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef __MOBILEAP_WIFI_H__
19 #define __MOBILEAP_WIFI_H__
21 #include "mobileap_softap.h"
23 #define VCONFKEY_MOBILE_HOTSPOT_SSID "memory/private/mobileap-agent/ssid"
24 #define SOFTAP_SECURITY_TYPE_OPEN_STR "open"
25 #define SOFTAP_SECURITY_TYPE_WPA2_PSK_STR "wpa2-psk"
26 #define SOFTAP_PASSPHRASE_PATH "wifi_tethering.txt"
27 #define SOFTAP_PASSPHRASE_GROUP_ID "secure-storage::tethering"
30 SOFTAP_SECURITY_TYPE_OPEN,
31 SOFTAP_SECURITY_TYPE_WPA2_PSK,
32 } softap_security_type_e;
38 softap_security_type_e security_type;
39 } wifi_saved_settings;
41 int _get_wifi_name_from_lease_info(const char *mac, char **name_buf);
42 void _add_wifi_device_to_array(softap_device_info_t *di, GPtrArray *array);
43 mobile_ap_error_code_e _enable_wifi_tethering(TetheringObject *obj, gchar *ssid,
44 gchar *passphrase, int hide_mode, softap_security_type_e security_type);
45 mobile_ap_error_code_e _disable_wifi_tethering(TetheringObject *obj);
46 gboolean _is_trying_wifi_operation(void);
47 mobile_ap_error_code_e _reload_softap_settings(TetheringObject *obj,
48 gchar *ssid, gchar *key, gint hide_mode, gint security_type);
49 mobile_ap_error_code_e _reload_softap_settings_for_ap(TetheringObject *obj,
50 gchar *ssid, gchar *key, gint hide_mode, gint security_type);
53 mobile_ap_error_code_e _enable_wifi_ap(TetheringObject *obj, gchar *ssid,
54 gchar *passphrase, int hide_mode,
55 softap_security_type_e security_type);
56 mobile_ap_error_code_e _disable_wifi_ap(TetheringObject *obj);
57 gboolean tethering_enable_wifi_tethering(TetheringObject *obj, gchar *ssid,
58 gchar *key, gint hide_mode, gint security_type,
59 DBusGMethodInvocation *context);
61 gboolean tethering_disable_wifi_tethering(TetheringObject *obj,
62 DBusGMethodInvocation *context);
64 gboolean tethering_reload_wifi_settings(TetheringObject *obj, gchar *ssid,
65 gchar *key, gint visibility, gint security_type,
66 DBusGMethodInvocation *context);
68 gboolean tethering_reload_wifi_ap_settings(TetheringObject *obj, gchar *ssid,
69 gchar *key, gint hide_mode,
70 gint security, DBusGMethodInvocation *context);
72 gboolean tethering_enable_wifi_ap(TetheringObject *obj, gchar *ssid,
73 gchar *key, gint hide_mode, gint security_type,
74 DBusGMethodInvocation *context);
76 gboolean tethering_disable_wifi_ap(TetheringObject *obj,
77 DBusGMethodInvocation *context);
78 #endif /* __MOBILEAP_WIFI_H__ */