2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 FNet_NetAccountManagerImpl.cpp
19 * @brief This is the implementation for the %_NetAccountManagerImpl class.
22 #ifndef _FNET_INTERNAL_NET_ACCOUNT_MANAGER_IMPL_H_
23 #define _FNET_INTERNAL_NET_ACCOUNT_MANAGER_IMPL_H_
25 #include <FBaseDataType.h>
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FNetNetTypes.h>
29 #include "FNet_NetUtility.h"
31 namespace Tizen { namespace Base { namespace Collection
34 } } } // Tizen::Base::Collection
36 namespace Tizen { namespace Net
39 class NetAccountManager;
40 class _PsSystemNetConnection;
43 : public Tizen::Base::Object
46 _NetProfileInfo(void);
47 _NetProfileInfo(const Tizen::Base::String& profileName, const Tizen::Base::String& profileDisplayName);
48 ~_NetProfileInfo(void);
50 Tizen::Base::String GetProfileName(void) const;
51 Tizen::Base::String GetProfileDisplayName(void) const;
54 Tizen::Base::String __profileName;
55 Tizen::Base::String __profileDisplayName;
58 class _NetAccountManagerImpl
59 : public Tizen::Base::Object
63 * This is the default constructor for this class.
65 * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
68 _NetAccountManagerImpl(void);
71 * This is the destructor for this class.
73 ~_NetAccountManagerImpl(void);
76 * @see NetAccountManager::Construct()
78 result Construct(void);
81 * @see NetAccountManager::CreateNetAccount()
83 NetAccountId CreateNetAccount(NetAccountInfo& netAccountInfo);
86 * @see NetAccountManager::DeleteNetAccount()
88 result DeleteNetAccount(NetAccountId netAccountId);
91 * @see NetAccountManager::UpdateNetAccount()
93 result UpdateNetAccount(const NetAccountInfo& netAccountInfo);
96 * @see NetAccountManager::GetNetAccountId()
98 NetAccountId GetNetAccountId(const Tizen::Base::String& netAccountName) const;
101 * @see NetAccountManager::GetNetAccountId()
103 NetAccountId GetNetAccountId(NetBearerType netBearerType) const;
106 * @see NetAccountManager::GetNetAccountInfoN()
108 NetAccountInfo* GetNetAccountInfoN(NetAccountId netAccountId) const;
111 * @see NetAccountManager::GetNetAccountIdsN()
113 Tizen::Base::Collection::IListT<NetAccountId>* GetNetAccountIdsN(void) const;
116 * @see NetAccountManager::GetNetAccountNamesN()
118 Tizen::Base::Collection::IList* GetNetAccountNamesN(void) const;
121 * @see NetAccountManager::GetNetPreference()
123 NetPreferenceType GetNetPreference(void) const;
126 * @see NetAccountManager::SetNetPreference()
128 result SetNetPreference(NetPreferenceType netPreference);
132 * Gets the Impl instance.
135 * @return The pointer to _NetAccountManagerImpl
136 * @param[in] netAccountManager An instance of NetAccountManager
138 static _NetAccountManagerImpl* GetInstance(NetAccountManager& netAccountManager);
141 * Gets the Impl instance.
144 * @return The pointer to _NetAccountManagerImpl
145 * @param[in] netAccountManager An instance of NetAccountManager
147 static const _NetAccountManagerImpl* GetInstance(const NetAccountManager& netAccountManager);
150 static void* GetPsProfileHandleN(const Tizen::Base::String& profileName);
151 static void* GetWifiProfileHandleN(void);
152 static _NetProfileInfo GetInternetProfileInfo(void);
153 static _NetProfileInfo GetMmsProfileInfo(void);
154 static Tizen::Base::Collection::IList* GetAppProfileNamesN(void);
155 static Tizen::Base::Collection::IList* GetAllProfileInfosN(void);
156 static NetAccountInfo* CreateWifiNetAccountInfoN(void* pProfileInfo);
160 * This is the copy constructor for this class. @n
161 * Do @b not use directly.
163 * @param[in] rhs An instance of _NetAccountManagerImpl
165 _NetAccountManagerImpl(const _NetAccountManagerImpl& rhs);
168 * This is the assignment operator. Do @b not use directly.
170 * @param[in] rhs An instance of _NetAccountManagerImpl
172 _NetAccountManagerImpl& operator =(const _NetAccountManagerImpl& rhs);
175 std::unique_ptr<void, _ConnectionDeleter> __pConnectionHandle;
177 friend class NetAccountManager;
179 }; // _NetAccountManagerImpl
183 #endif // _FNET_INTERNAL_NET_ACCOUNT_MANAGER_IMPL_H_