src/dbus/netsupplicant.c
src/wifi-background-scan.c
src/wifi-config.c
+ src/wifi-extension.c
)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
--- /dev/null
+/*
+ * Network Extension Module
+ *
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __NETCONFIG_WIFI_EXTENSION_H__
+#define __NETCONFIG_WIFI_EXTENSION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+gboolean handle_flush_bss(Wifi *wifi, GDBusMethodInvocation *context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NETCONFIG_WIFI_EXTENSION_H__ */
+
</method>
<method name="PauseBgscan">
</method>
+ <method name="FlushBss">
+ </method>
<method name="GetAutoscan">
<arg type="b" name="autoscan" direction="out"/>
</method>
<allow send_destination="net.netconfig" send_interface="net.netconfig.network" send_member="DevicePolicyGetWifi" />
<allow send_destination="net.netconfig" send_interface="net.netconfig.network" send_member="DevicePolicyGetWifiProfile" />
+ <allow send_destination="net.netconfig" send_interface="net.netconfig.wifi" send_member="GetAutoscan" />
+ <allow send_destination="net.netconfig" send_interface="net.netconfig.wifi" send_member="GetAutoscanmode" />
+ <allow send_destination="net.netconfig" send_interface="net.netconfig.wifi" send_member="FlushBss" />
+
<check send_destination="net.netconfig" send_interface="net.netconfig.network" send_member="AddRoute" privilege="http://tizen.org/privilege/network.set" />
<check send_destination="net.netconfig" send_interface="net.netconfig.network" send_member="RemoveRoute" privilege="http://tizen.org/privilege/network.set" />
<check send_destination="net.netconfig" send_interface="net.netconfig.network" send_member="EthernetCableState" privilege="http://tizen.org/privilege/network.get" />
--- /dev/null
+/*
+ * Network Extension Module
+ *
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include "log.h"
+#include "util.h"
+#include "neterror.h"
+#include "netdbus.h"
+#include "netsupplicant.h"
+#include "wifi-state.h"
+#include "wifi-extension.h"
+
+
+gboolean handle_flush_bss(Wifi *wifi, GDBusMethodInvocation *context)
+{
+ DBG("Wi-Fi flush bss");
+
+ g_return_val_if_fail(wifi != NULL, FALSE);
+
+ GDBusConnection *connection = NULL;
+ const char *if_path = NULL;
+
+ if_path = netconfig_wifi_get_supplicant_interface();
+ if (if_path == NULL) {
+ netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
+ DBG("Fail to get wpa_supplicant DBus path");
+ return FALSE;
+ }
+
+ connection = netdbus_get_connection();
+ if (connection == NULL) {
+ netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
+ ERR("Failed to get netdbus connection");
+ return FALSE;
+ }
+
+
+ g_dbus_connection_call(connection,
+ SUPPLICANT_SERVICE,
+ if_path,
+ SUPPLICANT_INTERFACE ".Interface",
+ "FlushBSS",
+ g_variant_new("(u)", 0),
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ 10 * 1000,
+ netdbus_get_cancellable(),
+ NULL,
+ NULL);
+
+ wifi_complete_flush_bss(wifi, context);
+ return TRUE;
+}
#include "wifi-background-scan.h"
#include "wifi-config.h"
#include "wifi-tdls.h"
+#include "wifi-extension.h"
#define SPRD_CP2_FIRMWARE_PATH "/usr/bin/cp2-downloader"
static int is_wifi_firmware_downloaded = FALSE;
G_CALLBACK(handle_set_config_field), NULL);
g_signal_connect(wifi_object, "handle-get-config-passphrase",
G_CALLBACK(handle_get_config_passphrase), NULL);
+
/* WIFI EAP configuration */
g_signal_connect(wifi_object, "handle-save-eap-configuration",
G_CALLBACK(handle_save_eap_configuration), NULL);
g_signal_connect(wifi_object, "handle-pause-bgscan",
G_CALLBACK(handle_pause_bgscan), NULL);
- /*Auto Scan Mode */
+ /* Auto Scan Mode */
g_signal_connect(wifi_object, "handle-get-autoscan",
G_CALLBACK(handle_get_autoscan), NULL);
g_signal_connect(wifi_object, "handle-get-autoscanmode",
G_CALLBACK(handle_get_autoscanmode), NULL);
+ /* Extension API methods */
+ g_signal_connect(wifi_object, "handle-flush-bss",
+ G_CALLBACK(handle_flush_bss), NULL);
+
/* Passpoint */
g_signal_connect(wifi_object, "handle-set-passpoint",
G_CALLBACK(handle_set_passpoint), NULL);