int _net_dbus_get_passpoint(int *enabled);
int _net_dbus_set_passpoint(int enable);
int _net_dbus_multi_scan_request(GSList *multi_scan_list);
+int _net_dbus_get_max_scan_ssids(int *max_scan_ssids);
int _net_dbus_cancel_wps(void);
int _net_dbus_open_connection_without_ssid();
int net_wifi_set_passpoint(int enable);
int net_wifi_get_scan_state(int *scan_state);
int net_multi_scan_wifi(GSList *specific_scan_list, gboolean multi_scan_type[]);
+int net_wifi_get_max_scan_ssids(int *max_scan_ssids);
int net_wifi_add_vsie(unsigned int frame_id, const char *vsie_str);
int net_wifi_get_vsie(unsigned int frame_id, char **vsie_str);
int _wifi_start_multi_scan(wifi_manager_h wifi,
wifi_manager_specific_scan_h specific_scan,
wifi_manager_scan_finished_cb callback, void *user_data);
+int _wifi_get_max_scan_ssids(int *max_scan_ssids);
/* WIFI Configuration */
bool _wifi_check_config_validity(wifi_manager_config_h config_h);
__NETWORK_FUNC_EXIT__;
return Error;
}
+
+int _net_dbus_get_max_scan_ssids(int *max_scan_ssids)
+{
+ __NETWORK_FUNC_ENTER__;
+
+ net_err_e Error = NET_ERR_NONE;
+ GVariant *message = NULL;
+ GVariant *value = NULL;
+ GVariantIter *iter = NULL;
+ gchar *key = NULL;
+
+ message = _net_invoke_dbus_method(
+ CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+ CONNMAN_TECHNOLOGY_INTERFACE, "GetMaxScanSsid", NULL, &Error);
+ if (message == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Failed to get Max scan SSIDs.");
+ *max_scan_ssids = 0;
+
+ __NETWORK_FUNC_EXIT__;
+ return Error;
+ }
+
+ g_variant_get(message, "(a{sv})", &iter);
+
+ while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+ if (g_strcmp0(key, "MaxScanSSID") == 0) {
+ *max_scan_ssids = g_variant_get_int32(value);
+ WIFI_LOG(WIFI_INFO, "Successfully get Max scan SSIDs: %d", *max_scan_ssids);
+ g_variant_unref(value);
+ g_free(key);
+ break;
+ }
+ }
+
+ g_variant_iter_free(iter);
+ g_variant_unref(message);
+
+ __NETWORK_FUNC_EXIT__;
+ return Error;
+}
//LCOV_EXCL_STOP
return _net_get_service_state();
}
+int net_wifi_get_max_scan_ssids(int *max_scan_ssids)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ net_err_e Error = NET_ERR_NONE;
+
+ if (NetworkInfo.ref_count < 1) {
+ WIFI_LOG(WIFI_ERROR, "Application is not registered");
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return NET_ERR_APP_NOT_REGISTERED;
+ }
+
+ Error = _net_dbus_get_max_scan_ssids(max_scan_ssids);
+ if (Error != NET_ERR_NONE) {
+ WIFI_LOG(WIFI_ERROR,
+ "Failed to get Max scan SSIDs. Error [%s]",
+ _net_print_error(Error));
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return Error;
+ }
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return NET_ERR_NONE;
+}
//LCOV_EXCL_STOP
return ret;
}
+
+int _wifi_get_max_scan_ssids(int *max_scan_ssids)
+{
+ int rv;
+
+ rv = net_wifi_get_max_scan_ssids(max_scan_ssids);
+
+ if (rv == NET_ERR_ACCESS_DENIED) {
+ WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+ } else if (rv != NET_ERR_NONE) {
+ WIFI_LOG(WIFI_ERROR, "Failed to get driver_max_scan_ssids"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+ }
+
+ return WIFI_MANAGER_ERROR_NONE;
+}
return WIFI_MANAGER_ERROR_NONE;
}
+EXPORT_API int wifi_manager_specific_scan_get_max_ssid(wifi_manager_h wifi, int *max_scan_ssids)
+{
+ __NETWORK_CAPI_FUNC_ENTER__;
+
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+ int rv;
+
+ RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
+
+ if (max_scan_ssids == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+ }
+
+ rv = _wifi_get_max_scan_ssids(max_scan_ssids);
+
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return rv;
+}
+
EXPORT_API int wifi_manager_specific_scan_set_ssid(wifi_manager_specific_scan_h specific_scan,
const char *essid)
{