[wifi-direct]: Add prototype of "wifi_direct_get_peer_rssi" CAPI 94/87294/9
authorManeesh Jain <maneesh.jain@samsung.com>
Wed, 7 Sep 2016 08:36:00 +0000 (14:06 +0530)
committerYu Jiung <jiung.yu@samsung.com>
Thu, 29 Sep 2016 07:36:19 +0000 (16:36 +0900)
Change-Id: I24159b8f264477c304b1646e5c1052b90ef0126f
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
include/wifi-direct.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index bf2b0e3..b67e64a
@@ -38,12 +38,12 @@ extern "C" {
  */
 typedef enum {
        WIFI_DIRECT_ERROR_NONE = TIZEN_ERROR_NONE,  /**< Successful */
-       WIFI_DIRECT_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED,  /**< Operation not permitted(1) */
-       WIFI_DIRECT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,  /**< Out of memory(12) */
-       WIFI_DIRECT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,  /**< Permission denied(13) */
-       WIFI_DIRECT_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY,  /**< Device or resource busy(16) */
-       WIFI_DIRECT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,  /**< Invalid function parameter(22) */
-       WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT = TIZEN_ERROR_CONNECTION_TIME_OUT,  /**< Connection timed out(110) */
+       WIFI_DIRECT_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED,  /**< Operation not permitted */
+       WIFI_DIRECT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,  /**< Out of memory */
+       WIFI_DIRECT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,  /**< Permission denied */
+       WIFI_DIRECT_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY,  /**< Device or resource busy */
+       WIFI_DIRECT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,  /**< Invalid function parameter */
+       WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT = TIZEN_ERROR_CONNECTION_TIME_OUT,  /**< Connection timed out */
        WIFI_DIRECT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,  /**< Not supported */
        WIFI_DIRECT_ERROR_NOT_INITIALIZED = TIZEN_ERROR_WIFI_DIRECT|0x01,  /**< Not initialized */
        WIFI_DIRECT_ERROR_COMMUNICATION_FAILED = TIZEN_ERROR_WIFI_DIRECT|0x02,  /**< I/O error */
@@ -442,7 +442,7 @@ typedef void (*wifi_direct_client_ip_address_assigned_cb) (const char *mac_addre
  * @param[in] user_data  User can transfer the user specific data in callback
  * @pre Either wifi_direct_start_service_discovery() or
  * wifi_direct_cancel_service_discovery() will invoke this callback in the
- * thread-default main context of thethread from which you registered this
+ * thread-default main context of the thread from which you registered this
  * callback using wifi_direct_set_service_state_changed_cb().
  * @see wifi_direct_start_discovery()
  * @see wifi_direct_cancel_discovery()
@@ -455,7 +455,7 @@ typedef void (*wifi_direct_service_state_changed_cb) (int error_code,
                                                const char *mac_address, void *user_data);
 
 /**
- * @brief Called when the state of Wi-FI Direct is changed.
+ * @brief Called when the state of Wi-Fi Direct is changed.
  * @since_tizen 3.0
  * @param[in] state  The Wi-Fi Direct state
  * @param[in] user_data  The user data passed from the callback registration function
@@ -1006,7 +1006,7 @@ int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb callback,
 int wifi_direct_create_group(void);
 
 /**
- * @brief Destorys the Wi-Fi Direct Group, asynchronous.
+ * @brief Destroys the Wi-Fi Direct Group, asynchronous.
  * @since_tizen 2.3
  * @privlevel public
  * @privilege http://tizen.org/privilege/wifidirect
@@ -1757,7 +1757,7 @@ int wifi_direct_set_autoconnection_peer(char *mac_address);
  * @since_tizen 2.3
  * @privlevel public
  * @privilege http://tizen.org/privilege/wifidirect
- * @details If @a enabled is true, then P2P persisten group will be used while creating a group and establishing a connection.
+ * @details If @a enabled is true, then P2P persistent group will be used while creating a group and establishing a connection.
  * @param[in] enabled  The status of persistent group: (@c true = enabled, @c false = disabled)
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
@@ -1948,7 +1948,7 @@ int wifi_direct_register_service(wifi_direct_service_type_e service_type,
 int wifi_direct_deregister_service(unsigned int service_id);
 
 /**
- * @brief Initializes OR Deintializes the WiFi-Direct Display (MIRACAST) service.
+ * @brief Initializes OR Deinitializes the WiFi-Direct Display (MIRACAST) service.
  * @since_tizen 2.3
  * @privlevel public
  * @privilege http://tizen.org/privilege/wifidirect
@@ -2091,7 +2091,7 @@ int wifi_direct_set_display_availability(bool availability);
  * @privilege http://tizen.org/privilege/wifidirect
  * @param[in] mac_address  MAC Address of the PEER
  * @param[out] type  The information of a peer's Wi-Fi Display device type.
- * If there's no Wi-Fi Direct information, this will be NULL
+ * If this function returns an error, this value will be unchanged
  * @return 0 on success, otherwise a negative error value
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
@@ -2114,7 +2114,7 @@ int wifi_direct_get_peer_display_type(char *mac_address, wifi_direct_display_typ
  * @privilege http://tizen.org/privilege/wifidirect
  * @param[in] mac_address  MAC Address of the PEER
  * @param[out] availability  The information of a peer's Wi-Fi Display session availability.
- * If there's no Wi-Fi Direct information, this will be NULL
+ * If this function returns an error, this value will be unchanged
  * @return 0 on success, otherwise a negative error value
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
@@ -2137,7 +2137,7 @@ int wifi_direct_get_peer_display_availability(char *mac_address, bool *availabil
  * @privilege http://tizen.org/privilege/wifidirect
  * @param[in] mac_address  MAC Address of the PEER
  * @param[out] hdcp  The information of a peer's Wi-Fi Display HDCP support.
- * If there's no Wi-Fi Direct information, this will be NULL
+ * If this function returns an error, this value will be unchanged
  * @return 0 on success, otherwise a negative error value
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
@@ -2160,7 +2160,7 @@ int wifi_direct_get_peer_display_hdcp(char *mac_address, int *hdcp);
  * @privilege http://tizen.org/privilege/wifidirect
  * @param[in] mac_address  MAC Address of the PEER
  * @param[out] port  The information of a peer's Wi-Fi Display RTSP control port.
- * If there's no Wi-Fi Direct information, this will be NULL
+ * If this function returns any error, this value will be unchanged
  * @return 0 on success, otherwise a negative error value
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
@@ -2183,7 +2183,7 @@ int wifi_direct_get_peer_display_port(char *mac_address, int *port);
  * @privilege http://tizen.org/privilege/wifidirect
  * @param[in] mac_address  MAC Address of the PEER
  * @param[out] throughput  The information of a peer's Wi-Fi Display max throughput (Mbps).
- * If there's no Wi-Fi Direct information, this will be NULL
+ * If this function returns any error, this value will be unchanged
  * @return 0 on success, otherwise a negative error value
  * @retval #WIFI_DIRECT_ERROR_NONE  Successful
  * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
@@ -2198,6 +2198,7 @@ int wifi_direct_get_peer_display_port(char *mac_address, int *port);
  * @see wifi_direct_foreach_discovered_peers()
  */
 int wifi_direct_get_peer_display_throughput(char *mac_address, int *throughput);
+
 /**
  * @brief Enables / Disables automatic group removal feature when all peers are disconnected.
  * @since_tizen 3.0
@@ -2253,7 +2254,7 @@ int wifi_direct_set_session_timer(int seconds);
 * @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
 * @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
 * @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
- * @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED  Permission denied
+* @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED  Permission denied
 * @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
 * @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
 * @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
@@ -2262,6 +2263,27 @@ int wifi_direct_set_session_timer(int seconds);
 */
 int wifi_direct_get_session_timer(int *seconds);
 
+/**
+* @brief Gets the peer's RSSI value.
+* @since_tizen 3.0
+* @privlevel public
+* @privilege http://tizen.org/privilege/wifidirect
+* @param[in] mac_address  MAC Address of the peer device
+* @param[out] rssi RSSI value of the peer device
+* @return 0 on success, otherwise a negative error value
+* @retval #WIFI_DIRECT_ERROR_NONE  Successful
+* @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER  Invalid parameter
+* @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED  Operation failed
+* @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED  Communication failed
+* @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED  Permission denied
+* @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED  Operation not permitted
+* @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED  Not supported
+* @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED  Not initialized
+* @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY  Device or resource busy
+* @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize().
+* @see wifi_direct_activate()
+*/
+ int wifi_direct_get_peer_rssi(char *mac_address, int *rssi);
 
 /**
  * @}