Added prototype for new APIs 32/174132/8
authorMayank Haarit <mayank.h@samsung.com>
Wed, 28 Mar 2018 10:28:58 +0000 (15:58 +0530)
committerMayank Haarit <mayank.h@samsung.com>
Tue, 17 Apr 2018 09:19:01 +0000 (14:49 +0530)
This patch adds below APIs prototype in header file
a) To get the BSSID list
b) To get country code

Change-Id: I1fe38a341cebbedcd2ee20c272fdc43e6bfbb995
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
include/wifi-manager.h

index 1555dab..ee0aec4 100755 (executable)
@@ -2560,6 +2560,50 @@ int wifi_manager_ap_set_dns_address(wifi_manager_ap_h ap,
                int order, wifi_manager_address_family_e address_family, const char *dns_address);
 
 /**
+ * @brief Gets the raw country code.
+ * @since_tizen 5.0
+ * @remarks You must release @a country_code using free().
+ * @param[in] ap  The access point handle
+ * @param[out] country_code  The country code, NULL if M/W does not have the country code
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                         Successful
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER            Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY                Out of memory
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED                Not supported
+ */
+int wifi_manager_ap_get_countrycode(wifi_manager_ap_h ap, char **country_code);
+
+/**
+ * @brief Called for each found BSSID.
+ * @remarks  The @a bssid can be used only in the callback. To use it outside, make a copy.
+ *           @a bssid is managed by the platform and will be released after the execution
+ *           of this callback.
+ * @since_tizen 5.0
+ * @param[in]  bssid  The BSSID
+ * @param[in]  rssi  The RSSI
+ * @param[in]  freq  The frequency
+ * @param[in]  user_data  The user data passed from the foreach function
+ * @return  @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop
+ * @pre  wifi_manager_foreach_found_bssid() will invoke this callback.
+ */
+typedef bool(*wifi_manager_found_bssid_cb)(const char *bssid, int rssi, int freq, void *user_data);
+
+/**
+ * @brief Gets the BSSID list.
+ * @since_tizen 5.0
+ * @param[in] ap  The access point handle
+ * @param[in] callback  The callback to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                         Successful
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER            Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED             Operation failed
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED                Not supported
+ * @post This function invokes wifi_manager_found_bssid_cb().
+ */
+int wifi_manager_foreach_found_bssid(wifi_manager_ap_h ap, wifi_manager_found_bssid_cb callback, void *user_data);
+
+/**
 * @}
 */