2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FSys_SettingNetworkProvider.h
19 * @brief This is the header file for the %_SettingNetworkProvider class.
21 * This header file contains the declarations of the %_SettingNetworkProvider class.
24 #ifndef _FSYS_SETTING_NETWORK_PROVIDER_H_
25 #define _FSYS_SETTING_NETWORK_PROVIDER_H_
30 #include <tethering.h>
31 #include <tapi_common.h>
32 #include <ITapiModem.h>
33 #include <runtime_info.h>
34 #include <bluetooth.h>
36 #include <wifi-direct.h>
39 #include <FSysISettingInfoSetValueAsyncResultListener.h>
41 #include "FSys_SettingInfo.h"
42 #include "FSys_ISettingProvider.h"
44 namespace Tizen { namespace System
47 class _SettingNetworkProvider
51 _SettingNetworkProvider();
52 virtual ~_SettingNetworkProvider();
55 result GetValue(const Tizen::Base::String& key, bool& value);
56 result SetValue(const Tizen::Base::String& key, const bool value);
57 result SetValueAsync(const Tizen::Base::String& key, bool value, ISettingInfoSetValueAsyncResultListener* listener);
58 result SetValueForPrivilegedKey(const Tizen::Base::String& key, bool value);
59 result SetValueAsyncForPrivilegedKey(const Tizen::Base::String& key, bool value, ISettingInfoSetValueAsyncResultListener* listener);
61 result GetValue(const Tizen::Base::String& key, Tizen::Base::String& value);
62 result SetValue(const Tizen::Base::String& key, const Tizen::Base::String value);
64 bool HasKey(const Tizen::Base::String& key);
67 result FlightModeEnabler(void* data);
68 result WifiDummy(void* data);
69 result WifiDirectDummy(void* data);
71 static void SettingEventFlightMode(TapiHandle* handle, int res, void* data, void* user_data);
72 static void SettingEventRuntimeInfo(runtime_info_key_e key, void* userData);
73 static void SettingEventVConf(keynode_t* node, void* userData);
74 static void SettingEventTetheringEnabled(tethering_error_e tetheringErr, tethering_type_e deviceType, bool isRequested, void* data);
75 static void SettingEventTetheringDisabled(tethering_error_e tetheringErr, tethering_type_e deviceType, tethering_disabled_cause_e tetheringCause, void* data);
76 static void SettingEventBluetooth(int result, bt_adapter_state_e adapter_state, void* user_data);
78 static void SettingWifiActivateCallBack(wifi_error_e errorCode, void* data);
79 static void SettingWifiDirectStateChangedCallBack(wifi_direct_error_e errorCode, wifi_direct_device_state_e deviceState, void* data);
82 TapiHandle* __tapiHandle;
83 void* __pWifiDllHandle;
84 void* __pBluetoothDllHandle;
85 tethering_h __tetheringHandle;
87 int __stateOfFlightMode;
89 int __stateOfWifiDirect;
90 int __stateOfBluetooth;
92 bool __flightModeEnabled;
93 bool __networkBluetoothEnabled;
96 bool __wifiDirectInit;
98 ISettingInfoSetValueAsyncResultListener* __pWifiListener;
99 ISettingInfoSetValueAsyncResultListener* __pWifiDirectListener;
100 ISettingInfoSetValueAsyncResultListener* __pFlightModeListener;
101 ISettingInfoSetValueAsyncResultListener* __pBluetoothListener;
102 }; // _SettingNetworkProvider
106 #endif // _FSYS_ISETTING_NETWORK_PROVIDER_H_