Base code merged to SPIN 2.4
[apps/native/ug-mobile-ap.git] / include / mh_func_onoff.h
1 /*
2 * ug-mobile-ap
3 *
4 * Copyright 2012  Samsung Electronics Co., Ltd
5
6 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 __APP_FUNC_ONOFF_H__
21 #define __APP_FUNC_ONOFF_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "mobile_hotspot.h"
28 #include "mh_view_main.h"
29 #include "mh_common_utility.h"
30
31 int _get_vconf_usb_state(void);
32 void _enabled_cb(tethering_error_e result, tethering_type_e type, bool is_requested, void *user_data);
33 void _disabled_cb(tethering_error_e result, tethering_type_e type, tethering_disabled_cause_e cause, void *user_data);
34 void _connection_changed_cb(tethering_client_h client, bool opened, void *user_data);
35
36 #ifdef TETHERING_DATA_USAGE_SUPPORT
37 void _data_usage_cb(tethering_error_e result, unsigned long long received_data, unsigned long long sent_data, void *user_data);
38 #endif
39
40 void _visibility_changed_cb(bool is_visible, void *user_data);
41 void _security_type_changed_cb(tethering_wifi_security_type_e changed_type, void *user_data);
42 void _passphrase_changed_cb(void *user_data);
43 int _handle_wifi_onoff_change(mh_appdata_t *ad);
44 int _handle_bt_onoff_change(mh_appdata_t *ad);
45 int _handle_usb_onoff_change(mh_appdata_t *ad);
46 int _turn_on_wifi(void);
47 bool _is_wifi_direct_on(void);
48 void _wifi_state_changed_cb(wifi_device_state_e state, void *user_data);
49 void _wifi_tethering_checkbox_popup_status_set(bool value);
50 bool _wifi_tethering_checkbox_popup_status_get(void);
51 gboolean _ps_recheck_timeout_cb(gpointer data);
52 int _create_wifi_hotspot_on_popup(mh_appdata_t *ad);
53 int _create_bt_tethering_on_popup(mh_appdata_t *ad);
54 int _create_usb_tethering_on_popup(mh_appdata_t *ad);
55 void _update_tethering_item(mh_appdata_t * ad, mh_state_e state);
56 void _update_tethering_enabling_item(mh_appdata_t *ad, tethering_type_e type, mh_state_e state);
57
58 #ifdef __cplusplus
59 }
60 #endif
61 #endif