* @since_tizen 6.0
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
* @see wifi_aware_initialize()
*/
int wifi_aware_deinitialize();
* @param[out] publish The Wi-Fi Aware Publish handle.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
* @see wifi_aware_publish_destroy()
*/
int wifi_aware_publish_create(wifi_aware_publish_h *publish);
* @param[in] publish The Wi-Fi Aware Publish handle.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_publish_create()
*/
int wifi_aware_publish_destroy(wifi_aware_publish_h publish);
* @param[out] subscribe The Wi-Fi Aware Subscribe handle.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
* @see wifi_aware_subscribe_destroy()
*/
int wifi_aware_subscribe_create(wifi_aware_subscribe_h *subscribe);
* @param[in] subscribe The Wi-Fi Aware Subscribe handle.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscribe_create()
*/
int wifi_aware_subscribe_destroy(wifi_aware_subscribe_h subscribe);
* @param[in] ttl The lifetime(seconds) of publish session. 0 means forever until canceled.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_publish_create()
*/
int wifi_aware_publish_set_ttl(wifi_aware_publish_h publish, unsigned short ttl);
* @param[in] publish_type The Publish type
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_publish_create()
*/
int wifi_aware_publish_set_type(wifi_aware_publish_h publish, wifi_aware_publish_type_e publish_type);
* @param[in] service_name UTF-8 name which identifies the service
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_publish_create()
*/
int wifi_aware_publish_set_service_name(wifi_aware_publish_h publish, const char *service_name);
* 0 means forever until wifi_aware_service_discovered_cb.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_ttl(wifi_aware_subscribe_h subscribe, unsigned short ttl);
* @param[in] subscribe_type The Subscribe type
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_type(wifi_aware_subscribe_h subscribe, wifi_aware_subscribe_type_e subscribe_type);
* @remark The length should be less than or equal to 255
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_service_name(wifi_aware_subscribe_h subscribe, const char *service_name);
* @param[in] len The length of service specific information
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_service_specific_info(wifi_aware_subscribe_h subscribe, const unsigned char *service_specific_info, size_t len);
* @remark The match filter is used to decide whether accepting a subscribe request or not.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_match_filter(wifi_aware_subscribe_h subscribe, const unsigned char *match_filter, size_t len);
* @param[in] distance The maximum distance
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_max_distance(wifi_aware_subscribe_h subscribe, int distance);
* @param[in] distance The minimum distance
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_subscrbie_create()
*/
int wifi_aware_subscribe_set_min_distance(wifi_aware_subscribe_h subscribe, int distance);
* @since_tizen 6.0
* @param[in] error The error code
* @param[in] user_data The user data passed from the request function
- * @return 0 on success, otherwise a negative error value
- * @retval #WIFI_AWARE_ERROR_NONE
* @see wifi_aware_enable()
*/
typedef void(*wifi_aware_enabled_cb)(wifi_aware_error_e error, void *user_data);
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_ALREADY_ENABLED
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_disable()
*/
int wifi_aware_enable(wifi_aware_enabled_cb callback, void *user_data);
* @since_tizen 6.0
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_enable()
*/
int wifi_aware_disable();
* @param[out] session The Wi-Fi Aware Session handle that is newly created on success
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_destroy()
*/
int wifi_aware_session_create(wifi_aware_session_type_e session_type, wifi_aware_session_h *session);
* @param[in] session The Wi-Fi Aware Session handle
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_create()
*/
int wifi_aware_session_destroy(wifi_aware_session_h session);
* @param[in] user_data The user data to be passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_unset_terminated_cb()
*/
int wifi_aware_session_set_terminated_cb(wifi_aware_session_h session,
* @param[in] session The Wi-Fi Aware Session
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_set_terminated_cb()
*/
int wifi_aware_session_unset_terminated_cb(wifi_aware_session_h session);
* @remark The function of the session, Publish or Subscribe, will be cancelled.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_session_publish()
* @see wifi_aware_session_subscribe()
*/
* @param[in] session The Wi-Fi Aware Session handle
* @param[in] error The error code
* @param[in] user_data The user data passed from request function
- * @retval #WIFI_AWARE_ERROR_NONE
* @see wifi_aware_session_publish()
* @see wifi_aware_session_update_publish()
*/
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_session_stop()
*/
int wifi_aware_session_publish(wifi_aware_session_h session,
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_session_publish()
*/
int wifi_aware_session_update_publish(wifi_aware_session_h session,
* @param[in] session The Wi-Fi Aware Session handle
* @param[in] error The error code
* @param[in] user_data The user data passed from request function
- * @retval #WIFI_AWARE_ERROR_NONE
* @see wifi_aware_session_subscribe()
*/
typedef void(*wifi_aware_subscribed_cb)(wifi_aware_session_h session,
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_session_stop()
*/
int wifi_aware_session_subscribe(wifi_aware_session_h,
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_session_subscribe()
*/
int wifi_aware_session_update_subscribe(wifi_aware_session_h session,
* @param[in] service_specific_info Sequence of octets which were received from published service
* @param[in] service_specific_info_len The length of @a service_specific_info
* @param[in] distance The distance to the peer
- * @retval #WIFI_AWARE_ERROR_NONE
* @see wifi_aware_session_set_service_discovered_cb()
* @see wifi_aware_session_unset_service_discovered_cb()
*/
* @param[in] user_data The user data to be passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_unset_service_discovered_cb()
*/
int wifi_aware_session_set_service_discovered_cb(wifi_aware_session_h session,
* @param[in] session The Wi-Fi Aware Session handle
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_set_service_discovered_cb()
*/
int wifi_aware_session_unset_service_discovered_cb(wifi_aware_session_h session);
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
*/
int wifi_aware_session_send_message(
wifi_aware_session_h session,
* @param[in] peer The peer who sent the message
* @param[in] message The message which is sent
* @param[in] len The length of the message
- * @retval #WIFI_AWARE_ERROR_NONE
* @see wifi_aware_session_set_message_received_cb()
* @see wifi_aware_session_unset_message_received_cb()
*/
* @param[in] user_data The user data paseed to @a callback
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_unset_message_received_cb()
*/
int wifi_aware_session_set_message_received_cb(wifi_aware_session_h session,
* @param[in] session The Wi-Fi Aware Session handle
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_session_set_message_received_cb()
*/
int wifi_aware_session_unset_message_received_cb(wifi_aware_session_h session);
* @remark The cloned Peer handle has to be freed by wifi_aware_peer_destroy()
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
* @see wifi_aware_peer_destroy()
*/
int wifi_aware_peer_clone(wifi_aware_peer_h *cloned, wifi_aware_peer_h origin);
* @param[in] peer The Peer handle
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_peer_clone()
*/
int wifi_aware_peer_destroy(wifi_aware_peer_h peer);
* @param[in] peer The Peer handle
* @param[out] mac The MAC address of the peer
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
*/
int wifi_aware_peer_get_mac(wifi_aware_peer_h peer, unsigned char **mac);
* @param[in] peer The Peer handle
* @param[out] data_path The Data Path handle
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OUT_OF_MEMORY
* @see wifi_aware_data_path_destroy()
*/
int wifi_aware_data_path_create(wifi_aware_session_h session, wifi_aware_peer_h peer,
* @param[in] data_path The Data Path handle
* @param[in] security_type The security type
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_data_path_create()
*/
int wifi_aware_data_path_set_security(wifi_aware_data_path_h data_path, wifi_aware_security_type_e security_type);
* @param[in] key The passphrase
* @remark @a key can be used only when secury type is WIFI_AWARE_SECURITY_TYPE_PSK.
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
* @see wifi_aware_data_path_create()
*/
int wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, const char *key);
* @param[in] data_path The Data Path handle
* @param[in] key Pairwise Master Key. Its length shall be of length 32.
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
* @see wifi_aware_data_path_create()
*/
int wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, const unsigned char *key);
* @a port cannot be exceed 65535.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_data_path_create()
*/
int wifi_aware_data_path_set_port(wifi_aware_data_path_h data_path, int port);
* @since_tizen 6.0
* @param[in] data_path The Data Path handle
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_data_path_create()
*/
int wifi_aware_data_path_destroy(wifi_aware_data_path_h data_path);
* @param[in] callback The callback function
* @param[in] user_data The user data passed to the callback function
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_data_path_close()
*/
int wifi_aware_data_path_open(wifi_aware_data_path_h data_path,
* @brief Closes a Wi-Fi Aware Data Path.
* @since_tizen 6.0
* @param[in] data_path The Data Path handle
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_OPERATION_FAILED
* @see wifi_aware_data_path_open()
*/
int wifi_aware_data_path_close(wifi_aware_data_path_h data_path);
* @param[out] port The port
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
*/
int wifi_aware_data_path_get_peer_port(wifi_aware_data_path_h data_path, int* port);
* @param[out] ipv6_address The IPv6 address of a peer
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
*/
int wifi_aware_data_path_get_peer_ipv6_address(wifi_aware_data_path_h data_path, char **ipv6_address);
* @param[out] interface The interface name
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
+ * @retval #WIFI_AWARE_ERROR_INVALID_OPERATION
*/
int wifi_aware_data_path_get_interface(wifi_aware_data_path_h data_path, char **interface);
* @param[in] callback The callback function
* @param[in] user_data The user data paseed to the callback function
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_data_path_unset_terminated_cb()
*/
int wifi_aware_data_path_set_terminated_cb(wifi_aware_data_path_h data_path, wifi_aware_data_path_terminated_cb callback, void *user_data);
* @since_tizen 6.0
* @param[in] data_path The Data Path handle
* @return 0 on success, otherwise a negative error value
+ * @retval #WIFI_AWARE_ERROR_NONE
+ * @retval #WIFI_AWARE_ERROR_NOT_INITIALIZED
+ * @retval #WIFI_AWARE_ERROR_INVALID_PARAMETER
* @see wifi_aware_data_path_set_terminated_cb()
*/
int wifi_aware_data_path_unset_terminated_cb(wifi_aware_data_path_h data_path);