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