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 FNetWifi_WifiSecurityInfoImpl.h
19 * @brief This is the header file for the _WifiSecurityInfoImpl class.
22 * This header file contains declarations of the _WifiSecurityInfoImpl class.
25 #ifndef _FNET_WIFI_INTERNAL_WIFI_SECURITY_INFO_IMPL_H_
26 #define _FNET_WIFI_INTERNAL_WIFI_SECURITY_INFO_IMPL_H_
28 #include <FOspConfig.h>
29 #include <FBaseObject.h>
30 #include <FNetWifiWifiTypes.h>
31 #include "FNetWifi_WifiUtility.h"
33 namespace Tizen { namespace Net { namespace Wifi
35 class WifiSecurityInfo;
37 * @class _WifiSecurityInfoImpl
38 * @brief This class provides extended methods to manage the additional security information of a Wi-Fi network.
41 * This class is used with the WifiSecurityInfo class to set and get the additional security information of a Wi-Fi network.
44 class _OSP_EXPORT_ _WifiSecurityInfoImpl
45 : public Tizen::Base::Object
51 * This is the default constructor for this class.
53 _WifiSecurityInfoImpl(void);
56 * Copying of objects using this copy constructor is allowed.
59 _WifiSecurityInfoImpl(const _WifiSecurityInfoImpl& value);
62 * This destructor overrides Tizen::Base::Object::~Object().
65 ~_WifiSecurityInfoImpl(void);
68 * @see WifiSecurityInfo::GetAuthenticationType()
70 WifiAuthenticationType GetAuthenticationType(void) const;
73 * @see WifiSecurityInfo::GetEncryptionType()
75 WifiEncryptionType GetEncryptionType(void) const;
78 * @see WifiSecurityInfo::SetNetworkKeyWep()
80 result SetNetworkKeyWep(WifiWepKeyLen keyLen, WifiWepKeyIndex keyIndex, const Tizen::Base::String& key);
83 * @see WifiSecurityInfo::SetNetworkKeyAes()
85 result SetNetworkKeyAes(const Tizen::Base::String& key);
88 * @see WifiSecurityInfo::SetNetworkKeyTkip()
90 result SetNetworkKeyTkip(const Tizen::Base::String& key);
93 * @see WifiSecurityInfo::SetEapMethodInfo()
95 result SetEapMethodInfo(WifiEapType type, const Tizen::Base::String& userId, const Tizen::Base::String& password, bool validateServerCertificate = true);
98 * Gets the type of EAP.
100 * @return The EAP type
102 WifiEapType GetEapType(void) const;
105 * Gets the user ID of EAP.
109 Tizen::Base::String GetEapUserId(void) const;
112 * Gets the password of EAP
116 Tizen::Base::String GetEapPassword(void) const;
119 bool GetValidateServerCertificate(void) const;
122 * @see WifiSecurityInfo::SetNetworkKey()
124 void SetNetworkKey(const Tizen::Base::String& key);
127 * @see WifiSecurityInfo::SetAuthenticationType()
129 void SetAuthenticationType(WifiAuthenticationType type);
132 * Gets the network key
134 * @return The network key
136 Tizen::Base::String GetNetworkKey(void) const;
139 * Sets the encryption type of this account.
141 * @param[in] encryptionType The encryption type
143 void SetEncryptionType(WifiEncryptionType encryptionType);
146 * @see WifiSecurityInfo::Equals()
148 virtual bool Equals(const Tizen::Base::Object& obj) const;
151 * @see WifiSecurityInfo::GetHashCode()
153 virtual int GetHashCode(void) const;
156 * Gets the Impl instance.
159 * @return The pointer to %_WifiSecurityInfoImpl
160 * @param[in] wifiSecurityInfo An instance of %WifiSecurityInfo
162 static _WifiSecurityInfoImpl* GetInstance(WifiSecurityInfo& wifiSecurityInfo);
165 * Gets the Impl instance.
168 * @return The pointer to %_WifiSecurityInfoImpl
169 * @param[in] wifiSecurityInfo An instance of %WifiSecurityInfo
171 static const _WifiSecurityInfoImpl* GetInstance(const WifiSecurityInfo& wifiSecurityInfo);
174 * @see WifiSecurityInfo::GetHashCode()
176 _WifiSecurityInfoImpl& operator=(const _WifiSecurityInfoImpl& rhs);
180 * @brief Defines IEEE 802.11 security info with the WEP encryption.
182 struct WifiNetworkKeyWep
184 WifiWepKeyLen keyLen;
185 WifiWepKeyIndex keyIndex;
189 * @brief Defines Information of EAP method.
191 struct WifiEapMethodInfo
193 WifiEapType eapType; //< EAP method type.
194 bool validateCertificate; //< The option to validate server certificate.
195 Tizen::Base::String userId;
196 Tizen::Base::String password;
198 WifiAuthenticationType __authenticationType;
199 WifiEncryptionType __encryptionType;
200 WifiNetworkKeyWep __webKeyInfo;
201 WifiEapMethodInfo __eapInfo;
202 Tizen::Base::String __networkKey;
204 }; // _WifiSecurityInfoImpl
206 } } } //Tizen::Net::Wifi
208 #endif // _FNET_WIFI_INTERNAL_WIFI_SECURITY_INFO_IMPL_H_