68bc6ab6d057ff95a3814d280e1d145c9a16adc2
[framework/osp/net.git] / inc / FNetWifiWifiDirectGroupInfo.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    FNetWifiWifiDirectGroupInfo.h
19  * @brief   This is the header file for the %WifiDirectGroupInfo class.
20  *
21  * This header file contains the declarations of the %WifiDirectGroupInfo class.
22  */
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_
25
26 #include <FBaseObject.h>
27 #include <FNetWifiWifiTypes.h>
28
29 namespace Tizen { namespace Net { namespace Wifi
30 {
31 class _WifiDirectGroupInfoImpl;
32
33 /**
34  * @class   WifiDirectGroupInfo
35  * @brief   This class provides methods for the Wi-Fi Direct group information.
36  *
37  * @since   2.0
38  *
39  * The %WifiDirectGroupInfo class provides methods to get or set the information for a Wi-Fi Direct group.
40  */
41
42 class _OSP_EXPORT_ WifiDirectGroupInfo
43         : public Tizen::Base::Object
44 {
45 public:
46         /**
47          * This is the default constructor for this class.
48          *
49          * @since       2.0
50          */
51         WifiDirectGroupInfo(void);
52
53         /**
54          * Copying of objects using this copy constructor is allowed.
55          *
56          * @since       2.0
57          *
58          * @param[in]   value   An instance of %WifiDirectGroupInfo
59          */
60         WifiDirectGroupInfo(const WifiDirectGroupInfo& value);
61
62         /**
63          * This is the destructor for this class.
64          *
65          * @since       2.0
66          */
67         virtual ~WifiDirectGroupInfo(void);
68
69         /**
70          * @if OSPDEPREC
71          * Gets the autonomous group owner mode.
72          *
73          * @brief       <i> [Deprecated] </i>
74          * @deprecated  This method is deprecated because this class has been modified and is now composed of information
75          *              exclusively required to configure a group. @n
76          *              So, a new API has been added. Instead of using this API, use
77          *              WifiDirectDevice::CreateAutonomousGroup() API.
78
79          *
80          * @since       2.0
81          *
82          * @return      @c true if the autonomous group owner mode is activated, @n
83          *              else @c false
84          * @endif
85          */
86         bool GetAutonomousGroupOwnerMode(void) const;
87
88         /**
89          * Gets the intent of a group owner. @n It is used during the negotiation phase.
90          *
91          * @since       2.0
92          *
93          * @return      An intent value
94          */
95         int GetGroupOwnerIntent(void) const;
96
97         /**
98          * Gets the maximum number of clients to be associated.
99          *
100          * @since       2.0
101          *
102          * @return      The maximum number of clients to be associated
103          */
104         int GetMaxNumberOfClients(void) const;
105
106         /**
107          * @if OSPDEPREC
108          * @{
109          * Gets the SSID.
110          *
111          * @if OSPCOMPAT
112          * @brief       <i> [Deprecated] [Compatibility] </i>
113          * @endif
114          * @deprecated  This method is deprecated because this class has been modified and is now composed of information
115          *              that is exclusively required to configure a group. @n
116          *              So, new APIs have been added. Instead of using the %GetSsid() method, use the
117          *              WifiDirectDevice::GetGroupOwnerInfoN() or WifiDirectDevice::GetLocalDeviceInfo() method.
118          *
119          * @since       2.0
120          * @if OSPCOMPAT
121          * @compatibility   This method has compatibility issues with OSP compatible applications. @n
122          *                  For more information, see the issue description for @ref CompWifiDirectGroupInfoGetSsidPage "here".
123          * @endif
124          * @return      The SSID
125          * @}
126          * @endif
127          */
128         Tizen::Base::String GetSsid(void) const;
129
130         /**
131          * @if OSPCOMPAT
132          * @page        CompWifiDirectGroupInfoGetSsidPage Compatibility for GetSsid().
133          * @section     CompWifiDirectGroupInfoGetSsidPageIssueSection Issues
134          *              Implementing this method in OSP compatible applications has the following issues: @n
135          *              -# The method returns the SSID which is the same as the device name.
136          *
137          * @section     CompWifiDirectGroupInfoGetSsidPageSolutionSection  Resolutions
138          *              This issue has been resolved in Tizen @n
139          *              -# The method returns the SSID which has 'Direct-xy' as its prefix. The 'xy' is two ASCII
140          *                 characters or digits thesystem generates randomly.
141          * @endif
142          */
143
144         /**
145          * @if OSPDEPREC
146          * Gets the BSS ID.
147          *
148          * @brief       <i> [Deprecated] </i>
149          * @deprecated  This method is deprecated because this class has been modified and is now composed of information
150          *              that is exclusively required to configure a group. @n
151          *              So, a new API has been added. Instead of using the %GetBssId() method, use the
152          *              WifiDirectDevice::GetGroupOwnerInfoN() method.
153          *
154          * @since       2.0
155          *
156          * @return      The BSS ID
157          * @endif
158          */
159         Tizen::Base::String GetBssId(void) const;
160
161         /**
162          * @if OSPDEPREC
163          * Gets the index of a currently working channel.
164          *
165          * @brief       <i> [Deprecated] </i>
166          * @deprecated  This method is deprecated because this class has been modified and is now composed of information
167          *              exclusively required to configure a group. @n
168          *              So this API has been moved to the WifiDirectDevice class.
169          *
170          * @since       2.0
171          *
172          * @return      The Wi-Fi radio channel
173          * @endif
174          */
175         WifiRadioChannel GetOperatingChannel(void) const;
176
177         /**
178          * @if OSPDEPREC
179          * Sets the mode for an autonomous group owner.
180          *
181          * @brief       <i> [Deprecated] </i>
182          * @deprecated  This method is deprecated because this class has been modified and is now composed of information
183          *              exclusively required to configure a group. @n
184          *              So, a new API has been added. Instead of using the %SetAutonomousGroupOwnerMode() method, use the
185          *              WifiDirectDevice::CreateAutonomousGroup() method.
186          *
187          * @since       2.0
188          *
189          * @param[in]   mode            Set to @c true if autonomous group owner mode is enabled, @n
190          *                              else @c false
191          * @endif
192          */
193         void SetAutonomousGroupOwnerMode(bool mode);
194
195         /**
196          * Sets the intent of a group owner.
197          *
198          * @since       2.0
199          *
200          * @return      An error code
201          * @param[in]   intent          The intent to become a group owner
202          * @exception   E_SUCCESS       The method is successful.
203          * @exception   E_INVALID_ARG   Either the specified @c intent is less than @c 0, or exceeds
204          *                              Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT.
205          * @remarks
206          *              - A higher intent value means that the intent to become a group owner is higher.
207          *              - If Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT is selected, it means that a device insists to be a
208          *                group owner only.
209          *              - If two devices participating in a group creation select the intent value as
210          *                Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT, the group creation fails.
211          */
212         result SetGroupOwnerIntent(int intent);
213
214         /**
215          * Sets the maximum number of clients to be associated.
216          *
217          * @since       2.0
218          *
219          * @return      An error code
220          * @param[in]   numberOfClient  The maximum number of clients to associate
221          * @exception   E_SUCCESS       The method is successful.
222          * @exception   E_INVALID_ARG   Either the specified @c numberOfClient is less than @c 0 or exceeds
223          *                              Wifi::MAX_WIFI_DIRECT_CONNECTED_CLIENTS.
224          */
225         result SetMaxNumberOfClients(int numberOfClient);
226
227         /**
228          * Checks whether the specified instance of %WifiDirectGroupInfo equals the current instance.
229          *
230          * @since       2.0
231          *
232          * @return      @c true if the specified instance equals the current instance, @n
233          *              else @c false
234          * @param[in]   obj             An instance of %WifiDirectGroupInfo
235          * @remarks     This method returns @c false if the specified object is not %WifiDirectGroupInfo.
236          */
237         virtual bool Equals(const Tizen::Base::Object& obj) const;
238
239         /**
240          * Gets the hash value of the current instance.
241          *
242          * @since       2.0
243          *
244          * @return      The hash value of the current instance
245          */
246         virtual int GetHashCode(void) const;
247
248         /**
249          * Assigns the value of the specified instance to the current instance of %WifiDirectGroupInfo.
250          *
251          * @since       2.0
252          *
253          * @return      A reference to the %WifiDirectGroupInfo instance
254          * @param[in]   rhs             An instance of %WifiDirectGroupInfo
255          */
256         WifiDirectGroupInfo& operator =(const WifiDirectGroupInfo& rhs);
257
258 private:
259         _WifiDirectGroupInfoImpl* __pWifiDirectGroupInfoImpl;
260
261         friend class _WifiDirectGroupInfoImpl;
262 }; // WifiDirectGroupInfo
263
264 } } } // Tizen::Net::Wifi
265 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_