[Prototype] Add asynchronous API for forgeting acces point. 83/180383/7
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 29 May 2018 05:02:44 +0000 (10:32 +0530)
committertaesub kim <taesub.kim@samsung.com>
Fri, 22 Jun 2018 03:44:03 +0000 (12:44 +0900)
Description:
This patch adds prototype for new API "wifi_manager_forget_ap_async()".
Using this API application can asynchronously forget acces point and
disconnect from it, if it was connected.

Change-Id: Id9d049b4945d3b4b81d2c022bfd02a06c9e098a8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
include/wifi-manager.h
packaging/capi-network-wifi-manager.spec

index b1a2d79..adca565 100755 (executable)
@@ -914,6 +914,19 @@ typedef void(*wifi_manager_connected_cb)(wifi_manager_error_e result, void *user
 typedef void(*wifi_manager_disconnected_cb)(wifi_manager_error_e result, void *user_data);
 
 /**
+ * @brief Called after wifi_manager_forget_ap_async() is completed.
+ * @details The following error codes can be received: \n
+ *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
+ *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
+ * @since_tizen 5.0
+ * @param[in] result        The result
+ * @param[in] user_data     The user data passed from wifi_manager_forget_ap_async()
+ * @pre wifi_manager_forget_ap_async() will invoke this callback function.
+ * @see wifi_manager_forget_ap_async()
+ */
+typedef void(*wifi_manager_forget_ap_finished_cb)(wifi_manager_error_e result, void *user_data);
+
+/**
  * @brief Called when the BSSID scan is finished.
  * @since_tizen 4.0
  * @param[in] error_code    The error code
@@ -1697,6 +1710,29 @@ int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin);
 int wifi_manager_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap);
 
 /**
+ * @brief Deletes stored access point's information and disconnects from it if connected, asynchronously.
+ * @since_tizen 5.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *            %http://tizen.org/privilege/network.get
+ * @remarks This function needs both privileges.
+ * @param[in] wifi            The Wi-Fi handle
+ * @param[in] ap              The access point handle
+ * @param[in] callback        The callback function 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_INVALID_OPERATION    Invalid operation
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
+ * @post This function invokes wifi_manager_forget_ap_finished_cb().
+ */
+int wifi_manager_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
+               wifi_manager_forget_ap_finished_cb callback, void *user_data);
+
+/**
  * @brief Updates an existing AP.
  * @details When a AP is changed, these changes will be not applied to the Connection Manager immediately.
  * When you call this function, your changes affect the Connection Manager and the existing AP is updated.
@@ -3321,9 +3357,9 @@ int wifi_manager_config_set_eap_anonymous_identity(wifi_manager_config_h config,
  * @since_tizen 3.0
  * @remarks You must release @a ca_cert using free().
  * @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n
- *            if @a image_path is relevant to media storage.\n
+ *            if @a ca_cert is relevant to media storage.\n
  *            The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n
- *            if @a image_path is relevant to external storage.
+ *            if @a ca_cert is relevant to external storage.
  *
  * @param[in] config           The access point configuration handle
  * @param[out] ca_cert         The certification authority(CA) certificates file of access point
@@ -3338,9 +3374,9 @@ int wifi_manager_config_get_eap_ca_cert_file(wifi_manager_config_h config, char
  * @brief Sets access point cacert file to configuration.
  * @since_tizen 3.0
  * @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n
- *            if @a image_path is relevant to media storage.\n
+ *            if @a ca_cert is relevant to media storage.\n
  *            The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n
- *            if @a image_path is relevant to external storage.
+ *            if @a ca_cert is relevant to external storage.
  *
  * @param[in] config           The access point configuration handle
  * @param[in] ca_cert          The certification authority(CA) certificates file of access point
index 16b73c2..86813d6 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.0.36
+Version:       1.0.37
 Release:       1
 Group:         System/Network
 License:       Apache-2.0