From: Niraj Kumar Goit Date: Mon, 24 Jul 2017 12:04:52 +0000 (+0530) Subject: Add new CAPI's to configure the VSIE for Wi-Fi Frames X-Git-Tag: submit/tizen/20170803.074947~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a770280435357f1a2860f49679f6f7427d9cedfd;p=platform%2Fcore%2Fapi%2Fwifi-manager.git Add new CAPI's to configure the VSIE for Wi-Fi Frames Description: Following CAPI's is added : 1. wifi_manager_add_vsie() 2. wifi_manager_remove_vsie(); 3. wifi_manager_get_vsie(); Change-Id: I7e5b71807665f8d2692a18f16e50cfab5d6aee41 --- diff --git a/include/wifi_manager_extension.h b/include/wifi_manager_extension.h index 57cade3..e0da8c0 100755 --- a/include/wifi_manager_extension.h +++ b/include/wifi_manager_extension.h @@ -48,6 +48,45 @@ typedef enum { */ /** + * @brief Enumeration for Wi-Fi Frame type. + * @since_tizen 4.0 + * @see wifi_manager_add_vsie() + * @see wifi_manager_remove_vsie() + * @see wifi_manager_get_vsie() + */ +typedef enum { + /** + * WiFi probe request frame + */ + WIFI_MANGAER_VSIE_FRAME_PROB_REQ, + + /** + * WiFi assocition request frame + */ + WIFI_MANGAER_VSIE_FRAME_ASSOC_REQ, + + /** + * WiFi re-assocition request frame + */ + WIFI_MANGAER_VSIE_FRAME_REASSOC, + + /** + * WiFi auth request frame + */ + WIFI_MANGAER_VSIE_FRAME_AUTH_REQ, + + /** + * WiFi auth request frame + */ + WIFI_MANGAER_VSIE_FRAME_ACTION, + +} wifi_manager_vsie_frames_e; + +/** +* @} +*/ + +/** * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MANAGEMENT_MODULE * @{ */ @@ -127,6 +166,80 @@ int wifi_manager_get_autoscan_mode(wifi_manager_h wifi, wifi_manager_autoscan_mode_e *mode); /** + * @brief Adds the Wi-Fi Vendor Specific Information Element (VSIE) to specific frame type. + * @since_tizen 4.0 + * @privlevel public + * @privilege http://tizen.org/privilege/network.set + * @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. + * @param[in] wifi The wifi handle + * @param[in] frame_id frame ID for setting VSIE + * @param[in] vsie_str VSIE data + * @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 + * @pre Wi-Fi service must be activated by wifi_manager_activate(). + * @see wifi_manager_activate() + * @see wifi_manager_remove_vsie() + * @see wifi_manager_get_vsie() + */ +int wifi_manager_add_vsie(wifi_manager_h wifi, + wifi_manager_vsie_frames_e frame_id, const char *vsie_str); + +/** + * @brief Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from specific frame. + * @since_tizen 4.0 + * @privlevel public + * @privilege http://tizen.org/privilege/network.get + * @remarks @a vsie_str must be released with free(). + * @param[in] wifi The wifi handle + * @param[in] frame_id frame ID for setting VSIE + * @param[out] vsie_str VSIE data + * @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 + * @pre Wi-Fi service must be activated by wifi_manager_activate() + * and set VSIE for specific frame by wifi_manager_add_vsie(). + * @see wifi_manager_activate() + * @see wifi_manager_remove_vsie() + * @see wifi_manager_add_vsie() + */ +int wifi_manager_get_vsie(wifi_manager_h wifi, + wifi_manager_vsie_frames_e frame_id, char **vsie_str); + +/** + * @brief Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame. + * @since_tizen 4.0 + * @privlevel public + * @privilege http://tizen.org/privilege/network.set + * @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. + * @param[in] wifi The wifi handle + * @param[in] frame_id frame ID for removing VSIE + * @param[in] vsie_str VSIE data + * @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 + * @pre Wi-Fi service must be activated by wifi_manabger_activate() + * and set VSIE for specific frame by wifi_manager_add_vsie(). + * @see wifi_manager_activate() + * @see wifi_manager_get_vsie() + * @see wifi_manager_add_vsie() + */ +int wifi_manager_remove_vsie(wifi_manager_h wifi, + wifi_manager_vsie_frames_e frame_id, const char *vsie_str); + +/** * @} */