* @param[in] autoscan true to enable and false to disable
*
* @return 0 on success, otherwise negative error value
- * @retval #WIFI_ERROR_NONE Successful
- * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
- * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NONE Successful
+ * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @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 This API needs wifi_initialize() before use.
*/
int wifi_manager_set_autoscan(wifi_manager_h wifi, bool autoscan);
* @param[in] mode The auto scan mode
*
* @return 0 on success, otherwise negative error value
- * @retval #WIFI_ERROR_NONE Successful
- * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @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_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
* @pre This API needs wifi_initialize() before use.
*/
int wifi_manager_set_autoscan_mode(wifi_manager_h wifi,
* @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_NOT_SUPPORTED Not supported
*/
int wifi_manager_flush_bss(wifi_manager_h wifi);
* @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_NOT_SUPPORTED Not supported
*/
int wifi_manager_set_auto_connect(wifi_manager_h wifi, int connect_mode);
* @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_NOT_SUPPORTED Not supported
*/
int wifi_manager_get_auto_connect(wifi_manager_h wifi, int *connect_mode);
/**
+ * @brief Enables or disables passpoint.
+ * @since_tizen 5.0
+ *
+ * @param[in] wifi The Wi-Fi handle
+ * @param[in] passpoint true to enable and false to disable
+ *
+ * @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_NOT_SUPPORTED Not supported
+ */
+int wifi_manager_set_passpoint(wifi_manager_h wifi, int passpoint);
+
+/**
+ * @brief Gets the passpoint state.
+ * @since_tizen 5.0
+ *
+ * @param[in] wifi The Wi-Fi handle
+ * @param[out] passpoint The passpoint state(enable or disable)
+ *
+ * @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_NOT_SUPPORTED Not supported
+ */
+int wifi_manager_get_passpoint(wifi_manager_h wifi, int *passpoint);
+
+/**
* @brief Sets enables or disables auto-connection of the AP.
* @details If an AP is connected, then connection information will be stored.
* By default, the stored AP can be connected automatically when it found, until disabling auto-connection.
* @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
* @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 This API needs wifi_manager_initialize() and wifi_manager_activate() before use.
*/
int wifi_manager_ap_set_auto_connect(wifi_manager_ap_h ap, bool autoconnect);
* @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
* @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 This API needs wifi_manager_initialize() and wifi_manager_activate() before use.
*/
int wifi_manager_ap_get_auto_connect(wifi_manager_ap_h ap, bool *autoconnect);
__NETWORK_CAPI_FUNC_EXIT__;
return _wifi_get_autoscanmode(mode);
}
+
+EXPORT_API int wifi_manager_set_passpoint(wifi_manager_h wifi, int passpoint)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ int rv;
+
+ if (!(__wifi_check_handle_validity(wifi))) {
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ }
+
+ rv = _wifi_set_passpoint(passpoint);
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return rv;
+}
+
+EXPORT_API int wifi_manager_get_passpoint(wifi_manager_h wifi, int *passpoint)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ int rv;
+
+ if (!(__wifi_check_handle_validity(wifi)) || passpoint == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
+ }
+
+ rv = _wifi_get_passpoint(passpoint);
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return rv;
+}
//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_set_module_state_changed_cb(wifi_manager_h wifi,
else
printf("Fail to get WPS supported\n");
+ if (wifi_manager_ap_is_passpoint(ap, &bool_value) == WIFI_MANAGER_ERROR_NONE)
+ printf("Passpoint enabled : %s\n", bool_value ? "TRUE" : "FALSE");
+ else
+ printf("Fail to get passpoint state\n");
+
if (sec_type != WIFI_MANAGER_SECURITY_TYPE_EAP) {
g_free(ap_name);
return false;
return 1;
}
+int test_wifi_manager_set_passpoint_enable(void)
+{
+ int rv;
+ int enable;
+
+ printf("Enter passpoint on/off(0:off, 1:on) : \n");
+ rv = scanf("%d", &enable);
+ if (rv <= 0)
+ return -1;
+
+ rv = wifi_manager_set_passpoint(wifi, enable);
+
+ if (rv != WIFI_MANAGER_ERROR_NONE) {
+ printf("Fail to set passpoint, rv = %d\n", rv);
+ }
+
+ printf("Request to set passpoint\n");
+ return 1;
+}
+
+int test_wifi_manager_get_passpoint_state(void)
+{
+ int rv;
+ int enabled;
+
+ rv = wifi_manager_get_passpoint(wifi, &enabled);
+
+ if (rv != WIFI_MANAGER_ERROR_NONE) {
+ printf("Fail to get passpoint state, rv = %d\n", rv);
+ return 1;
+ }
+
+ printf("current passpoint sate(0:off, 1:on) = [%d]\n", enabled);
+ return 1;
+}
+
int main(int argc, char **argv)
{
GMainLoop *mainloop;
printf("F - Set IP conflict detection mode\n");
printf("G - Get IP conflict detection mode\n");
printf("H - Get IP conflict state\n");
-/* Extension API */
+/* Extension APIs */
printf(LOG_BLUE "[Extension API]\n" LOG_END);
printf("I - Set Enable or Disable Auto Scan\n");
printf("J - Set Mode of Auto Scan\n");
printf("S - Get the IP conflict detection period\n");
printf("T - Netlink Scan\n");
printf("U - Netlink Specific Scan\n");
+ printf("V - Get passpoint state\n");
+ printf("W - Set passpoint on/off\n");
printf(LOG_RED "0 - Exit \n" LOG_END);
printf("ENTER - Show options menu.......\n");
case 'H':
rv = test_wifi_manager_get_ip_conflict_state();
break;
-/* Extension API */
+/* Extension APIs */
case 'I':
rv = test_wifi_manager_set_autoscan_state();
break;
case 'U':
rv = test_wifi_manager_netlink_scan_specific_ap();
break;
+ case 'V':
+ rv = test_wifi_manager_get_passpoint_state();
+ break;
+ case 'W':
+ rv = test_wifi_manager_set_passpoint_enable();
+ break;
default:
break;
}