2 // Open Service Platform
3 // Copyright (c) 2012-2013 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 * @file FTel_NetworkManagerImpl.h
19 * @brief This is the header file for the _NetworkManagerImpl class.
21 * This header file contains the declaration of the _NetworkManagerImpl class.
23 #ifndef _FTEL_INTERNAL_NETWORK_MANAGER_IMPL_H_
24 #define _FTEL_INTERNAL_NETWORK_MANAGER_IMPL_H_
26 #include <unique_ptr.h>
27 #include <FBaseObject.h>
28 #include "FTel_TelephonyUtility.h"
31 namespace Tizen { namespace Base
40 namespace Tizen { namespace Telephony
42 class ITelephonyNetworkEventListener;
43 class ITelephonyNetworkSettingListener;
47 class _NetworkManagerEvent;
48 class _NetworkSettingEvent;
49 class _TelephonyIpcProxy;
51 class _NetworkManagerImpl
52 : public Tizen::Base::Object
56 * This is the default constructor for this class.
60 _NetworkManagerImpl(void);
63 * This is the destructor for this class.
67 virtual ~_NetworkManagerImpl(void);
70 * @see NetworkManager::Construct()
72 result Construct(ITelephonyNetworkEventListener* pListener);
75 * @see NetworkManager::GetNetworkStatus()
77 result GetNetworkStatus(NetworkStatus& networkStatus) const;
80 * @see NetworkManager::GetNetworkInfo()
82 result GetNetworkInfo(NetworkInfo& networkInfo) const;
85 * @see NetworkManager::SetNetworkSettingListener()
87 result SetNetworkSettingListener(ITelephonyNetworkSettingListener* pListener);
90 * @see NetworkManager::GetNetworkSelectionMode()
92 result GetNetworkSelectionMode(void);
95 * @see NetworkManager::SelectNetwork()
97 result SelectNetwork(const NetworkInfo& networkInfo);
100 * @see NetworkManager::SelectNetwork()
102 result SelectNetwork(void);
105 * @see NetworkManager::SearchNetwork()
107 result SearchNetwork(void);
110 void OnTelephonyNetworkSelectionModeReceived(bool isManual, result r);
112 void OnTelephonyNetworkSelectionCompleted(result r);
114 void OnTelephonyNetworkSearchCompleted(Tizen::Base::String message, result r);
117 * Checks the network state of the data network service.
119 bool IsDataAvailable(void) const;
122 * Checks the data roaming is on or off.
124 bool IsRoaming(void) const;
127 * Checks the network state of the telephony service.
129 static bool IsServiceAvailable(bool checkEmergency = false);
132 * Checks the enabled state of flight mode.
134 static bool IsNetworkAvailable(void);
137 * Gets the Impl instance.
140 * @return The pointer to _NetworkManagerImpl
141 * @param[in] networkManager An instance of NetworkManager
143 static _NetworkManagerImpl* GetInstance(NetworkManager& networkManager);
146 * Gets the Impl instance.
149 * @return The pointer to _NetworkManagerImpl
150 * @param[in] networkManager An instance of NetworkManager
152 static const _NetworkManagerImpl* GetInstance(const NetworkManager& networkManager);
157 * This is the copy constructor for the %_NetworkManagerImpl class.
159 * @param[in] rhs An instance of %_NetworkManagerImpl
161 _NetworkManagerImpl(const _NetworkManagerImpl& rhs);
163 Tizen::Base::Collection::IList* ParsingMessageN(const Tizen::Base::String& message);
165 NetworkInfo* GenerateNetworkInfoN(const Tizen::Base::String& message, int& currentIndex);
167 Tizen::Base::String MessageToString(const Tizen::Base::String& message, int& currentIndex);
169 Tizen::Base::String MessageWithLengthToString(const Tizen::Base::String& message, int& currentIndex);
172 * This is the assignment operator.
173 * Do @b not use directly.
175 * @param[in] rhs An instance of %_NetworkManagerImpl
177 _NetworkManagerImpl& operator =(const _NetworkManagerImpl& rhs);
180 std::unique_ptr<_NetworkManagerEvent> __pNetworkManagerEvent;
181 std::unique_ptr<_NetworkSettingEvent> __pNetworkSettingEvent;
182 _TelephonyIpcProxy* __pTelephonyServiceProxy;
183 ITelephonyNetworkSettingListener* __pSettingListener;
187 }; // _NetworkManagerImpl
189 }} // Tizen::Telephony
190 #endif // _FTEL_INTERNAL_NETWORK_MANAGER_IMPL_H_