remove Doxygen warning
[platform/framework/native/net.git] / inc / FNetWifiWifiSecurityInfo.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file    FNetWifiWifiSecurityInfo.h
19  * @brief   This is the header file for the %WifiSecurityInfo class.
20  *
21  * This header file contains the declarations of the %WifiSecurityInfo class.
22  */
23 #ifndef _FNET_WIFI_WIFI_SECURITY_INFO_H_
24 #define _FNET_WIFI_WIFI_SECURITY_INFO_H_
25
26 #include <FBaseObject.h>
27 #include <FNetWifiWifiTypes.h>
28
29 namespace Tizen { namespace Net { namespace Wifi
30 {
31 class _WifiSecurityInfoImpl;
32
33 /**
34  * @class   WifiSecurityInfo
35  * @brief   This class provides methods to manage the security information of a Wi-Fi network.
36  *
37  * @since   2.0
38  *
39  * The %WifiSecurityInfo class is used with the WifiNetAccountInfo class to set and get the security information of a Wi-Fi
40  * network.
41  *
42  * For more information on the class features, see
43  * <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_connectivity.htm">Wi-Fi Connectivity</a>.
44  */
45 class _OSP_EXPORT_ WifiSecurityInfo
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * This is the default constructor for this class.
51          *
52          * @since       2.0
53          */
54         WifiSecurityInfo(void);
55
56         /**
57          * Copying of objects using this copy constructor is allowed.
58          *
59          * @since       2.0
60          *
61          * @param[in]   value       An instance of %WifiSecurityInfo
62          */
63         WifiSecurityInfo(const WifiSecurityInfo& value);
64
65         /**
66          * This destructor overrides Tizen::Base::Object::~Object().
67          *
68          * @since       2.0
69          */
70         virtual ~WifiSecurityInfo(void);
71
72         /**
73          * Gets the authentication type of this account.
74          *
75          * @since       2.0
76          *
77          * @return      The authentication type of this account
78         */
79         WifiAuthenticationType GetAuthenticationType(void) const;
80
81         /**
82          * Gets the encryption type of this account.
83          *
84          * @since       2.0
85          *
86          * @return      The encryption type
87          * @remarks     If the encryption type is @c WIFI_ENCRYPTION_TKIP_AES_MIXED, either SetNetworkKeyAes() or
88          *              SetNetworkKeyTkip() can be used to set the key.
89          */
90         WifiEncryptionType GetEncryptionType(void) const;
91
92         /**
93          * @if OSPDEPREC
94          * Sets the Wired Equivalent Privacy (WEP) key data.
95          *
96          * @brief       <i> [Deprecated] </i>
97          * @deprecated  This method is deprecated because the key value does not need to set for each encryption type.
98          *              Instead of using this method, use SetNetworkKey().
99          *
100          * @since       2.0
101          *
102          * @return      An error code
103          * @param[in]   keyLen          A WifiWepKeyLen enumerator value
104          * @param[in]   keyIndex        The key index of WEP key to set
105          * @param[in]   key             The key data to set
106          * @exception   E_SUCCESS       The method is successful.
107          * @exception   E_INVALID_ARG   The length of the specified @c key exceeds @c 10 bytes when the value of @c keyLen
108          *                              is Wifi::WIFI_WEP_KEY_LEN_64BIT, or the length of the specified @c key exceeds
109          *                              @c 26 bytes when the value of @c keyLen is Wifi::WIFI_WEP_KEY_LEN_128BIT.
110          * @exception   E_SYSTEM        A system error has occurred.
111          * @endif
112          */
113         result SetNetworkKeyWep(WifiWepKeyLen  keyLen, WifiWepKeyIndex keyIndex, const Tizen::Base::String& key);
114
115         /**
116          * @if OSPDEPREC
117          * Sets the Advanced Encryption Standard (AES) key data.
118          *
119          * @brief       <i> [Deprecated] </i>
120          * @deprecated  This method is deprecated because the key value does not need to set for each encryption type.
121          *              Instead of using this method, use SetNetworkKey().
122          *
123          * @since       2.0
124          *
125          * @return      An error code
126          * @param[in]   key             The key data to set
127          * @exception   E_SUCCESS       The method is successful.
128          * @exception   E_INVALID_ARG   The length of the specified @c key exceeds @c 64 bytes.
129          * @exception   E_SYSTEM        A system error has occurred.
130          * @endif
131          */
132         result SetNetworkKeyAes(const Tizen::Base::String& key);
133
134         /**
135          * @if OSPDEPREC
136          * Sets the Temporal Key Integrity Protocol (TKIP) key data.
137          *
138          * @brief       <i> [Deprecated] </i>
139          * @deprecated  This method is deprecated because the key value does not need to set for each encryption type.
140          *              Instead of using this method, use SetNetworkKey().
141          *
142          * @since       2.0
143          *
144          * @return      An error code
145          * @param[in]   key             The key data to set
146          * @exception   E_SUCCESS       The method is successful.
147          * @exception   E_INVALID_ARG   The length of the specified @c key exceeds @c 64 bytes.
148          * @exception   E_SYSTEM        A system error has occurred.
149          * @endif
150          */
151         result SetNetworkKeyTkip(const Tizen::Base::String& key);
152
153         /**
154          * Sets the Extensible Authentication Protocol (EAP) method information.
155          *
156          * @since       2.0
157          *
158          * @return      An error code
159          * @param[in]   type                        The EAP method type
160          * @param[in]   userId                      The user ID to set @n
161          *                                          Its length must not exceed @c 256 bytes.
162          * @param[in]   password                    The password to set @n
163          *                                          Its length must not exceed @c 256 bytes.
164          * @param[in]   validateServerCertificate   Set to @c true to determine the validation of the server certificate, @n
165          *                                          else @c false
166          * @exception   E_SUCCESS                   The method is successful.
167          * @exception   E_INVALID_ARG               The length of the specified @c userId or @c password exceeds @c 256 bytes.
168          * @exception   E_UNSUPPORTED_TYPE          The input @c type is not supported.
169          * @exception   E_SYSTEM                    A system error has occurred.
170          */
171         result SetEapMethodInfo(WifiEapType type, const Tizen::Base::String& userId, const Tizen::Base::String& password, bool validateServerCertificate = true);
172
173         /**
174          * Sets the network key.
175          *
176          * @since       2.0
177          *
178          * @param[in]   key         The network key
179          */
180         void SetNetworkKey(const Tizen::Base::String& key);
181
182         /**
183          * Sets the authentication type.
184          *
185          * @since       2.0
186          *
187          * @param[in]   authType    The authentication type
188          */
189         void SetAuthenticationType(WifiAuthenticationType authType);
190
191         /**
192          * Checks whether the specified instance of %WifiSecurityInfo equals the current instance.
193          *
194          * @since       2.0
195          *
196          * @return      @c true if the specified instance equals the current instance, @n
197          *              else @c false
198          * @param[in]   obj         An instance of %WifiSecurityInfo
199          * @remarks     This method returns @c false if the specified object is not %WifiSecurityInfo.
200          */
201         virtual bool Equals(const Tizen::Base::Object& obj) const;
202
203         /**
204          * Gets the hash value of the current instance.
205          *
206          * @since       2.0
207          *
208          * @return      The hash value of the current instance
209          */
210         virtual int GetHashCode(void) const;
211
212         /**
213          * Assigns the value of the specified instance to the current instance of %WifiSecurityInfo.
214          *
215          * @since       2.0
216          *
217          * @return      The reference of this instance
218          * @param[in]   rhs         An instance of %WifiSecurityInfo
219          */
220         WifiSecurityInfo& operator=(const WifiSecurityInfo& rhs);
221
222 private:
223         _WifiSecurityInfoImpl* __pWifiSecurityInfoImpl;
224
225         friend class _WifiSecurityInfoImpl;
226 }; // WifiSecurityInfo
227
228 } } } //Tizen::Net::Wifi
229 #endif // _FNET_WIFI_WIFI_SECURITY_INFO_H_