Initialize Tizen 2.3
[framework/osp/net.git] / src / inc / FNetWifi_WifiBssInfoImpl.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 /**
19  * @file    FNetWifi_WifiBssInfoImpl.h
20  * @brief   This is the header file for the %_WifiBssInfoImpl class.
21  *
22  * This header file contains the declarations of the %_WifiBssInfoImpl class.
23  */
24
25 #ifndef _FNET_WIFI_INTERNAL_WIFI_BSS_INFO_IMPL_H_
26 #define _FNET_WIFI_INTERNAL_WIFI_BSS_INFO_IMPL_H_
27
28 #include <FOspConfig.h>
29 #include <FBaseObject.h>
30 #include <FNetWifiWifiTypes.h>
31 #include <FNetWifiWifiSecurityInfo.h>
32
33 namespace Tizen { namespace Net
34 {
35 class IpAddress;
36 } }
37
38 namespace Tizen { namespace Net { namespace Wifi
39 {
40
41 class WifiBssInfo;
42
43 /**
44  * @class   _WifiBssInfoImpl
45  * @brief   This class provides the methods for managing the BSS information of a Wi-Fi network.
46  *
47  * This class provides the methods for managing the BSS information of a Wi-Fi network.
48  */
49 class _OSP_EXPORT_ _WifiBssInfoImpl
50         : public Tizen::Base::Object
51 {
52 public:
53         /**
54          * This is the default constructor for this class.
55          *
56          * @since   1.0
57          */
58         _WifiBssInfoImpl(void);
59
60         /**
61          * This is the copy constructor for the _WifiBssInfoImpl class.
62          *
63          * @param[in]   value   An instance of %_WifiBssInfoImpl
64          */
65         _WifiBssInfoImpl(const _WifiBssInfoImpl& value);
66
67         /**
68          * This destructor overrides Tizen::Base::Object::~Object().
69          *
70          */
71         virtual ~_WifiBssInfoImpl(void);
72
73         /**
74          * @see WifiBssInfo::GetSsid()
75          */
76         Tizen::Base::String GetSsid(void) const;
77
78         /**
79          * @see WifiBssInfo::GetBssId()
80          */
81         Tizen::Base::String GetBssId(void) const;
82
83         /**
84          * @see WifiBssInfo::GetBssType()
85          */
86         WifiBssType GetBssType(void) const;
87
88         /**
89          * @see WifiBssInfo::GetRadioChannel()
90          */
91         WifiRadioChannel GetRadioChannel(void) const;
92
93         /**
94          * @see WifiBssInfo::GetSecurityInfo()
95          */
96         const WifiSecurityInfo* GetSecurityInfo(void) const;
97
98         /**
99          * @see WifiBssInfo::GetRssi()
100          */
101         long GetRssi(void) const;
102
103         /**
104          * @see WifiBssInfo::GetDataRate()
105          */
106         float GetDataRate(void) const;
107
108         /**
109          * Gets the Access Point handler
110          * @return  The pointer to wifi ap handler
111          */
112         void* GetBssHandle(void) const;
113
114         /**
115          * Allocates Instance of %WifiBssInfo.
116          *
117          * @since 2.1
118          * @return  WifiBssInfo
119          *
120          */
121         static WifiBssInfo* CreateWifiBssInfoN(void);
122
123         /**
124          * Sets the SSID of this BSS.
125          *
126          * @param[in]   ssid    The SSID
127          */
128         void SetSsid(const Tizen::Base::String& ssid);
129
130         /**
131          * Sets the ID of this BSS.
132          *
133          * @param[in]   bssId   The BSSID in the form '00-00-00-00-00-00'
134          */
135         void SetBssId(const Tizen::Base::String& bssid);
136
137         /**
138          * Sets the type of this BSS.
139          *
140          * @param[in]   bssType     The type of this BSS
141          */
142         void SetBssType(WifiBssType bssType);
143
144         /**
145          * Sets the radio channel of this BSS.
146          *
147          * @param[in]   channel     The radio channel of this BSS
148          */
149         void SetRadioChannel(WifiRadioChannel channel);
150
151         /**
152          * Sets the security information of this BSS.
153          *
154          * @param[in]   secuInfo    The authentication and encryption type of this BSS
155          */
156         void SetSecurityInfo(const WifiSecurityInfo& securityInfo);
157
158         /**
159          * Sets the Received Signal Strength Indication (RSSI) value of BSS at scanning time
160          *
161          * @param[in]   rssi    The RSSI value (dB)
162          */
163         void SetRssi(long rssi);
164
165         /**
166          * Sets the data rate of this BSS.
167          *
168          * @param[in]   dataRate    The data rate value (Mbps)
169          * @remarks     If the supported data rate is unknown, default value is @c -1.0.
170          */
171         void SetDataRate(float dataRate);
172
173         /**
174          * Sets the halder for wifi ap.
175          *
176          * @param[in]   pApHandle    A handle of access point
177          */
178         void SetBssHandle(void* pApHandle);
179
180         /**
181          * @see WifiBssInfo::IsKnown()
182          */
183         bool IsKnown(void) const;
184
185         /**
186          * Sets the access point (BSS) is known or not.
187          *
188          * @param[in]   isKnown    @c true if the access point is known, @n
189          *                         else @c false
190          * @see WifiBssInfo::SetUnknown()
191          */
192         void SetKnown(bool isKnown);
193
194         /**
195          * @see WifiBssInfo::GetLocalAddressScheme()
196          */
197         Tizen::Net::NetAddressScheme GetLocalAddressScheme(void) const;
198
199         /**
200          * @see WifiBssInfo::SetLocalAddressScheme()
201          */
202         void SetLocalAddressScheme(Tizen::Net::NetAddressScheme scheme);
203
204         /**
205          * @see WifiBssInfo::GetLocalAddress()
206          */
207         const Tizen::Net::IpAddress* GetLocalAddress(void) const;
208
209         /**
210          * @see WifiBssInfo::SetLocalAddress()
211          */
212         result SetLocalAddress(const Tizen::Net::IpAddress* pAddress);
213
214         /**
215          * @see WifiBssInfo::GetSubnetMaskAddress()
216          */
217         const Tizen::Net::IpAddress* GetSubnetMaskAddress(void) const;
218
219         /**
220          * @see WifiBssInfo::SetSubnetMaskAddress()
221          */
222         result SetSubnetMaskAddress(const Tizen::Net::IpAddress* pAddress);
223
224         /**
225          * @see WifiBssInfo::GetDefaultGatewayAddress()
226          */
227         const Tizen::Net::IpAddress* GetDefaultGatewayAddress(void) const;
228
229         /**
230          * @see WifiBssInfo::SetDefaultGatewayAddress()
231          */
232         result SetDefaultGatewayAddress(const Tizen::Net::IpAddress* pAddress);
233
234         /**
235          * @see WifiBssInfo::GetPrimaryDnsAddress()
236          */
237         const Tizen::Net::IpAddress* GetPrimaryDnsAddress(void) const;
238
239         /**
240          * @see WifiBssInfo::SetPrimaryDnsAddress()
241          */
242         result SetPrimaryDnsAddress(const Tizen::Net::IpAddress* pAddress);
243
244         /**
245          * @see WifiBssInfo::GetSecondaryDnsAddress()
246          */
247         const Tizen::Net::IpAddress* GetSecondaryDnsAddress(void) const;
248
249         /**
250          * @see WifiBssInfo::SetSecondaryDnsAddress()
251          */
252         result SetSecondaryDnsAddress(const Tizen::Net::IpAddress* pAddress);
253
254         /**
255          * @see WifiBssInfo::GetProxyType()
256          */
257         Tizen::Net::NetProxyType GetProxyType(void) const;
258
259         /**
260          * @see WifiBssInfo::SetProxyType()
261          */
262         void SetProxyType(Tizen::Net::NetProxyType type);
263
264         /**
265          * @see WifiBssInfo::GetProxyAddress()
266          */
267         Tizen::Base::String GetProxyAddress(void) const;
268
269         /**
270          * @see WifiBssInfo::SetProxyAddress()
271          */
272         result SetProxyAddress(const Tizen::Base::String& address);
273
274         /**
275          * @see WifiBssInfo::Equals()
276          */
277         virtual bool Equals(const Tizen::Base::Object& obj) const;
278
279         /**
280          * Gets the hash value of the current instance.
281          *
282          * @return   The hash value of the current instance
283          */
284         virtual int GetHashCode(void) const;
285
286         /**
287          * Gets the Impl instance.
288          *
289          * @return  The pointer to %_WifiBssInfoImpl
290          * @param[in]   wifiBssInfo   An instance of %WifiBssInfo
291          */
292         static _WifiBssInfoImpl* GetInstance(WifiBssInfo& wifiBssInfo);
293
294         /**
295          * Gets the Impl instance.
296          *
297          * @return  The pointer to %_WifiBssInfoImpl
298          * @param[in]   wifiBssInfo   An instance of %WifiBssInfo
299          */
300         static const _WifiBssInfoImpl* GetInstance(const WifiBssInfo& wifiBssInfo);
301
302         /**
303          * Copying of objects using this copy assignment operator is allowed.
304          *
305          * @return      The reference of this instance
306          * @param[in]   rhs   A reference to the %_WifiBssInfoImpl instance to be copied
307          */
308         _WifiBssInfoImpl& operator =(const _WifiBssInfoImpl& rhs);
309
310 private:
311         Tizen::Base::String __ssid;
312         Tizen::Base::String __bssid;
313         WifiBssType __bssType;
314         WifiRadioChannel __channel;
315         WifiSecurityInfo __securityInfo;
316         long __rssi;
317         float __dataRate;
318         bool __isKnown;
319         Tizen::Net::NetAddressScheme __scheme;
320         Tizen::Net::IpAddress* __pLocalAddress;
321         Tizen::Net::IpAddress* __pMaskAddress;
322         Tizen::Net::IpAddress* __pGatewayAddress;
323         Tizen::Net::IpAddress* __pPriDnsAddress;
324         Tizen::Net::IpAddress* __pSecDnsAddress;
325         Tizen::Net::NetProxyType __proxyType;
326         Tizen::Base::String __proxyAddress;
327         void* __pApHandle;
328
329 }; // _WifiBssInfoImpl
330
331 } } } //Tizen::Net::Wifi
332
333 #endif // _FNET_WIFI_INTERNAL_WIFI_BSS_INFO_IMPL_H_