c67f02fac504e6e5603035d7a229ec16451c092c
[platform/core/connectivity/libwifi-direct.git] / include / wifi-direct.h
1 /*
2  * libwifi-direct
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Sungsik Jang <sungsik.jang@samsung.com>, Dongwook Lee <dwmax.lee@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __WIFI_DIRECT_INTERFACE_H_
23 #define __WIFI_DIRECT_INTERFACE_H_
24
25 #include <errno.h>
26 #include <stdbool.h>
27
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32
33
34 /**
35  * @addtogroup CAPI_NET_WIFI_DIRECT_MODULE
36  * @{
37  */
38
39 /**
40  * @brief Enumeration for Wi-Fi Direct error code
41  */
42 typedef enum
43 {
44         WIFI_DIRECT_ERROR_NONE = 0,  /**< Successful */
45         WIFI_DIRECT_ERROR_NOT_PERMITTED = -EPERM,  /** Operation not permitted(1) */
46         WIFI_DIRECT_ERROR_OUT_OF_MEMORY = -ENOMEM,  /** Out of memory(12) */
47         WIFI_DIRECT_ERROR_RESOURCE_BUSY = -EBUSY,  /** Device or resource busy(16) */
48         WIFI_DIRECT_ERROR_INVALID_PARAMETER = -EINVAL,  /** Invalid function parameter(22) */
49         WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT = -ETIMEDOUT,  /**< Connection timed out(110) */
50         WIFI_DIRECT_ERROR_NOT_INITIALIZED = -0x00008000|0x0201,  /**< Not initialized */
51         WIFI_DIRECT_ERROR_COMMUNICATION_FAILED = -0x00008000|0x0202,  /**< I/O error */
52         WIFI_DIRECT_ERROR_WIFI_USED = -0x00008000|0x0203,  /**< WiFi is being used */
53         WIFI_DIRECT_ERROR_MOBILE_AP_USED = -0x00008000|0x0204,  /**< Mobile AP is being used */
54         WIFI_DIRECT_ERROR_CONNECTION_FAILED = -0x00008000|0x0205,  /**< Connection failed */
55         WIFI_DIRECT_ERROR_AUTH_FAILED = -0x00008000|0x0206,  /**< Authentication failed */
56         WIFI_DIRECT_ERROR_OPERATION_FAILED = -0x00008000|0x0207,  /**< Operation failed */
57         WIFI_DIRECT_ERROR_TOO_MANY_CLIENT = -0x00008000|0x0208,  /**< Too many client */
58         WIFI_DIRECT_ERROR_ALREADY_INITIALIZED = -0x00008000|0x0209,  /**< Already initialized client */
59         WIFI_DIRECT_ERROR_CONNECTION_CANCELED,  /**< Connection canceled by local device */
60 } wifi_direct_error_e;
61
62 /**
63  * @brief Enumeration for Wi-Fi Direct link status
64  */
65 typedef enum
66 {
67         WIFI_DIRECT_STATE_DEACTIVATED = 0,
68                                                                         /**< */
69         WIFI_DIRECT_STATE_DEACTIVATING, /**< */
70         WIFI_DIRECT_STATE_ACTIVATING,           /**< */
71         WIFI_DIRECT_STATE_ACTIVATED,            /**< */
72         WIFI_DIRECT_STATE_DISCOVERING,  /**< */
73         WIFI_DIRECT_STATE_CONNECTING,   /**< */
74         WIFI_DIRECT_STATE_DISCONNECTING,        /**< */
75         WIFI_DIRECT_STATE_CONNECTED,            /**< */
76         WIFI_DIRECT_STATE_GROUP_OWNER   /**< */
77 } wifi_direct_state_e;
78
79 /**
80  * @brief Enumeration for Wi-Fi Direct device state
81  */
82 typedef enum
83 {
84         WIFI_DIRECT_DEVICE_STATE_ACTIVATED,
85         WIFI_DIRECT_DEVICE_STATE_DEACTIVATED,
86 } wifi_direct_device_state_e;
87
88 /**
89  * @brief Enumeration for Wi-Fi Direct discovery state
90  */
91 typedef enum
92 {
93         WIFI_DIRECT_ONLY_LISTEN_STARTED,
94         WIFI_DIRECT_DISCOVERY_STARTED,
95         WIFI_DIRECT_DISCOVERY_FOUND,
96         WIFI_DIRECT_DISCOVERY_FINISHED,
97 } wifi_direct_discovery_state_e;
98
99 /**
100  * @brief Enumeration for Wi-Fi Direct connection state
101  */
102 typedef enum
103 {
104         WIFI_DIRECT_CONNECTION_REQ,                     /**< */
105         WIFI_DIRECT_CONNECTION_WPS_REQ,         /**< */
106         WIFI_DIRECT_CONNECTION_IN_PROGRESS,                     /**< */
107         WIFI_DIRECT_CONNECTION_RSP,                     /**< */
108         WIFI_DIRECT_DISASSOCIATION_IND,                 /**< */
109         WIFI_DIRECT_DISCONNECTION_RSP,                  /**< */
110         WIFI_DIRECT_DISCONNECTION_IND,                  /**< */
111         WIFI_DIRECT_GROUP_CREATED,                      /**< */
112         WIFI_DIRECT_GROUP_DESTROYED,                    /**< */
113         WIFI_DIRECT_INVITATION_REQ,
114 } wifi_direct_connection_state_e;
115
116 /**
117  * @brief Enumeration for Wi-Fi Direct secondary device type
118  */
119 typedef enum
120 {
121         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_PC = 1,                      /**< */
122         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_SERVER = 2,          /**< */
123         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MEDIA_CTR = 3,       /**< */
124         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_UMPC = 4,            /**< */
125         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NOTEBOOK = 5,        /**< */
126         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_DESKTOP = 6,         /**< */
127         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MID = 7,                     /**< */
128         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NETBOOK = 8,         /**< */
129         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_KEYBOARD = 1,                           /**< */
130         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_MOUSE = 2,                      /**< */
131         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_JOYSTICK = 3,           /**< */
132         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TRACKBALL = 4,          /**< */
133         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_CONTROLLER = 5,         /**< */
134         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_REMOTE = 6,                     /**< */
135         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TOUCHSCREEN = 7,/**< */
136         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BIO_READER = 8,         /**< */
137         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BAR_READER = 9,         /**< */
138         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_PRINTER = 1,          /**< */
139         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_SCANNER = 2,          /**< */
140         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_FAX = 3,                              /**< */
141         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_COPIER = 4,           /**< */
142         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_ALLINONE = 5,         /**< */
143         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_DIGITAL_STILL = 1,             /**< */
144         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_VIDEO = 2,                     /**< */
145         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_WEBCAM = 3,            /**< */
146         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_SECONDARYURITY = 4,    /**< */
147         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_STORAGE_NAS = 1,                      /**< */
148         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_AP = 1,                                 /**< */
149         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_ROUTER = 2,                     /**< */
150         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_SWITCH = 3,                     /**< */
151         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_GATEWAY = 4,            /**< */
152         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_TV = 1,                               /**< */
153         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PIC_FRAME = 2,        /**< */
154         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PROJECTOR = 3,        /**< */
155         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_MONITOR = 4,          /**< */
156         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_DAR = 1,                           /**< */
157         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVR = 2,                           /**< */
158         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MCX = 3,                           /**< */
159         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB = 4,                           /**< */
160         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MSMAME = 5,                /**< */
161         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP = 6,                           /**< */
162         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX = 1,                /**< */
163         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX_360 = 2,    /**< */
164         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PS = 3,                          /**< */
165         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_CONSOLE = 4,             /**< */
166         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PORTABLE = 5,    /**< */
167         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PHONE_WM = 1,                 /**< */
168         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PHONE_SINGLE = 2,             /**< */
169         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PHONE_DUAL = 3,               /**< */
170         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PHONE_SM_SINGLE = 4,
171                                                                                                                 /**< */
172         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PHONE_SM_DUAL = 5,    /**< */
173         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER = 1,              /**< */
174         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_SPEAKER = 2,    /**< */
175         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_PMP = 3,                /**< */
176         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADSET = 4,    /**< */
177         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADPHONE = 5,
178                                                                                                                 /**< */
179         WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_MIC = 6,                /**< */
180 } wifi_direct_secondary_device_type_e;
181
182 /**
183  * @brief Enumeration for Wi-Fi Direct primary device type
184  */
185 typedef enum
186 {
187         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER = 1,           /**< */
188         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_INPUT_DEVICE = 2,       /**< */
189         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_PRINTER = 3,            /**< */
190         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA = 4,             /**< */
191         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE = 5,            /**< */
192         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_NETWORK_INFRA = 6,              /**< */
193         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY = 7,            /**< */
194         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_MULTIMEDIA_DEVICE = 8,          /**< */
195         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_GAME_DEVICE = 9,        /**< */
196         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE = 10, /**< */
197         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_AUDIO = 11,             /**< */
198         WIFI_DIRECT_PRIMARY_DEVICE_TYPE_OTHER = 255                     /**< */
199 } wifi_direct_primary_device_type_e;
200
201 /**
202 * @brief Enumeration for Wi-Fi WPS type
203 */
204 typedef enum {
205         WIFI_DIRECT_WPS_TYPE_NONE = 0x00,  /**< No WPS type */
206         WIFI_DIRECT_WPS_TYPE_PBC = 0x01,  /**< Push Button Configuration */
207         WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY = 0x02,  /**< Display PIN code */
208         WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD = 0x04,  /**< Provide the keypad to input the PIN */
209 } wifi_direct_wps_type_e;
210
211
212 /**
213 * @brief Service Discovery type enumerations
214 */
215 typedef enum
216 {
217         WIFI_DIRECT_SERVICE_ALL,
218         WIFI_DIRECT_SERVICE_BONJOUR,
219         WIFI_DIRECT_SERVICE_UPNP,
220         WIFI_DIRECT_SERVICE_WSDISCOVERY,
221         WIFI_DIRECT_SERVICE_WIFIDISPLAY,
222         WIFI_DIRECT_SERVICE_VENDORSPEC = 0xff,
223 } wifi_direct_service_type_e;
224
225 typedef enum
226 {
227         WIFI_DIRECT_DISPLAY_SOURCE,
228         WIFI_DIRECT_DISPLAY_PRIMARY_SINK,
229         WIFI_DIRECT_DISPLAY_SECONDARY_SINK,
230         WIFI_DIRECT_DISPLAY_DUAL_ROLE,
231 }wifi_direct_display_type_e;
232
233 /**
234  * @struct wifi_direct_discovered_peer_info_s
235  * Wi-Fi Direct buffer structure to store result of peer discovery
236  */
237 typedef struct
238 {
239         char *device_name;  /** Null-terminated device friendly name. */
240         char *mac_address;  /** Device's P2P Device Address */
241         char *interface_address;  /** Device's P2P Interface Address. Valid only if device is a P2P GO. */
242         int channel;  /** Channel the device is listening on. */
243         bool is_connected;  /** Is peer connected*/
244         bool is_group_owner;  /** Is an active P2P Group Owner */
245         bool is_persistent_group_owner;  /** Is a stored Persistent GO */
246         wifi_direct_primary_device_type_e primary_device_type;  /** Primary category of device */
247         wifi_direct_secondary_device_type_e secondary_device_type;  /** Sub category of device */
248         int supported_wps_types;  /** The list of supported WPS type. \n
249         The OR operation on #wifi_direct_wps_type_e can be used like #WIFI_DIRECT_WPS_TYPE_PBC | #WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY */
250         char *ssid;  /**< Service set identifier - DEPRECATED */
251         unsigned int service_count;
252         char **service_list;
253         bool is_wfd_device;
254 } wifi_direct_discovered_peer_info_s;
255
256
257 /**
258  * @struct wifi_direct_connected_peer_info_s
259  * Wi-Fi Direct buffer structure to store information of connected peer
260  */
261 typedef struct
262 {
263         char* device_name;  /** Device friendly name. */
264         char* ip_address;  /**< The IP address */
265         char* mac_address;  /** Device's P2P Device Address */
266         char* interface_address;  /** Device's P2P Interface Address */
267         bool p2p_supported;  /* whether peer is a P2P device */
268         wifi_direct_primary_device_type_e       primary_device_type;  /* primary category of device */
269         int channel;  /* Operating channel */
270         char* ssid;  /**< Service set identifier - DEPRECATED */
271         unsigned int service_count;
272         char **service_list;
273         bool is_wfd_device;
274 } wifi_direct_connected_peer_info_s;
275
276 /**
277  * Notification callback function type. \n
278  *
279  * Discover notifications can occur at the peers or P2P groups are found.
280  *
281  * @param event             Specifies the types of notifications.
282  *                          - WIFI_DIRECT_DISCOVERY_STARTED
283  *                          - WIFI_DIRECT_ONLY_LISTEN_STARTED
284  *                          - WIFI_DIRECT_DISCOVERY_FOUND
285  *                          - WIFI_DIRECT_DISCOVERY_FINISHED
286  * @param error_code        In failure case.
287  * @param user_data         User can transfer the user specific data in callback.
288  *
289  */
290 typedef void (*wifi_direct_discovery_state_chagned_cb) (int error_code,
291                                                                                                                 wifi_direct_discovery_state_e discovery_state,
292                                                                                                                 void *user_data);
293
294 /**
295  * Notification callback function type. \n
296  *
297  * Activation notifications callback function type.
298  *
299  * @param event             Specifies the types of notifications.
300  *                          - WIFI_DIRECT_DEVICE_STATE_ACTIVATED
301  *                          - WIFI_DIRECT_DEVICE_STATE_DEACTIVATED
302  * @param error_code        In failure case.
303  * @param user_data         User can transfer the user specific data in callback.
304  *
305  */
306 typedef void (*wifi_direct_device_state_changed_cb) (int error_code,
307                                                                                                          wifi_direct_device_state_e device_state,
308                                                                                                          void *user_data);
309
310 /**
311  * connection notification callback function type. \n
312  *
313  * @param event             Specifies the types of notifications.
314  *                          - WIFI_DIRECT_CONNECTION_REQ
315  *                          - WIFI_DIRECT_CONNECTION_WPS_REQ
316  *                          - WIFI_DIRECT_CONNECTION_IN_PROGRESS
317  *                          - WIFI_DIRECT_CONNECTION_RSP
318  *                          - WIFI_DIRECT_DISASSOCIATION_IND
319  *                          - WIFI_DIRECT_DISCONNECTION_RSP
320  *                          - WIFI_DIRECT_DISCONNECTION_IND
321  *                          - WIFI_DIRECT_GROUP_CREATED
322  *                          - WIFI_DIRECT_GROUP_DESTROYED
323  *
324  * @param error_code        In failure case.
325  *
326  * @param param1        additional data for connection. ex) MAC
327  * @param param2        additional data for connection. ex) SSID
328  *
329  * @param user_data         User can transfer the user specific data in callback.
330  *
331  */
332 typedef void (*wifi_direct_connection_state_changed_cb) (int error_code,
333                                                                                                                  wifi_direct_connection_state_e connection_state,
334                                                                                                                  const char *mac_address,
335                                                                                                                  void *user_data);
336
337 /**
338 * @brief Called when IP address of client is assigned when your device is group owner.
339 * @param[in] mac_address  The MAC address of connection peer
340 * @param[in] ip_address  The IP address of connection peer
341 * @param[in] interface_address  The interface address of connection peer
342 * @param[in] user_data  The user data passed from the callback registration function
343 * @see wifi_direct_set_client_ip_address_assigned_cb()
344 * @see wifi_direct_unset_client_ip_address_assigned_cb()
345 */
346 typedef void (*wifi_direct_client_ip_address_assigned_cb) (const char *mac_address,
347                                                                                                                  const char *ip_address,
348                                                                                                                  const char *interface_address,
349                                                                                                                  void *user_data);
350
351 /*=============================================================================
352                                          Wifi Direct Client APIs
353 =============================================================================*/
354
355 /*****************************************************************************/
356 /* wifi_direct_initialize API function prototype
357  * int wifi_direct_initialize (void);
358  */
359 /**
360  * \brief       This API shall register the client application with the Wi-Fi Direct server and  initialize the various variables. \n
361  *
362  * \pre None.
363  *
364  * \post Application is registered.
365  *
366  * \see wifi_direct_device_state_changed_cb
367  * \see wifi_direct_discovery_state_chagned_cb
368  * \see wifi_direct_connection_state_changed_cb
369  *
370  * \par Sync (or) Async:
371  * This is a Synchronous API.
372  *
373  * \warning
374  *  None
375  *
376  * \return Return Type (int) \n
377  *
378  * - WIFI_DIRECT_ERROR_NONE on success \n
379  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
380  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
381  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
382  * - WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for "Too many users" \n
383  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
384  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
385  *
386  * \par Prospective Clients:
387  * External Apps.
388  *
389  * \remarks None.
390  * \code
391  *
392  * #include <wifi-direct.h>
393  *
394  * void foo(void)
395  * {
396  *
397  * int result;
398  *
399  * result = wifi_direct_initialize();
400  *
401  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully connected to the wifi direct server
402  *
403  * \endcode
404  ******************************************************************************/
405 int wifi_direct_initialize(void);
406
407
408 /*****************************************************************************************/
409 /* wifi_direct_deinitialize API function prototype
410  * int wifi_direct_deinitialize(void);
411  */
412
413 /**
414  * \brief This API shall deregister the client application with the Wi-Fi Direct server and releases all resources.
415  *
416  * \pre Application must be already registered to the Wi-Fi Direct server.
417  *
418  * \post Application is de-registered.
419  *
420  * \see wifi_direct_initialize
421  *
422  * \par Sync (or) Async:
423  * This is a Synchronous API.
424  *
425  * \warning
426  *  None
427  *
428  *
429  * \par Async Response Message:
430  *        None
431  *
432  *
433  * \return Return Type (int) \n
434  * - WIFI_DIRECT_ERROR_NONE on success \n
435  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
436  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
437  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
438  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
439  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
440  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
441  *
442  * \par Prospective Clients:
443  * External Apps.
444  *
445  * \code
446  *
447  * #include <wifi-direct.h>
448  *
449  * void foo(void)
450  * {
451
452  * int result;
453  *
454  * result = wifi_direct_deinitialize();
455  *
456  * if(result == WIFI_DIRECT_ERROR_NONE)......... // Deregister is successful
457  *
458  *\endcode
459  *
460  *\remarks None.
461  *
462  ******************************************************************************/
463 int wifi_direct_deinitialize(void);
464
465
466 /*****************************************************************************/
467 /* wifi_direct_set_connection_state_changed_cb API function prototype
468  * int wifi_direct_set_connection_state_changed_cb(wifi_direct_device_state_changed_cb cb, void* user_data)
469  */
470 /**
471  * \brief       This API shall register the activation callback function and user data from client. \n
472  *
473  * \pre The Client should be initialized.
474  *
475  * \see wifi_direct_initialize
476  * \see wifi_direct_device_state_changed_cb
477  *
478  * \par Sync (or) Async:
479  * This is a Synchronous API.
480  *
481  * \warning
482  *  None
483  *
484  * \param[in] cb    Application Callback function pointer to receive Wi-Fi Direct events
485  * \param[in] user_data    user data
486  *
487  * \return Return Type (int) \n
488  *
489  * - WIFI_DIRECT_ERROR_NONE on success \n
490  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
491  *
492  * \par Prospective Clients:
493  * External Apps.
494  *
495  * \remarks None.
496  * \code
497  *
498  * #include <wifi-direct.h>
499  *
500  * void foo(void)
501  * {
502  *
503  * int result;
504  *
505  * result = wifi_direct_set_connection_state_changed_cb(_cb_activation, void* user_data);
506  *
507  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully registered the callback function
508  *
509  * \endcode
510  ******************************************************************************/
511 int wifi_direct_set_device_state_changed_cb(wifi_direct_device_state_changed_cb cb, void *user_data);
512
513
514 /*****************************************************************************/
515 /* wifi_direct_unset_connection_state_changed_cb API function prototype
516  * int wifi_direct_unset_connection_state_changed_cb(void)
517  */
518 /**
519  * \brief       This API shall deregister the activation callback function and user data from client. \n
520  *
521  * \pre The Client should be initialized.
522  *
523  * \see wifi_direct_initialize
524  * \see wifi_direct_set_connection_state_changed_cb
525  *
526  * \par Sync (or) Async:
527  * This is a Synchronous API.
528  *
529  * \warning
530  *  None
531  *
532  * \return Return Type (int) \n
533  *
534  * - WIFI_DIRECT_ERROR_NONE on success \n
535  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
536  *
537  * \par Prospective Clients:
538  * External Apps.
539  *
540  * \remarks None.
541  * \code
542  *
543  * #include <wifi-direct.h>
544  *
545  * void foo(void)
546  * {
547  *
548  * int result;
549  *
550  * result = wifi_direct_unset_connection_state_changed_cb();
551  *
552  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully deregistered the callback function
553  *
554  * \endcode
555  ******************************************************************************/
556 int wifi_direct_unset_device_state_changed_cb(void);
557
558
559
560 /*****************************************************************************/
561 /* wifi_direct_set_discovery_state_changed_cb API function prototype
562  * int wifi_direct_set_discover_state_changed_cb(wifi_direct_discovery_state_chagned_cb cb, void* user_data)
563  */
564 /**
565  * \brief       This API shall register the discover callback function and user data from client. \n
566  *
567  * \pre The Client should be initialized.
568  *
569  * \see wifi_direct_initialize
570  * \see wifi_direct_discovery_state_chagned_cb
571  *
572  * \par Sync (or) Async:
573  * This is a Synchronous API.
574  *
575  * \warning
576  *  None
577  *
578  * \param[in] cb    Application Callback function pointer to receive Wi-Fi Direct events
579  * \param[in] user_data    user data
580  *
581  * \return Return Type (int) \n
582  *
583  * - WIFI_DIRECT_ERROR_NONE on success \n
584  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
585  *
586  * \par Prospective Clients:
587  * External Apps.
588  *
589  * \remarks None.
590  * \code
591  *
592  * #include <wifi-direct.h>
593  *
594  * void foo(void)
595  * {
596  *
597  * int result;
598  *
599  * result = wifi_direct_set_discovery_state_changed_cb(_cb_discover, void* user_data);
600  *
601  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully registered the callback function
602  *
603  * \endcode
604  ******************************************************************************/
605 int wifi_direct_set_discovery_state_changed_cb(wifi_direct_discovery_state_chagned_cb cb, void *user_data);
606
607
608 /*****************************************************************************/
609 /* wifi_direct_unset_discovery_state_changed_cb API function prototype
610  * int wifi_direct_unset_discovery_state_changed_cb(void)
611  */
612 /**
613  * \brief       This API shall deregister the discover callback function and user data from client. \n
614  *
615  * \pre The Client should be initialized.
616  *
617  * \see wifi_direct_initialize
618  * \see wifi_direct_set_discovery_state_changed_cb
619  *
620  * \par Sync (or) Async:
621  * This is a Synchronous API.
622  *
623  * \warning
624  *  None
625  *
626  * \return Return Type (int) \n
627  *
628  * - WIFI_DIRECT_ERROR_NONE on success \n
629  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
630  *
631  * \par Prospective Clients:
632  * External Apps.
633  *
634  * \remarks None.
635  * \code
636  *
637  * #include <wifi-direct.h>
638  *
639  * void foo(void)
640  * {
641  *
642  * int result;
643  *
644  * result = wifi_direct_unset_discovery_state_changed_cb();
645  *
646  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully deregistered the callback function
647  *
648  * \endcode
649  ******************************************************************************/
650 int wifi_direct_unset_discovery_state_changed_cb(void);
651
652
653
654 /*****************************************************************************/
655 /* wifi_direct_set_connection_state_changed_cb API function prototype
656  * int wifi_direct_set_connection_state_changed_cb(wifi_direct_connection_state_changed_cb cb, void* user_data)
657  */
658 /**
659  * \brief       This API shall register the connection callback function and user data from client. \n
660  *
661  * \pre The Client should be initialized.
662  *
663  * \see wifi_direct_initialize
664  * \see wifi_direct_connection_state_changed_cb
665  *
666  * \par Sync (or) Async:
667  * This is a Synchronous API.
668  *
669  * \warning
670  *  None
671  *
672  * \param[in] cb    Application Callback function pointer to receive Wi-Fi Direct events
673  * \param[in] user_data    user data
674  *
675  * \return Return Type (int) \n
676  *
677  * - WIFI_DIRECT_ERROR_NONE on success \n
678  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
679  *
680  * \par Prospective Clients:
681  * External Apps.
682  *
683  * \remarks None.
684  * \code
685  *
686  * #include <wifi-direct.h>
687  *
688  * void foo(void)
689  * {
690  *
691  * int result;
692  *
693  * result = wifi_direct_set_connection_state_changed_cb(_cb_connection, void* user_data);
694  *
695  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully registered the callback function
696  *
697  * \endcode
698  ******************************************************************************/
699 int wifi_direct_set_connection_state_changed_cb(wifi_direct_connection_state_changed_cb cb, void *user_data);
700
701
702 /*****************************************************************************/
703 /* wifi_direct_unset_connection_state_changed_cb API function prototype
704  * int wifi_direct_unset_connection_state_changed_cb(void)
705  */
706 /**
707  * \brief       This API shall deregister the connection callback function and user data from client. \n
708  *
709  * \pre The Client should be initialized.
710  *
711  * \see wifi_direct_initialize
712  * \see wifi_direct_set_connection_state_changed_cb
713  *
714  * \par Sync (or) Async:
715  * This is a Synchronous API.
716  *
717  * \warning
718  *  None
719  *
720  * \return Return Type (int) \n
721  *
722  * - WIFI_DIRECT_ERROR_NONE on success \n
723  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
724  *
725  * \par Prospective Clients:
726  * External Apps.
727  *
728  * \remarks None.
729  * \code
730  *
731  * #include <wifi-direct.h>
732  *
733  * void foo(void)
734  * {
735  *
736  * int result;
737  *
738  * result = wifi_direct_unset_connection_state_changed_cb();
739  *
740  * if(result == WIFI_DIRECT_ERROR_NONE).........// Successfully deregistered the callback function
741  *
742  * \endcode
743  ******************************************************************************/
744 int wifi_direct_unset_connection_state_changed_cb(void);
745
746
747 /**
748 * @brief Registers the callback called when IP address of client is assigned when your device is group owner.
749 * @param[in] cb  The callback function to invoke
750 * @param[in] user_data  The user data to be passed to the callback function
751 * @return 0 on success, otherwise a negative error value.
752 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
753 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
754 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
755 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
756 * @see wifi_direct_initialize()
757 * @see wifi_direct_unset_client_ip_address_assigned_cb()
758 * @see wifi_direct_client_ip_address_assigned_cb()
759 */
760 int wifi_direct_set_client_ip_address_assigned_cb(wifi_direct_client_ip_address_assigned_cb cb, void *user_data);
761
762
763 /**
764 * @brief Unregisters the callback called when IP address of client is assigned when your device is group owner.
765 * @return 0 on success, otherwise a negative error value.
766 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
767 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
768 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
769 * @see wifi_direct_initialize()
770 * @see wifi_direct_set_connection_state_changed_cb()
771 */
772 int wifi_direct_unset_client_ip_address_assigned_cb(void);
773
774
775 /*****************************************************************************************/
776 /* wifi_direct_activate API function prototype
777  * int wifi_direct_activate(void);
778  */
779
780 /**
781  * \brief This API shall open a wireless adapter device for P2P use.
782
783  * \pre Application must be already registered to the Wi-Fi Direct server.
784  *
785  * \post wireless adapter device will be ready to use.
786  *
787  * \see wifi_direct_initialize
788  *
789  * \par Sync (or) Async:
790  * This is a Asynchronous API.
791  *
792  * \warning
793  *  None
794  *
795  *
796  * \par Async Response Message:
797  *  - WIFI_DIRECT_DEVICE_STATE_ACTIVATED : Application will receive this event via wifi_direct_device_state_changed_cb, when activation  process is completed. \n
798  *
799  *
800  * \return Return Type (int*) \n
801  * - WIFI_DIRECT_ERROR_NONE on success \n
802  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
803  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
804  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
805  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
806  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
807  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
808  * - WIFI_DIRECT_ERROR_WIFI_USED for "WiFi is being used" \n
809  * - WIFI_DIRECT_ERROR_MOBILE_AP_USED for "Mobile AP is being used" \n
810  *
811  *
812  * \par Prospective Clients:
813  * External Apps.
814  *
815  * \code
816  *
817  * #include <wifi-direct.h>
818  *
819  * void foo(void)
820  * {
821
822  * int result;
823  *
824  * result = wifi_direct_activate();
825  *
826  * if(result == WIFI_DIRECT_ERROR_NONE)......... // activation is successful
827  *
828  *\endcode
829  *
830  *\remarks None.
831  *
832  ******************************************************************************/
833 int wifi_direct_activate(void);
834
835
836 /*****************************************************************************************/
837 /* wifi_direct_deactivate API function prototype
838  * int wifi_direct_deactivate(void);
839  */
840
841 /**
842  * \brief This API shall close a wireless adapter device for P2P use
843
844  * \pre Wireless adapter device must be already opened.
845  *
846  * \post wireless adapter device will be closed.
847  *
848  * \see wifi_direct_activate
849  *
850  * \par Sync (or) Async:
851  * This is a Asynchronous API.
852  *
853  * \warning
854  *  None
855  *
856  *
857  * \par Async Response Message:
858  *  - WIFI_DIRECT_DEVICE_STATE_DEACTIVATED : Application will receive this event via wifi_direct_device_state_changed_cb, when deactivation  process is completed. \n
859
860  * \return Return Type (int) \n
861  * - WIFI_DIRECT_ERROR_NONE on success \n
862  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
863  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
864  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
865  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
866  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
867  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
868  *
869  *
870  * \par Prospective Clients:
871  * External Apps.
872  *
873  * \code
874  *
875  * #include <wifi-direct.h>
876  *
877  * void foo(void)
878  * {
879  * int result;
880  *
881  * result = wifi_direct_deactivate();
882  *
883  * if(result == WIFI_DIRECT_ERROR_NONE)......... // Deactivation is successful
884  *
885  *\endcode
886  *
887  *\remarks None.
888  *
889  ******************************************************************************/
890 int wifi_direct_deactivate(void);
891
892
893 /*****************************************************************************************/
894 /* wifi_direct_start_discovery API function prototype
895  * int wifi_direct_start_discovery(bool listen_only, int timeout);
896  */
897 /**
898  * \brief This API shall Start a discovery to find all P2P capable devices. \n
899  *        Applications will be notified event via wifi_direct_discovery_state_chagned_cb(). \n
900  *
901  * @param listen_only    if true, skip the initial 802.11 scan and then enter
902  *                       Listen state instead of cycling between Search and Listen.
903  * @param timeout        Specifies the duration of discovery period, in seconds.
904  *                       APs. If 0, a default value will be used, which depends on UX guideline.
905  *
906  * \pre Wireless adapter device must be already opened.
907  *
908  *
909  * \see wifi_direct_get_discovery_result
910  *
911  * \par Sync (or) Async:
912  * This is a Asynchronous API.
913  *
914  * \warning
915  *  None
916  *
917  *
918  * \par Async Response Message:
919  *  - WIFI_DIRECT_DISCOVERY_STARTED : Application will receive this event via wifi_direct_discovery_state_chagned_cb (), when discover process (80211 Scan) started. \n
920  *  - WIFI_DIRECT_ONLY_LISTEN_STARTED : Application will receive this event via wifi_direct_discovery_state_chagned_cb (), when discover process (listen only mode) started. \n
921  *  - WIFI_DIRECT_DISCOVERY_FOUND : Application will receive this event via wifi_direct_discovery_state_chagned_cb (), when peer or group is found. \n
922  *  - WIFI_DIRECT_DISCOVERY_FINISHED : Once the whole discovery process is completed, applications will receive it via wifi_direct_discovery_state_chagned_cb (). \n
923  *                                 Applications may then call wifi_direct_foreach_discovered_peers() to get the final result.  \n
924  *                                 With the intermediate or final list of P2P capable devices, applications can update their UI if needed. \n
925  *                                 It is up to the applications to control how often to update their UI display. \n
926  *
927  *
928  * \return Return Type (int) \n
929  * - WIFI_DIRECT_ERROR_NONE on success \n
930  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
931  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
932  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
933  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
934  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
935  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
936  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
937  *
938  *
939  * \par Prospective Clients:
940  * External Apps.
941  *
942  * \code
943  *
944  * #include <wifi-direct.h>
945  *
946  * void foo(void)
947  * {
948
949  * int result;
950  *
951  * result = wifi_direct_start_discovery(TRUE, 0);
952  *
953  * if(result == WIFI_DIRECT_ERROR_NONE)......... // discovery request is successful
954  *
955  *\endcode
956  *
957  *\remarks If discover is over, peer can not find the device and the device can not find peer, too.
958  *
959  ******************************************************************************/
960 int wifi_direct_start_discovery(bool listen_only, int timeout);
961
962
963 /*****************************************************************************************/
964 /* wifi_direct_cancel_discovery API function prototype
965  * int wifi_direct_cancel_discovery(void);
966  */
967 /**
968  * \brief This API shall cancel the discovery process started from wifi_direct_start_discovery. \n
969  *
970  * \pre discovery process must be started.
971  *
972  * \post discovery process stopped.
973  *
974  * \see wifi_direct_client_start_discovery
975  *
976  * \par Sync (or) Async:
977  * This is a Asynchronous API.
978  *
979  * \warning
980  *  None
981  *
982  *
983  * \par Async Response Message:
984  *    - WIFI_DIRECT_DISCOVERY_FINISHED :  Applications will receive a this event
985  *                                   via callback when the discovery process is cancelled or completed.
986  *
987  *
988  * \return Return Type (int) \n
989  * - WIFI_DIRECT_ERROR_NONE on success \n
990  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
991  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
992  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
993  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
994  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
995  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
996  *
997  * \par Prospective Clients:
998  * External Apps.
999  *
1000  * \code
1001  *
1002  * #include <wifi-direct.h>
1003  *
1004  * void foo(void)
1005  * {
1006
1007  * int result;
1008  *
1009  * result = wifi_direct_cancel_discovery();
1010  *
1011  * if(result == WIFI_DIRECT_ERROR_NONE)......... // discovery cancel request is successful
1012  *
1013  *\endcode
1014  *
1015  *\remarks None.
1016  *
1017  ******************************************************************************/
1018 int wifi_direct_cancel_discovery(void);
1019
1020
1021 /**
1022  * discorverd peers notification callback function type. \n
1023  *
1024  * @param peer The discovered peer information.
1025  * @param user_data The user data passed from the foreach function.
1026  * @return @c true to continue with the next iteration of the loop,
1027  * \n @c false to break out of the loop.
1028  *
1029  * @pre wifi_direct_foreach_discovered_peers() will invoke this function.
1030  *
1031  * @see wifi_direct_foreach_discovered_peers()
1032  *
1033  */
1034 typedef bool(*wifi_direct_discovered_peer_cb)   (wifi_direct_discovered_peer_info_s *peer, void *user_data);
1035
1036
1037 /*****************************************************************************************/
1038 /* wifi_direct_foreach_discovered_peers API function prototype
1039  * int wifi_direct_foreach_discovered_peers(wifi_direct_discovered_peer_cb, void* user_data)
1040  */
1041 /**
1042  * \brief This API shall get the information of all discovered peers. \n
1043  *
1044  * @param callback The callback function to invoke.
1045  * @param user_data The user data passed from the foreach function.
1046  *
1047  * \see wifi_direct_discovered_peer_cb
1048  *
1049  * \par Sync (or) Async:
1050  * This is a Synchronous API.
1051  *
1052  * \warning
1053  *  None
1054  *
1055  * \return Return Type (int) \n
1056  * - WIFI_DIRECT_ERROR_NONE on success \n
1057  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1058  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1059  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1060  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1061  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1062  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1063  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1064  *
1065  *
1066  * \par Prospective Clients:
1067  * External Apps.
1068  *
1069  * \code
1070  *
1071  * #include <wifi-direct.h>
1072  *
1073  * bool _cb_discovered_peers_impl(wifi_direct_discovered_peer_info_s* peer, void* user_data)
1074  * {
1075  *      struct appdata* ad = (struct appdata*) user_data;
1076  *
1077  *      if(NULL != peer)
1078  *      {
1079  *              if ( ad->peer_count >= MAX_PEER_NUM )
1080  *                      return false;   // break out of the loop
1081  *
1082  *              memcpy(&ad->peer_list[ad->peer_count], peer, sizeof(wifi_direct_discovered_peer_info_s));
1083  *              ad->peer_count++;
1084  *      }
1085  *
1086  *      return true;    // continue with the next iteration of the loop
1087  * }
1088  *
1089  *
1090  * void foo()
1091  * {
1092  *      int result;
1093  *
1094  *      ad->peer_list = NULL;
1095  *      ad->peer_count = 0;
1096  *      ad ->selected_peer_index = 0;
1097  *      result = wifi_direct_foreach_discovered_peers(_cb_discovered_peers_impl, (void*)ad);
1098  *
1099  *      if(result == WIFI_DIRECT_ERROR_NONE)......... // get discovery result is successful
1100  *
1101  *\endcode
1102  *
1103  *\remarks None.
1104  *
1105  ******************************************************************************/
1106 int wifi_direct_foreach_discovered_peers(wifi_direct_discovered_peer_cb callback,
1107                                                                                                 void *user_data);
1108
1109
1110 /*****************************************************************************************/
1111 /* wifi_direct_connect API function prototype
1112  * int wifi_direct_connect(const char* mac_address);
1113  */
1114 /**
1115  * \brief This API shall connect to specified peer by automatically determining whether to perform group \n
1116  * formation, join an existing group, invite, re-invoke a group. The decision is \n
1117  * based on the current state of the peers (i.e. GO, STA, not connected) and the \n
1118  * availability of persistent data. \n
1119  *
1120  * @param mac_addr Device address of target peer.
1121  *
1122  * \par Sync (or) Async:
1123  * This is a Asynchronous API.
1124  *
1125  * \warning
1126  *  None
1127  *
1128  *
1129  * \par Async Response Message:
1130  *    - WIFI_DIRECT_CONNECTION_IN_PROGRESS :  Applications will receive this event
1131  *                                   via callback when the connection process is started.
1132  *    - WIFI_DIRECT_CONNECTION_RSP :  Applications will receive this event
1133  *                                   via callback when the connection process is completed or failed.
1134  *
1135  * \return Return Type (int) \n
1136  * - WIFI_DIRECT_ERROR_NONE on success \n
1137  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1138  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1139  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1140  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1141  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1142  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1143  * - WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for "Connection timed out" \n
1144  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1145  * - WIFI_DIRECT_ERROR_CONNECTION_FAILED for "Create Link fail" \n
1146  * - WIFI_DIRECT_ERROR_AUTH_FAILED for "Create Link Auth fail" \n
1147  *
1148  *
1149  * \par Prospective Clients:
1150  * External Apps.
1151  *
1152  * \code
1153  *
1154  * #include <wifi-direct.h>
1155  *
1156  * void foo(unsigned char* mac_addr)
1157  * {
1158
1159  * int result;
1160  *
1161  * result = wifi_direct_connect(mac_addr);
1162  *
1163  * if(result == WIFI_DIRECT_ERROR_NONE)......... // connect request is successful
1164  *
1165  *\endcode
1166  *
1167  *\remarks This API will try to send provisioning request befre connecting.
1168  *
1169  ******************************************************************************/
1170 int wifi_direct_connect(const char *mac_address);
1171
1172 /**
1173  * @brief Cancel the connection now in progress .
1174  * @param[in] mac_address  The MAC address of rejected device.
1175  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1176  * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1177  * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1178  * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1179  * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1180  * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1181  */
1182 int wifi_direct_cancel_connection(const char *mac_address);
1183
1184 /**
1185  * @brief Reject the connection request from other device now in progress.
1186  * @param[in] mac_address  The MAC address of rejected device.
1187  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1188  * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1189  * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1190  * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1191  * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1192  * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1193  */
1194 int wifi_direct_reject_connection(const char *mac_address);
1195
1196 /*****************************************************************************************/
1197 /* wifi_direct_disconnect_all API function prototype
1198  * int wifi_direct_disconnect_all(void);
1199  */
1200 /**
1201  * \brief This API shall tear down all connected links to peers (stop soft AP, and close interface).  \n
1202  *
1203  * \see wifi_direct_connect
1204  *
1205  * \par Sync (or) Async:
1206  * This is a Asynchronous API.
1207  *
1208  * \warning
1209  *  None
1210  *
1211  *
1212  * \par Async Response Message:
1213  *    - WIFI_DIRECT_DISCONNECTION_RSP :  Applications will receive this event
1214  *                                   via callback when the disconnection process is completed.
1215  *
1216  *
1217  * \return Return Type (int) \n
1218  * - WIFI_DIRECT_ERROR_NONE on success \n
1219  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1220  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1221  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1222  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1223  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1224  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1225  *
1226  *
1227  * \par Prospective Clients:
1228  * External Apps.
1229  *
1230  * \code
1231  *
1232  * #include <wifi-direct.h>
1233  *
1234  * void foo(void)
1235  * {
1236
1237  * int result;
1238  *
1239  * result = wifi_direct_disconnect_all();
1240  *
1241  * if(result == WIFI_DIRECT_ERROR_NONE)......... // disconnect request is successful
1242  *
1243  *\endcode
1244  *
1245  *\remarks None.
1246  *
1247  ******************************************************************************/
1248 int wifi_direct_disconnect_all(void);
1249
1250
1251
1252 /*****************************************************************************************/
1253 /* wifi_direct_disconnect API function prototype
1254  * int wifi_direct_disconnect(const char* mac_address);
1255  */
1256 /**
1257  * \brief This API shall disconnect the specified peer by mac address.
1258  *
1259  * @param mac_addr Device address of target peer.
1260  *
1261  * \see
1262  *
1263  * \par Sync (or) Async:
1264  * This is a Asynchronous API.
1265  *
1266  * \warning
1267  *  None
1268  *
1269  *
1270  * \par Async Response Message:
1271  *    - WIFI_DIRECT_DISCONNECTION_RSP :  Applications will receive a this event
1272  *                                   via callback when a peer is disconnected.
1273  *
1274  * \return Return Type (int) \n
1275  * - WIFI_DIRECT_ERROR_NONE on success \n
1276  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1277  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1278  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1279  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1280  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1281  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1282  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1283  *
1284  *
1285  * \par Prospective Clients:
1286  * External Apps.
1287  *
1288  * \code
1289  *
1290  * #include <wifi-direct.h>
1291  *
1292  * void foo(unsigned char* mac_addr)
1293  * {
1294
1295  * int result;
1296  *
1297  * result = wifi_direct_disconnect(mac_addr);
1298  *
1299  * if(result == WIFI_DIRECT_ERROR_NONE)......... // disconnect request is successful
1300  *
1301  *\endcode
1302  *
1303  *\remarks None.
1304  *
1305  ******************************************************************************/
1306 int wifi_direct_disconnect(const char *mac_address);
1307
1308
1309
1310 /**
1311  * connected peers notification callback function type. \n
1312  *
1313  * @param peer The connected peer information.
1314  * @param user_data The user data passed from the foreach function.
1315  * @return @c true to continue with the next iteration of the loop,
1316  * \n @c false to break out of the loop.
1317  *
1318  * @pre wifi_direct_foreach_connected_peers() will invoke this function.
1319  *
1320  * @see wifi_direct_foreach_connected_peers()
1321  *
1322  */
1323 typedef bool(*wifi_direct_connected_peer_cb) (wifi_direct_connected_peer_info_s *peer,
1324                                                                                                                 void *user_data);
1325
1326
1327 /*****************************************************************************************/
1328 /* wifi_direct_foreach_connected_peers API function prototype
1329  * int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb, void* user_data)
1330  */
1331 /**
1332  * \brief This API shall get the information of all connected peers. \n
1333  *
1334  * @param callback The callback function to invoke.
1335  * @param user_data The user data passed from the foreach function.
1336  *
1337  * \see wifi_direct_connected_peer_cb
1338  *
1339  * \par Sync (or) Async:
1340  * This is a Synchronous API.
1341  *
1342  * \warning
1343  *  None
1344  *
1345  * \return Return Type (int) \n
1346  * - WIFI_DIRECT_ERROR_NONE on success \n
1347  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1348  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1349  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1350  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1351  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1352  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1353  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1354  *
1355  * \par Prospective Clients:
1356  * External Apps.
1357  *
1358  * \code
1359  *
1360  * #include <wifi-direct.h>
1361  *
1362  * bool _cb_connected_peers_impl(wifi_direct_connected_peer_info_s* peer, void* user_data)
1363  *{
1364  *
1365  *      struct appdata* ad = (struct appdata*) user_data;
1366  *
1367  *      if(NULL != peer)
1368  *      {
1369  *              if ( ad->connected_peer_count >= MAX_PEER_NUM )
1370  *                      return false;   // break out of the loop
1371  *
1372  *              memcpy(&ad->connected_peer_list[ad->connected_peer_count], peer, sizeof(wifi_direct_connected_peer_info_s));
1373  *              ad->connected_peer_count++;
1374  *
1375  *      }
1376  *
1377  *      return true;    // continue with the next iteration of the loop
1378  *}
1379  *
1380  * void foo()
1381  * {
1382  *      int result;
1383  *
1384  *      ad->connected_peer_list = NULL;
1385  *      ad->connected_peer_count = 0;
1386  *
1387  *      result = wifi_direct_foreach_connected_peers(_cb_connected_peers_impl, (void*)ad);
1388  *
1389  * if(result == WIFI_DIRECT_ERROR_NONE)......... // get discovery result is successful
1390  *
1391  *\endcode
1392  *
1393  *\remarks None.
1394  *
1395  ******************************************************************************/
1396 int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb
1397                                                                                 callback, void *user_data);
1398
1399
1400
1401 /*****************************************************************************************/
1402 /* wifi_direct_create_group API function prototype
1403  * int wifi_direct_create_group();
1404  */
1405 /**
1406  * \brief This API shall set up device as a Group Owner and wait for clients to connect. \n
1407  * Create a soft AP, start the WPS registrar, start the DHCP server. \n
1408  *
1409  * \see wifi_direct_destroy_group
1410  *
1411  * \par Sync (or) Async:
1412  * This is a Asynchronous API.
1413  *
1414  * \warning
1415  *  None
1416  *
1417  *
1418  * \par Async Response Message:
1419  *    - WIFI_DIRECT_GROUP_CREATED :  Applications will receive this event
1420  *                                   via callback when the group creating request is successful. \n
1421  *                                Errorcode will be set to the WFD_ERROR_CREATE_LINK_FAIL value. \n
1422  *
1423  * \return Return Type (int) \n
1424  * - WIFI_DIRECT_ERROR_NONE on success \n
1425  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1426  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1427  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1428  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1429  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1430  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1431  * - WIFI_DIRECT_ERROR_CONNECTION_FAILED for "Create Link fail" \n
1432  * - WIFI_DIRECT_ERROR_AUTH_FAILED for "Create Link Auth fail" \n
1433  *
1434  *
1435  * \par Prospective Clients:
1436  * External Apps.
1437  *
1438  * \code
1439  *
1440  * #include <wifi-direct.h>
1441  *
1442  * void foo()
1443  * {
1444
1445  * int result;
1446  *
1447  * result = wifi_direct_create_group();
1448  *
1449  * if(result == WIFI_DIRECT_ERROR_NONE)......... // create group request is successful
1450  *
1451  *\endcode
1452  *
1453  *\remarks None.
1454  *
1455  ******************************************************************************/
1456 int wifi_direct_create_group(void);
1457
1458
1459
1460 /*****************************************************************************************/
1461 /* wifi_direct_destroy_group API function prototype
1462  * int wifi_direct_destroy_group();
1463  */
1464 /**
1465  * \brief This API shall cancel P2P Group create or tear down a P2P Group that we own. \n
1466  *
1467  * \see wifi_direct_create_group
1468  *
1469  * \par Sync (or) Async:
1470  * This is a Asynchronous API.
1471  *
1472  * \warning
1473  *  None
1474  *
1475  *
1476  * \par Async Response Message:
1477  *    - WIFI_DIRECT_GROUP_DESTROYED :  Applications will receive this event via callback when the group is cancelled. \n
1478  *
1479  * \return Return Type (int) \n
1480  * - WIFI_DIRECT_ERROR_NONE on success \n
1481  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1482  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1483  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1484  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1485  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1486  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1487  * - WIFI_DIRECT_ERROR_CONNECTION_FAILED for "Create Link fail" \n
1488  * - WIFI_DIRECT_ERROR_AUTH_FAILED for "Create Link Auth fail" \n
1489  *
1490  *
1491  * \par Prospective Clients:
1492  * External Apps.
1493  *
1494  * \code
1495  *
1496  * #include <wifi-direct.h>
1497  *
1498  * void foo()
1499  * {
1500
1501  * int result;
1502  *
1503  * result = wifi_direct_destroy_group();
1504  *
1505  * if(result == WIFI_DIRECT_ERROR_NONE)......... // cancel group request is successful
1506  *
1507  *\endcode
1508  *
1509  *\remarks None.
1510  *
1511  ******************************************************************************/
1512 int wifi_direct_destroy_group(void);
1513
1514
1515 /*****************************************************************************************/
1516 /* wifi_direct_is_group_owner API function prototype
1517  * int wifi_direct_is_group_owner(bool *owner);
1518  */
1519 /**
1520  * \brief This API shall check whether the currunt client is group owner or not.
1521  * @param owner              Memory to store the value of TURE or FALSE. Application must allocate memory.
1522  *
1523  * \see wifi_direct_create_group
1524  *
1525  * \par Sync (or) Async:
1526  * This is a Synchronous API.
1527  *
1528  * \warning
1529  *  None
1530  *
1531  * \return Return Type (int) \n
1532  * - WIFI_DIRECT_ERROR_NONE on success \n
1533  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1534  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1535  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1536  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1537  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1538  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1539  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1540  *
1541  * \par Prospective Clients:
1542  * External Apps.
1543  *
1544  * \code
1545  *
1546  * #include <wifi-direct.h>
1547  *
1548  * void foo(void)
1549  * {
1550
1551  * int result;
1552  * bool owner;
1553  *
1554  * result = wifi_direct_is_group_owner(&owner);
1555  *
1556  *
1557  * if(result == WIFI_DIRECT_ERROR_NONE)......... // checking the value is successful
1558  *
1559  *\endcode
1560  *
1561  *\remarks None.
1562  *
1563  ******************************************************************************/
1564 int wifi_direct_is_group_owner(bool *is_group_owner);
1565
1566
1567
1568 /*****************************************************************************************/
1569 /* wifi_direct_is_autonomous_group API function prototype
1570  * int wifi_direct_is_autonomous_group(bool *autonomous_group);
1571  */
1572 /**
1573  * \brief This API shall check whether the currunt group is autonomous group or not.
1574  * @param autonomous_group              Memory to store the value of TURE or FALSE. Application must allocate memory.
1575  *
1576  * \see wifi_direct_create_group
1577  *
1578  * \par Sync (or) Async:
1579  * This is a Synchronous API.
1580  *
1581  * \warning
1582  *  None
1583  *
1584  * \return Return Type (int) \n
1585  * - WIFI_DIRECT_ERROR_NONE on success \n
1586  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1587  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1588  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1589  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1590  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1591  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1592  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1593  *
1594  * \par Prospective Clients:
1595  * External Apps.
1596  *
1597  * \code
1598  *
1599  * #include <wifi-direct.h>
1600  *
1601  * void foo(void)
1602  * {
1603
1604  * int result;
1605  * bool autonomous_group;
1606  *
1607  * result = wifi_direct_is_autonomous_group(&autonomous_group);
1608  *
1609  *
1610  * if(result == WIFI_DIRECT_ERROR_NONE)......... // checking the value is successful
1611  *
1612  *\endcode
1613  *
1614  *\remarks None.
1615  *
1616  ******************************************************************************/
1617 int wifi_direct_is_autonomous_group(bool *is_autonomous_group);
1618
1619
1620
1621
1622 /*****************************************************************************************/
1623 /* wifi_direct_set_ssid API function prototype
1624  * int wifi_direct_set_ssid(const char* ssid);
1625  */
1626 /**
1627  * \brief This API shall set or update ssid of local device. \n
1628  * @param ssid              new ssid to set. Application must set the new ssid before.
1629  *
1630  * \see wifi_direct_get_ssid
1631  *
1632  * \par Sync (or) Async:
1633  * This is a Synchronous API.
1634  *
1635  * \warning
1636  *  None
1637  *
1638  *
1639  * \return Return Type (int) \n
1640  * - WIFI_DIRECT_ERROR_NONE on success \n
1641  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1642  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1643  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1644  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1645  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1646  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1647  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1648  *
1649  *
1650  * \par Prospective Clients:
1651  * External Apps.
1652  *
1653  * \code
1654  *
1655  * #include <wifi-direct.h>
1656  *
1657  * void foo()
1658  * {
1659  * int  result;
1660  * char ssid[11] = {0,};
1661  *
1662  * memset(pin, 0x00, sizeof(pin));
1663  * printf("Input 8 digit PIN number :\n");
1664  * scanf("%s", pin);
1665  *
1666  *if( strlen(ssid) > 0 )
1667  *      result = wifi_direct_set_ssid(ssid);
1668  *
1669  * if(result == WIFI_DIRECT_ERROR_NONE)......... // setting ssid is successful
1670  *
1671  *\endcode
1672  *
1673  *\remarks When the wifi direct is re-activated, ssid will be reset to the device name. \n
1674  *
1675  *
1676  ******************************************************************************/
1677 int wifi_direct_set_ssid(const char *ssid);
1678
1679
1680 /**
1681  * @brief Sets the friendly name of local device.
1682  * @details This device name is shown to other devices during device discovery.
1683  * @remarks The name set by you is only valid during activated state.
1684  * After Wi-Fi Direct is deactivated, this name will be as the phone name.
1685  * @param[in] device_name  The name to local device
1686  * @return 0 on success, otherwise a negative error value.
1687  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1688  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1689  * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1690  * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1691  * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitteds
1692  * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1693  * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1694  * @pre Wi-Fi Direct must be activated by wifi_direct_activate().
1695  * @see wifi_direct_activate()
1696  * @see wifi_direct_get_device_name()
1697  */
1698 int wifi_direct_set_device_name(const char *device_name);
1699
1700 /**
1701  * @brief Gets the name of local device.
1702  * @remarks @a device_name must be released with free() by you.
1703  * @param[out] device_name  The name to local device
1704  * @return 0 on success, otherwise a negative error value.
1705  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1706  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1707  * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1708  * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1709  * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1710  * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1711  * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
1712  * @see wifi_direct_initialize()
1713  * @see wifi_direct_set_device_name()
1714  */
1715 int wifi_direct_get_device_name(char **device_name);
1716
1717 /*****************************************************************************************/
1718 /* wifi_direct_get_ssid API function prototype
1719  * int wifi_direct_get_ssid(char** ssid)
1720  */
1721 /**
1722  * \brief This API shall get ssid of local device. \n
1723  * @param ssid              Pointer to store ssid. Application must free this memory.
1724  *
1725  * \par Sync (or) Async:
1726  * This is a Synchronous API.
1727  *
1728  * \warning
1729  *  None
1730  *
1731  *
1732  * \return Return Type (int) \n
1733  * - WIFI_DIRECT_ERROR_NONE on success \n
1734  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1735  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1736  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1737  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1738  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1739  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1740  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1741  *
1742  *
1743  * \par Prospective Clients:
1744  * External Apps.
1745  *
1746  * \code
1747  *
1748  * #include <wifi-direct.h>
1749  *
1750  * void foo()
1751  * {
1752  * int  result;
1753  * char* ssid = NULL;
1754  *
1755  * result = wifi_direct_get_ssid(&ssid);
1756  *
1757  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting ssid is successful
1758  *
1759  * free(ssid); // Application should free the memory.
1760  *
1761  *
1762  *\endcode
1763  *
1764  *\remarks None.
1765  *
1766  ******************************************************************************/
1767 int wifi_direct_get_ssid(char **ssid);
1768
1769
1770 /**
1771 * @brief Gets the name of network interface. For example, eth0 and pdp0.
1772 * @remarks @a name must be released with free() by you.
1773 * @param[out] name  The name of network interface
1774 * @return 0 on success, otherwise negative error value.
1775 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1776 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1777 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1778 * @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY  Out of memory
1779 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1780 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1781 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1782 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1783 * @pre Wi-Fi Direct service must be activated by wifi_direct_activate().
1784 * @see wifi_direct_activate()
1785 */
1786 int wifi_direct_get_network_interface_name(char **name);
1787
1788
1789 /*****************************************************************************************/
1790 /* wifi_direct_get_ip_address API function prototype
1791  * int wifi_direct_get_ip_address(char** ip_address)
1792  */
1793 /**
1794  * \brief This API shall get IP address of local device interface. \n
1795  * @param ip_addr              Pointer to store ip address. Application must free this memory.
1796  *
1797  * \par Sync (or) Async:
1798  * This is a Synchronous API.
1799  *
1800  * \warning
1801  *  None
1802  *
1803  *
1804  * \return Return Type (int) \n
1805  * - WIFI_DIRECT_ERROR_NONE on success \n
1806  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1807  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1808  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1809  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1810  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1811  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1812  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1813  *
1814  *
1815  * \par Prospective Clients:
1816  * External Apps.
1817  *
1818  * \code
1819  *
1820  * #include <wifi-direct.h>
1821  *
1822  * void foo()
1823  * {
1824  * int  result;
1825  * char* ip = NULL;
1826  *
1827  * result = wifi_direct_get_ip_address(&ip);
1828  *
1829  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting IP is successful
1830  *
1831  * free(ip); // Application should free the memory.
1832  *
1833  *\endcode
1834  *
1835  *\remarks None.
1836  *
1837  ******************************************************************************/
1838 int wifi_direct_get_ip_address(char **ip_address);
1839
1840 /**
1841 * @brief Gets the Subnet Mask.
1842 * @remarks @a subnet_mask must be released with free() by you.
1843 * @param[out] subnet_mask  The subnet mask
1844 * @return 0 on success, otherwise negative error value.
1845 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1846 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1847 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1848 * @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY  Out of memory
1849 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1850 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1851 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1852 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1853 * @pre Wi-Fi Direct service must be activated by wifi_direct_activate().
1854 * @see wifi_direct_activate()
1855 */
1856 int wifi_direct_get_subnet_mask(char **subnet_mask);
1857
1858
1859 /**
1860 * @brief Gets the Gateway address.
1861 * @remarks @a gateway_address must be released with free() by you.
1862 * @param[out] gateway_address  The gateway address
1863 * @return 0 on success, otherwise negative error value.
1864 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1865 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1866 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1867 * @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY  Out of memory
1868 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1869 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1870 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1871 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1872 * @pre Wi-Fi Direct service must be activated by wifi_direct_activate().
1873 * @see wifi_direct_activate()
1874 */
1875 int wifi_direct_get_gateway_address(char **gateway_address);
1876
1877
1878
1879 /*****************************************************************************************/
1880 /* wifi_direct_get_mac_addr API function prototype
1881  * int wifi_direct_get_mac_address(char **mac_address)
1882  */
1883 /**
1884  * \brief This API shall get device MAC address of local device.\n
1885  * @param mac_addr              Pointer to store MAC address. Application must free this memory.
1886  *
1887  * \par Sync (or) Async:
1888  * This is a Synchronous API.
1889  *
1890  * \warning
1891  *  None
1892  *
1893  *
1894  * \return Return Type (int) \n
1895  * - WIFI_DIRECT_ERROR_NONE on success \n
1896  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1897  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1898  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1899  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1900  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1901  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1902  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1903  *
1904  *
1905  * \par Prospective Clients:
1906  * External Apps.
1907  *
1908  * \code
1909  *
1910  * #include <wifi-direct.h>
1911  *
1912  * void foo()
1913  * {
1914  * int  result;
1915  * char* mac_addr =NULL;
1916  *
1917  * result = wifi_direct_get_mac_addr(&mac_addr);
1918  *
1919  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting device MAC is successful
1920  *
1921  *\endcode
1922  *
1923  *\remarks None.
1924  *
1925  ******************************************************************************/
1926 int wifi_direct_get_mac_address(char **mac_address);
1927
1928
1929 /*****************************************************************************************/
1930 /* wifi_direct_get_state API function prototype
1931  * int wifi_direct_get_state(wifi_direct_state_e * status);
1932  */
1933 /**
1934  * \brief This API shall get current Wi-Fi direct link status. \n
1935  * @param status Memory to store link status information. Application must allocate memory.
1936  *
1937  * \see wifi_direct_state_e
1938  *
1939  * \par Sync (or) Async:
1940  * This is a Synchronous API.
1941  *
1942  * \warning
1943  *  None
1944  *
1945  *
1946  * \return Return Type (int) \n
1947  * - WIFI_DIRECT_ERROR_NONE on success \n
1948  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
1949  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
1950  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
1951  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
1952  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
1953  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
1954  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
1955  *
1956  *
1957  * \par Prospective Clients:
1958  * External Apps.
1959  *
1960  * \code
1961  *
1962  * #include <wifi-direct.h>
1963  *
1964  * void foo()
1965  * {
1966  * int result;
1967  * wifi_direct_state_e status;
1968  *
1969  * result = wifi_direct_get_state(&status);
1970  *
1971  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting link status is successful
1972  *
1973  *\endcode
1974  *
1975  *\remarks None.
1976  *
1977  ******************************************************************************/
1978 int wifi_direct_get_state(wifi_direct_state_e *state);
1979
1980
1981
1982 /**
1983 * @brief Checks whether this device is discoverable or not by P2P discovery.
1984 * @details If you call wifi_direct_start_discovery(), then your device can be discoverable.
1985 * @param[out] discoverable  The status of discoverable: (@c true = discoverable, @c false = non-discoverable)
1986 * @return 0 on success, otherwise a negative error value.
1987 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
1988 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
1989 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
1990 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
1991 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
1992 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
1993 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
1994 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
1995 * @see wifi_direct_initialize()
1996 * @see wifi_direct_start_discovery()
1997 * @see wifi_direct_cancel_discovery()
1998 */
1999 int wifi_direct_is_discoverable(bool *discoverable);
2000
2001 /**
2002 * @brief Checks whether the local device is listening only.
2003 * @details If you call wifi_direct_start_discovery() with @a listen_only as @c true,
2004 * then skip the initial 802.11 Scan and then enter Listen state instead of cycling between Scan andListen.
2005 * @param[out] listen_only  The status of listen only: (@c true = listen only, @c false = cycling between Scan and Listen or not in discovery state)
2006 * @return 0 on success, otherwise a negative error value.
2007 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2008 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2009 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2010 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2011 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2012 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2013 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2014 * @pre Wi-Fi Direct service must be activated by wifi_direct_activate().
2015 * @see wifi_direct_start_discovery()
2016 * @see wifi_direct_cancel_discovery()
2017 * @see wifi_direct_is_discoverable()
2018 */
2019 int wifi_direct_is_listening_only(bool *listen_only);
2020
2021 /**
2022 * @brief Gets the primary device type of local device.
2023 * @param[out] type  The primary device type
2024 * @return 0 on success, otherwise a negative error value.
2025 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2026 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2027 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2028 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2029 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2030 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2031 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2032 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2033 * @see wifi_direct_initialize()
2034 */
2035 int wifi_direct_get_primary_device_type(wifi_direct_primary_device_type_e *type);
2036
2037  /**
2038 * @brief Gets the secondary device type of local device.
2039 * @param[out] type  The secondary device type
2040 * @return 0 on success, otherwise a negative error value.
2041 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2042 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2043 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2044 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2045 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2046 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2047 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2048 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2049 * @see wifi_direct_initialize()
2050 */
2051 int wifi_direct_get_secondary_device_type(wifi_direct_secondary_device_type_e *type);
2052
2053
2054 /*****************************************************************************************/
2055 /* wifi_direct_accept_connection API function prototype
2056  * int wifi_direct_accept_connection(char* mac_address);
2057  */
2058 /**
2059  * \brief This API shall accept connection request from specified peer. \n
2060  * This API shall be used to respond the connection request event, WIFI_DIRECT_CONNECTION_REQ.
2061  *
2062  * @param mac_addr Device address of target peer.
2063  *
2064  * \see wifi_direct_connect
2065  *
2066  * \par Sync (or) Async:
2067  * This is a Asynchronous API.
2068  *
2069  * \warning
2070  *  None
2071  *
2072  * \par Async Response Message:
2073  *    - WIFI_DIRECT_CONNECTION_IN_PROGRESS :  Applications will receive this event
2074  *                                   via callback when the connection process is started.
2075  *    - WIFI_DIRECT_CONNECTION_RSP :  Applications will receive this event
2076  *                                   via callback when the connection process is completed or failed.
2077  *
2078  * \return Return Type (int) \n
2079  * - WIFI_DIRECT_ERROR_NONE on success \n
2080  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2081  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2082  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2083  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2084  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2085  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2086  * - WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for "Connection timed out" \n
2087  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2088  * - WIFI_DIRECT_ERROR_CONNECTION_FAILED for "Create Link fail" \n
2089  * - WIFI_DIRECT_ERROR_AUTH_FAILED for "Create Link Auth fail" \n
2090  *
2091  *
2092  * \par Prospective Clients:
2093  * External Apps.
2094  *
2095  * \code
2096  *
2097  * #include <wifi-direct.h>
2098  *
2099  * void foo(unsigned char* mac_addr)
2100  * {
2101  * int result;
2102  *
2103  * result = wifi_direct_accept_connection(mac_addr);
2104  *
2105  * if(result == WIFI_DIRECT_ERROR_NONE)......... // connect request is successful
2106  *
2107  *\endcode
2108  *
2109  *\remarks This API will not try to send provisioning request.
2110  *
2111  ******************************************************************************/
2112 int wifi_direct_accept_connection(char *mac_address);
2113
2114
2115 /*****************************************************************************************/
2116 /* wifi_direct_get_passphrase API function prototype
2117  * int wifi_direct_get_passphrase(char** passphrase)
2118  */
2119 /**
2120  * \brief If a client create Group (Soft AP), this API shall get wpa password. \n
2121  * @param passphrase              Pointer to store wpa password. Application must free this memory.
2122  *
2123  *
2124  * \par Sync (or) Async:
2125  * This is a Synchronous API.
2126  *
2127  * \warning
2128  *  None
2129  *
2130  *
2131  * \return Return Type (int) \n
2132  * - WIFI_DIRECT_ERROR_NONE on success \n
2133  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2134  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2135  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2136  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2137  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2138  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2139  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2140  *
2141  * \par Prospective Clients:
2142  * External Apps.
2143  *
2144  * \code
2145  *
2146  * #include <wifi-direct.h>
2147  *
2148  * void foo()
2149  * {
2150  * int  result;
2151  * char* wpa = NULL;
2152  *
2153  * result=wifi_direct_get_passphrase(&wpa);
2154  *
2155  * if(result == WIFI_DIRECT_ERROR_NONE)........//getting wpa passphrase is successful
2156  *
2157  * free(wpa); // Application should free the memory
2158  *
2159  *\endcode
2160  *
2161  *\remarks None.
2162  *
2163  ******************************************************************************/
2164 int wifi_direct_get_passphrase(char **passphrase);
2165
2166
2167 /*****************************************************************************************/
2168 /* wifi_direct_set_wpa_passphrase API function prototype
2169  * int wifi_direct_set_wpa_passphrase(char* passphrase)
2170  */
2171 /**
2172  * \brief This API shall set or update wpa password. If a client create Group (Soft AP), this password will be used. \n
2173  * @param passphrase              new wpa password to set. Application must set the new password before.
2174  *
2175  *
2176  * \par Sync (or) Async:
2177  * This is a Synchronous API.
2178  *
2179  * \warning
2180  *  None
2181  *
2182  *
2183  * \return Return Type (int) \n
2184  * - WIFI_DIRECT_ERROR_NONE on success \n
2185  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2186  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2187  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2188  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2189  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2190  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2191  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2192  *
2193  * \par Prospective Clients:
2194  * External Apps.
2195  *
2196  * \code
2197  *
2198  * #include <wifi-direct.h>
2199  *
2200  * void foo()
2201  * {
2202  * int  result;
2203  * char new_wpa[64+1] = {0,};
2204  *
2205  * printf("Input new WPA:\n");
2206  * scanf("%s",new_wpa);
2207  *
2208  *if( strlen(new_wpa) > 0 )
2209  *      result = wifi_direct_set_wpa_passphrase(new_wpa);
2210  *
2211  * if(result == WIFI_DIRECT_ERROR_NONE)......... // setting password is successful
2212  *
2213  *\endcode
2214  *
2215  *\remarks None.
2216  *
2217  ******************************************************************************/
2218 int wifi_direct_set_wpa_passphrase(char *passphrase);
2219
2220
2221 /*****************************************************************************************/
2222 /* wifi_direct_activate_pushbutton API function prototype
2223  * int wifi_direct_activate_pushbutton(void);
2224  */
2225 /**
2226  * \brief This API shall start wps PBC.
2227
2228  * \pre Device must support the pbc button mode.
2229  *
2230  * \see wifi_direct_foreach_supported_wps_types
2231  *
2232  * \par Sync (or) Async:
2233  * This is a Synchronous API.
2234  *
2235  * \warning
2236  *  None
2237  *
2238  * \return Return Type (int) \n
2239  * - WIFI_DIRECT_ERROR_NONE on success \n
2240  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2241  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2242  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2243  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2244  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2245  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2246  *
2247  * \par Prospective Clients:
2248  * External Apps.
2249  *
2250  * \code
2251  *
2252  * #include <wifi-direct.h>
2253  *
2254  * void foo(void)
2255  * {
2256
2257  * int result;
2258  *
2259  * result = wifi_direct_activate_pushbutton();
2260  *
2261  * if(result == WIFI_DIRECT_ERROR_NONE)......... // activating push button is successful
2262  *
2263  *\endcode
2264  *
2265  *\remarks None.
2266  *
2267  ******************************************************************************/
2268 int wifi_direct_activate_pushbutton(void);
2269
2270
2271 /*****************************************************************************************/
2272 /* wifi_direct_set_wps_pin API function prototype
2273  * int wifi_direct_set_wps_pin(char* pin)
2274  */
2275 /**
2276  * \brief This API shall set or update the WPS PIN number user expects. \n
2277  * @param pin              new pin to set. Application must set the new pin number before.
2278  *
2279  * \see wifi_direct_generate_wps_pin.
2280  * \see wifi_direct_get_wps_pin
2281  *
2282  * \par Sync (or) Async:
2283  * This is a Synchronous API.
2284  *
2285  * \warning
2286  *  None
2287  *
2288  *
2289  * \return Return Type (int) \n
2290  * - WIFI_DIRECT_ERROR_NONE on success \n
2291  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2292  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2293  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2294  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2295  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2296  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2297  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2298  *
2299  *
2300  * \par Prospective Clients:
2301  * External Apps.
2302  *
2303  * \code
2304  *
2305  * #include <wifi-direct.h>
2306  *
2307  * void foo()
2308  * {
2309  * int  result;
2310  * char pin[WIFI_DIRECT_WPS_PIN_LEN+1]= { 0, };
2311  *
2312  * memset(pin, 0x00, sizeof(pin));
2313  * printf("Input 8 digit PIN number :\n");
2314  * scanf("%s", pin);
2315  *
2316  *if( strlen(pin) > 0 )
2317  *      result = wifi_direct_set_wps_pin(pin);
2318  *
2319  * if(result == WIFI_DIRECT_ERROR_NONE)......... // setting wps pin number is successful
2320  *
2321  *\endcode
2322  *
2323  *\remarks None.
2324  *
2325  ******************************************************************************/
2326 int wifi_direct_set_wps_pin(char *pin);
2327
2328
2329 /*****************************************************************************************/
2330 /* wifi_direct_get_wps_pin API function prototype
2331  * int wifi_direct_get_wps_pin(char** pin)
2332  */
2333 /**
2334  * \brief This API shall get the WPS PIN number. \n
2335  * @param pin              Pointer to store pin number. Application must free this memory.
2336  *
2337  * \see wifi_direct_set_wps_pin
2338  *
2339  * \par Sync (or) Async:
2340  * This is a Synchronous API.
2341  *
2342  * \warning
2343  *  None
2344  *
2345  *
2346  * \return Return Type (int) \n
2347  * - WIFI_DIRECT_ERROR_NONE on success \n
2348  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2349  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2350  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2351  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2352  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2353  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2354  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2355  *
2356  *
2357  * \par Prospective Clients:
2358  * External Apps.
2359  *
2360  * \code
2361  *
2362  * #include <wifi-direct.h>
2363  *
2364  * void foo()
2365  * {
2366  * int  result;
2367  * char* pin = NULL;
2368  *
2369  * result = wifi_direct_get_wps_pin(&pin);
2370  *
2371  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting wps pin number is successful
2372  *
2373  * free(pin); // Application should free the memory.
2374  *
2375  *\endcode
2376  *
2377  *\remarks None.
2378  *
2379  ******************************************************************************/
2380 int wifi_direct_get_wps_pin(char **pin);
2381
2382
2383 /*****************************************************************************************/
2384 /* wifi_direct_generate_wps_pin API function prototype
2385  * wifi_direct_generate_wps_pin(void);
2386  */
2387 /**
2388  * \brief This API shall generate the random WPS PIN number.\n
2389  *              To get the generated PIN number, use wifi_direct_get_wps_pin() API.
2390  *
2391  * \see wifi_direct_set_wps_pin
2392  * \see wifi_direct_get_wps_pin
2393  *
2394  * \par Sync (or) Async:
2395  * This is a Synchronous API.
2396  *
2397  * \warning
2398  *  None
2399  *
2400  *
2401  * \return Return Type (int) \n
2402  * - WIFI_DIRECT_ERROR_NONE on success \n
2403  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2404  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2405  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2406  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2407  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2408  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2409  *
2410  *
2411  * \par Prospective Clients:
2412  * External Apps.
2413  *
2414  * \code
2415  *
2416  * #include <wifi-direct.h>
2417  *
2418  * void foo()
2419  * {
2420  * int  result;
2421  *
2422  * result = wifi_direct_generate_wps_pin();
2423  *
2424  * if(result == WIFI_DIRECT_ERROR_NONE)......... // generating wps pin number is successful
2425  *
2426  *\endcode
2427  *
2428  *\remarks None.
2429  *
2430  ******************************************************************************/
2431 int wifi_direct_generate_wps_pin(void);
2432
2433
2434 /*****************************************************************************************/
2435 /* wifi_direct_get_supported_wps_mode API function prototype
2436  * int wifi_direct_get_supported_wps_mode(int *wps_mode);
2437  */
2438 /**
2439  * \brief This API shall get the supported wps mode. \n
2440  *              The result is bit flag.
2441  *
2442  * @param wps_mode              Memory to store supported wps mode. Application must allocate memory.
2443  *
2444  * \see wifi_direct_wps_type_e
2445  *
2446  * \par Sync (or) Async:
2447  * This is a Synchronous API.
2448  *
2449  * \warning
2450  *  None
2451  *
2452  *
2453  * \return Return Type (int) \n
2454  * - WIFI_DIRECT_ERROR_NONE on success \n
2455  * - WIFI_DIRECT_ERROR_OPERATION_FAILED for "Unkown error" \n
2456  * - WIFI_DIRECT_ERROR_OUT_OF_MEMORY for "Out of memory" \n
2457  * - WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for "I/O error" \n
2458  * - WIFI_DIRECT_ERROR_NOT_PERMITTED for "Operation not permitted" \n
2459  * - WIFI_DIRECT_ERROR_INVALID_PARAMETER for "Invalid function parameter" \n
2460  * - WIFI_DIRECT_ERROR_RESOURCE_BUSY for "Device or resource busy" \n
2461  * - WIFI_DIRECT_ERROR_STRANGE_CLIENT for "Invalid Client" \n
2462  *
2463  *
2464  * \par Prospective Clients:
2465  * External Apps.
2466  *
2467  * \code
2468  *
2469  * #include <wifi-direct.h>
2470  *
2471  * void foo()
2472  * {
2473  * int  result;
2474  * int supported_wps_mode = 0;
2475  *
2476  * result = wifi_direct_get_supported_wps_mode(&supported_wps_mode);
2477  *
2478  * if(result == WIFI_DIRECT_ERROR_NONE)......... // getting supported wps mode is successful
2479  *
2480  *\endcode
2481  *
2482  *\remarks None.
2483  *
2484  ******************************************************************************/
2485 int wifi_direct_get_supported_wps_mode(int *wps_mode);
2486
2487
2488 /**
2489 * @brief Called when you get the supported WPS(Wi-Fi Protected Setup) type repeatedly.
2490 * @param[in] type  The type of WPS
2491 * @param[in] user_data  The user data passed from the request function
2492 * @return  @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2493 * @pre  wifi_direct_foreach_supported_wps_types() will invoke this callback.
2494 * @see  wifi_direct_foreach_supported_wps_types()
2495 */
2496 typedef bool(*wifi_direct_supported_wps_type_cb)(wifi_direct_wps_type_e type, void *user_data);
2497
2498 /**
2499 * @brief Gets the supported WPS(Wi-Fi Protected Setup) types.
2500 * @param[in] callback  The callback function to invoke
2501 * @param[in] user_data  The user data to be passed to the callback function
2502 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2503 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2504 * @see wifi_direct_supported_wps_type_cb()
2505 */
2506 int wifi_direct_foreach_supported_wps_types(wifi_direct_supported_wps_type_cb callback, void *user_data);
2507
2508 /**
2509  * @brief Gets the WPS(Wi-Fi Protected Setup) type.
2510  * @param[out] type  The type of WPS
2511  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2512  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2513  * @see wifi_direct_foreach_supported_wps_types()
2514  */
2515 int wifi_direct_get_local_wps_type(wifi_direct_wps_type_e *type);
2516
2517 /**
2518  * @brief Sets the requested WPS(Wi-Fi Protected Setup) type.
2519  * @param[in] type  The type of WPS
2520  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2521  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2522  * @see wifi_direct_foreach_supported_wps_types()
2523  */
2524 int wifi_direct_set_req_wps_type(wifi_direct_wps_type_e type);
2525
2526 /**
2527  * @brief Gets the requested WPS(Wi-Fi Protected Setup) type.
2528  * @param[out] type  The type of WPS
2529  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2530  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2531  * @see wifi_direct_foreach_supported_wps_types()
2532  */
2533 int wifi_direct_get_req_wps_type(wifi_direct_wps_type_e *type);
2534
2535 /**
2536 * @brief Sets the intent of a group owner.
2537 * @remakrs The range of intent is 0 ~ 15.
2538 * @param[in] intent  The intent of a group owner
2539 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2540 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2541 * @see wifi_direct_get_group_owner_intent()
2542 */
2543 int wifi_direct_set_group_owner_intent(int intent);
2544
2545 /**
2546 * @brief Gets the intent of a group owner.
2547 * @param[out] intent  The intent of a group owner
2548 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2549 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2550 * @see wifi_direct_set_group_owner_intent()
2551 */
2552 int wifi_direct_get_group_owner_intent(int *intent);
2553
2554 /**
2555 * @brief Sets the max number of clients.
2556 * @param[in] max  The max number of clients
2557 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2558 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2559 * @see wifi_direct_get_max_clients()
2560 */
2561 int wifi_direct_set_max_clients(int max);
2562
2563 /**
2564 * @brief Gets the max number of clients.
2565 * @param[in] max  The max number of clients
2566 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2567 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2568 * @see wifi_direct_set_max_clients()
2569 */
2570 int wifi_direct_get_max_clients(int *max);
2571
2572
2573 /**
2574 * @brief Gets the channel of own group. - DEPRECATED
2575 * @param[out] channel  The channel of own group
2576 * @return 0 on success, otherwise a negative error value.
2577 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2578 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2579 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2580 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2581 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2582 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2583 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2584 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2585 * @see wifi_direct_initialize()
2586 */
2587 int wifi_direct_get_own_group_channel(int *channel);
2588
2589
2590 /**
2591 * @brief Gets the operating channel.
2592 * @param[out] channel  The operating channel
2593 * @return 0 on success, otherwise a negative error value.
2594 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2595 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2596 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2597 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2598 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2599 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2600 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2601 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2602 * @see wifi_direct_initialize()
2603 */
2604 int wifi_direct_get_operating_channel(int *channel);
2605
2606 /**
2607  * @brief Sets the Autoconnection mode.
2608  * @param[in]
2609  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2610  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2611  * @see wifi_direct_foreach_supported_wps_types()
2612  */
2613 int wifi_direct_set_autoconnection_mode(bool mode);
2614
2615 int wifi_direct_is_autoconnection_mode(bool *mode);
2616
2617 /**
2618 * @brief Enables the persistent group.
2619 * @details If @a enabled is true, then P2P persisten group will be used when creating a group and establishing a connection.
2620 * @param[in] enabled  The status of persistent group: (@c true = enabled, @c false = disabled)
2621 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2622 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2623 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2624 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2625 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2626 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2627 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2628 * @see wifi_direct_initialize()
2629 * @see wifi_direct_is_persistent_group_enabled()
2630 */
2631 int wifi_direct_set_persistent_group_enabled(bool enabled);
2632
2633 /**
2634 * @brief Checks whether the persistent group is enabled or disabled.
2635 * @param[out] enabled  The status of persistent group: (@c true = enabled, @c false = disabled)
2636 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2637 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2638 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2639 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2640 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2641 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2642 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2643 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2644 * @see wifi_direct_initialize()
2645 * @see wifi_direct_set_persistent_group_enabled()
2646 */
2647 int wifi_direct_is_persistent_group_enabled(bool *enabled);
2648
2649
2650 /**
2651 * @brief Called when you get the persistent groups repeatedly.
2652 * @param[in] mac_address  The MAC address of persistent group owner
2653 * @param[in] ssid  The SSID(Service Set Identifier) of persistent group owner
2654 * @param[in] user_data  The user data passed from the request function
2655 * @return  @c true to continue with the next iteration of the loop, \n @c false to break out of theloop
2656 * @pre  wifi_direct_foreach_persistent_groups() will invoke this callback.
2657 * @see  wifi_direct_foreach_persistent_groups()
2658 */
2659 typedef bool(*wifi_direct_persistent_group_cb)(const char *mac_address, const char *ssid, void *user_data);
2660
2661 /**
2662 * @brief Gets the persistent groups.
2663 * @param[in] callback  The callback function to invoke
2664 * @param[in] user_data  The user data to be passed to the callback function
2665 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2666 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2667 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2668 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2669 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2670 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2671 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2672 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2673 * @post wifi_direct_persistent_group_cb() will be called.
2674 * @see wifi_direct_initialize()
2675 * @see wifi_direct_persistent_group_cb()
2676 */
2677 int wifi_direct_foreach_persistent_groups(wifi_direct_persistent_group_cb callback, void *user_data);
2678
2679 /**
2680 * @brief Remove a persistent group.
2681 * @param[in] mac_address  The MAC address of persistent group owner
2682 * @param[in] ssid  The SSID(Service Set Identifier) of persistent group owner
2683 * @retval #WIFI_DIRECT_ERROR_NONE  Successful
2684 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
2685 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
2686 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
2687 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
2688 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
2689 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
2690 * @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
2691 * @see wifi_direct_initialize()
2692 * @see wifi_direct_foreach_persistent_groups()
2693 */
2694 int wifi_direct_remove_persistent_group(const char *mac_address, const char *ssid);
2695
2696 /*****************************************************************************************/
2697 /* wifi_direct_service_add API function prototype
2698  * int wifi_direct_service_add(wifi_direct_service_type_e type, char *data1, char *data2)
2699  */
2700 /**
2701  * \brief This API shall add the service user expects. \n
2702  * @param type              new service type to add. Application must run the new service before.
2703  * @param data1             new service query to add. Application must run the new service before.
2704  *                                                              upnp: <service>
2705  *                                                              bonjour: <RDATA hexdump>
2706  *                                                              vendor specific: <service string>
2707  * @param data2             new service data to add. Application must run the new service before.
2708  *                                                              upnp: <version hex>
2709  *                                                              bonjour: <query hexdump>
2710  *                                                              vendor specific: NULL
2711  *
2712  * \see wifi_direct_service_del.
2713  * \see wifi_direct_serv_disc_req.
2714  * \see wifi_direct_serv_disc_cancel.
2715  *
2716  * \par Sync (or) Async:
2717  * This is a Synchronous API.
2718  *
2719  * \warning
2720  *  None
2721  *
2722  *
2723  * \return Return Type (int) \n
2724  *      WIFI_DIRECT_ERROR_NONE on Success \n
2725  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2726  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2727  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2728  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2729  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2730  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2731  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2732  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2733  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2734  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2735  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2736  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2737  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2738  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2739  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2740  *
2741  *
2742  *\endcode
2743  *
2744  *\remarks None.
2745  *
2746  ******************************************************************************/
2747 int wifi_direct_service_add(wifi_direct_service_type_e type, char *data1, char *data2);
2748
2749 /*****************************************************************************************/
2750 /* wifi_direct_service_del API function prototype
2751  * int wifi_direct_service_del(wifi_direct_service_type_e type, char *data1, char *data2)
2752  */
2753 /**
2754  * \brief This API shall delete the service user expects. \n
2755  * @param type              service type to delete. Application must run and add the service to wpasupplicant before.
2756  * @param data1             new service query to delete. Application must run and add the service to wpasupplicant before.
2757  *                                                              upnp: <service>
2758  *                                                              bonjour: <query hexdump>
2759  *                                                              vendor specific: <service string>
2760  * @param data2             new service data to delete. Application must run and add the service to wpasupplicant before.
2761  *                                                              upnp: <version hex>
2762  *                                                              bonjour: NULL
2763  *                                                              vendor specific: NULL
2764  *
2765  * \see wifi_direct_service_add.
2766  * \see wifi_direct_serv_disc_req.
2767  * \see wifi_direct_serv_disc_cancel.
2768  *
2769  * \par Sync (or) Async:
2770  * This is a Synchronous API.
2771  *
2772  * \warning
2773  *  None
2774  *
2775  *
2776  * \return Return Type (int) \n
2777  *      WIFI_DIRECT_ERROR_NONE on Success \n
2778  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2779  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2780  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2781  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2782  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2783  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2784  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2785  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2786  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2787  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2788  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2789  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2790  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2791  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2792  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2793  *
2794  *
2795  *\endcode
2796  *
2797  *\remarks None.
2798  *
2799  ******************************************************************************/
2800 int wifi_direct_service_del(wifi_direct_service_type_e type, char *data1, char *data2);
2801
2802 /*****************************************************************************************/
2803 /* wifi_direct_service_del API function prototype
2804  * int wifi_direct_serv_disc_req(char* MAC, wifi_direct_service_type_e type, char *data1, char *data2)
2805  */
2806 /**
2807  * \brief This API shall delete the service user expects. \n
2808  * @param MAC               peer MAC address to discover service. this value can be specific MAC address or 00:00:00:00:00:00 as wildcard
2809  * @param type              service type to discover. this value can be NULL if this value is not needed.
2810  * @param data1             service query to discover. this value can be NULL if this value is not needed.
2811  *                                                              find all : NULL
2812  *                                                              upnp: <service> or NULL for finding all upnp services
2813  *                                                              bonjour: <query hexdump> or NULL for finding all bonjour services
2814  *                                                              vendor specific: <service string> or NULL for finding all vendor specific services
2815  * @param data2             service data to discover. this value is mandatory and can be Service Query TLV,
2816  *                                                              find all : NULL
2817  *                                                              upnp: <version hex> or NULL for finding all upnp services
2818  *                                                              bonjour: NULL
2819  *                                                              vendor specific: NULL
2820  *
2821  * \see wifi_direct_service_add.
2822  * \see wifi_direct_service_del.
2823  * \see wifi_direct_serv_disc_cancel.
2824  *
2825  * \par Sync (or) Async:
2826  * This is a Synchronous API.
2827  *
2828  * \warning
2829  *  None
2830  *
2831  *
2832  * \return Return Type (int) \n
2833  *      Request Handle on Success \n
2834  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2835  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2836  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2837  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2838  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2839  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2840  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2841  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2842  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2843  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2844  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2845  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2846  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2847  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2848  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2849  *
2850  *
2851  *\endcode
2852  *
2853  *\remarks None.
2854  *
2855  ******************************************************************************/
2856 int wifi_direct_serv_disc_req(char* MAC, wifi_direct_service_type_e type, char *data1, char *data2);
2857
2858 /*****************************************************************************************/
2859 /* wifi_direct_service_del API function prototype
2860  * int wifi_direct_serv_disc_cancel(int handle)
2861  */
2862 /**
2863  * \brief This API shall delete the service user expects. \n
2864  * @param handle              query handle to delete. Application had requested service discovery to manager and has gotten this handle.
2865  *
2866  * \see wifi_direct_service_add.
2867  * \see wifi_direct_service_del.
2868  * \see wifi_direct_serv_disc_req.
2869  *
2870  * \par Sync (or) Async:
2871  * This is a Synchronous API.
2872  *
2873  * \warning
2874  *  None
2875  *
2876  *
2877  * \return Return Type (int) \n
2878  *      WIFI_DIRECT_ERROR_NONE on Success \n
2879  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2880  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2881  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2882  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2883  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2884  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2885  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2886  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2887  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2888  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2889  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2890  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2891  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2892  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2893  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2894  *
2895  *
2896  *
2897  *\endcode
2898  *
2899  *\remarks None.
2900  *
2901  ******************************************************************************/
2902 int wifi_direct_serv_disc_cancel(int handle);
2903
2904 /*****************************************************************************************/
2905 /* wifi_direct_init_wifi_display API function prototype
2906  * int wifi_direct_init_wifi_display(wifi_direct_display_type type, int port, int hdcp)
2907  */
2908 /**
2909  * \brief This API shall initialize the wifi display. \n
2910  * @param type              wifi direct display device type.
2911  * @param port              port number that is used by wifi direct display.
2912  * @param hdcp              indicate that hdcp is support capability.
2913  *
2914  * \see wifi_direct_deinit_wifi_display.
2915  * \see wifi_direct_get_display_port
2916  * \see wifi_direct_get_display_type.
2917  *
2918  * \par Sync (or) Async:
2919  * This is a Synchronous API.
2920  *
2921  * \warning
2922  *  None
2923  *
2924  *
2925  * \return Return Type (int) \n
2926  *      WIFI_DIRECT_ERROR_NONE on Success \n
2927  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2928  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2929  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2930  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2931  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2932  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2933  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2934  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2935  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2936  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2937  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2938  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2939  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2940  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2941  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2942  *
2943  *
2944  *
2945  *\endcode
2946  *
2947  *\remarks None.
2948  *
2949  ******************************************************************************/
2950 int wifi_direct_init_wifi_display(wifi_direct_display_type_e type, int port, int hdcp);
2951
2952 /*****************************************************************************************/
2953 /* wifi_direct_deinit_wifi_display API function prototype
2954  * int wifi_direct_deinit_wifi_display(void)
2955  */
2956 /**
2957  * \brief This API shall deinitialize the wifi direct display. \n
2958  *
2959  * \see wifi_direct_init_wifi_display.
2960  * \see wifi_direct_get_display_port
2961  * \see wifi_direct_get_display_type.
2962  *
2963  * \par Sync (or) Async:
2964  * This is a Synchronous API.
2965  *
2966  * \warning
2967  *  None
2968  *
2969  *
2970  * \return Return Type (int) \n
2971  *      WIFI_DIRECT_ERROR_NONE on Success \n
2972  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
2973  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
2974  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
2975  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
2976  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
2977  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
2978  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
2979  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
2980  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
2981  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
2982  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
2983  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
2984  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
2985  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
2986  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
2987  *
2988  *
2989  *
2990  *\endcode
2991  *
2992  *\remarks None.
2993  *
2994  ******************************************************************************/
2995 int wifi_direct_deinit_wifi_display(void);
2996
2997 /*****************************************************************************************/
2998 /* wifi_direct_get_display_port API function prototype
2999  * int wifi_direct_get_display_port(int *port)
3000  */
3001 /**
3002  * \brief This API shall get wifi display port. \n
3003  * @param port              TCP control port of this wifi direct diplay device. Application had enabled the wifi direct display before use this function.
3004  *
3005  * \see wifi_direct_init_wifi_display.
3006  * \see wifi_direct_deinit_wifi_display.
3007  * \see wifi_direct_get_display_type.
3008  *
3009  * \par Sync (or) Async:
3010  * This is a Synchronous API.
3011  *
3012  * \warning
3013  *  None
3014  *
3015  *
3016  * \return Return Type (int) \n
3017  *      WIFI_DIRECT_ERROR_NONE on Success \n
3018  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
3019  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
3020  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
3021  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
3022  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
3023  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
3024  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
3025  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
3026  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
3027  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
3028  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
3029  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
3030  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
3031  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
3032  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
3033  *
3034  *
3035  *
3036  *\endcode
3037  *
3038  *\remarks None.
3039  *
3040  ******************************************************************************/
3041 int wifi_direct_get_display_port(int *port);
3042
3043 /*****************************************************************************************/
3044 /* wifi_direct_get_display_type API function prototype
3045  * int wifi_direct_get_display_type(wifi_direct_display_type *type)
3046  */
3047 /**
3048  * \brief This API shall get wifi display type. \n
3049  * @param type              wifi direct display type of this device. Application had enabled the wifi direct display before use this function.
3050  *
3051  * \see wifi_direct_init_wifi_display.
3052  * \see wifi_direct_deinit_wifi_display.
3053  * \see wifi_direct_get_display_port.
3054  *
3055  * \par Sync (or) Async:
3056  * This is a Synchronous API.
3057  *
3058  * \warning
3059  *  None
3060  *
3061  *
3062  * \return Return Type (int) \n
3063  *      WIFI_DIRECT_ERROR_NONE on Success \n
3064  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
3065  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
3066  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
3067  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
3068  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
3069  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
3070  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
3071  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
3072  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
3073  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
3074  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
3075  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
3076  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
3077  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
3078  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
3079  *
3080  *
3081  *
3082  *\endcode
3083  *
3084  *\remarks None.
3085  *
3086  ******************************************************************************/
3087 int wifi_direct_get_display_type(wifi_direct_display_type_e *type);
3088
3089 /*****************************************************************************************/
3090 /* wifi_direct_add_to_access_list API function prototype
3091  * int wifi_direct_add_to_access_list(const char *mac_address, bool allow)
3092  */
3093 /**
3094  * \brief This API shall add device to list to automatically allow or deny connection request. \n
3095  * @param mac_address              device mac address to add device list.
3096  * @param allow                                         allow or deny flag.
3097  *
3098  * \see wifi_direct_del_from_access_list.
3099  *
3100  * \par Sync (or) Async:
3101  * This is a Synchronous API.
3102  *
3103  * \warning
3104  *  None
3105  *
3106  *
3107  * \return Return Type (int) \n
3108  *      WIFI_DIRECT_ERROR_NONE on Success \n
3109  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
3110  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
3111  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
3112  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
3113  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
3114  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
3115  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
3116  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
3117  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
3118  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
3119  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
3120  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
3121  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
3122  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
3123  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
3124  *
3125  *
3126  *
3127  *\endcode
3128  *
3129  *\remarks None.
3130  *
3131  ******************************************************************************/
3132 int wifi_direct_add_to_access_list(const char *mac_address, bool allow);
3133
3134 /*****************************************************************************************/
3135 /* wifi_direct_del_from_access_list API function prototype
3136  * int wifi_direct_del_from_access_list(const char *mac_address, bool allow)
3137  */
3138 /**
3139  * \brief This API shall add device to list to automatically allow or deny connection request. \n
3140  * @param mac_address              device mac address to delete from list.
3141  *
3142  * \see wifi_direct_add_to_access_list.
3143  *
3144  * \par Sync (or) Async:
3145  * This is a Synchronous API.
3146  *
3147  * \warning
3148  *  None
3149  *
3150  *
3151  * \return Return Type (int) \n
3152  *      WIFI_DIRECT_ERROR_NONE on Success \n
3153  *      WIFI_DIRECT_ERROR_NOT_PERMITTED  for Operation not permitted \n
3154  *      WIFI_DIRECT_ERROR_OUT_OF_MEMORY  for Out of memory \n
3155  *      WIFI_DIRECT_ERROR_RESOURCE_BUSY  for Device or resource busy \n
3156  *      WIFI_DIRECT_ERROR_INVALID_PARAMETER for Invalid function parameter \n
3157  *      WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT for Connection timed out \n
3158  *      WIFI_DIRECT_ERROR_NOT_INITIALIZED Not for initialized \n
3159  *      WIFI_DIRECT_ERROR_COMMUNICATION_FAILED for I/O error \n
3160  *      WIFI_DIRECT_ERROR_WIFI_USED for WiFi is being used \n
3161  *      WIFI_DIRECT_ERROR_MOBILE_AP_USED for Mobile AP is being used \n
3162  *      WIFI_DIRECT_ERROR_CONNECTION_FAILED for Connection failed \n
3163  *      WIFI_DIRECT_ERROR_AUTH_FAILED for Authentication failed \n
3164  *      WIFI_DIRECT_ERROR_OPERATION_FAILED for Operation failed \n
3165  *      WIFI_DIRECT_ERROR_TOO_MANY_CLIENT for Too many client \n
3166  *      WIFI_DIRECT_ERROR_ALREADY_INITIALIZED for Already initialized client \n
3167  *      WIFI_DIRECT_ERROR_CONNECTION_CANCELED \n
3168  *
3169  *
3170  *
3171  *\endcode
3172  *
3173  *\remarks None.
3174  *
3175  ******************************************************************************/
3176 int wifi_direct_del_from_access_list(const char *mac_address);
3177
3178 /**
3179  * @}
3180  */
3181
3182 #ifdef __cplusplus
3183 }
3184 #endif
3185
3186 #endif                                                  //__WIFI_DIRECT_INTERFACE_H_