NetworkManager r3742 - in trunk: . include introspection libnm-glib libnm-util src test
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3742 - in trunk: . include introspection libnm-glib libnm-util src test
- Date: Tue, 10 Jun 2008 16:32:39 +0000 (UTC)
Author: dcbw
Date: Tue Jun 10 16:32:39 2008
New Revision: 3742
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3742&view=rev
Log:
2008-06-10 Dan Williams <dcbw redhat com>
The grand 802-11-wireless rename. Get rid of the 802-11/80211/802_11 bits
and use "wifi" everwhere instead.
Added:
trunk/introspection/nm-device-wifi.xml
- copied unchanged from r3739, /trunk/introspection/nm-device-802-11-wireless.xml
trunk/libnm-glib/nm-device-wifi.c
- copied, changed from r3739, /trunk/libnm-glib/nm-device-802-11-wireless.c
trunk/libnm-glib/nm-device-wifi.h
- copied, changed from r3739, /trunk/libnm-glib/nm-device-802-11-wireless.h
trunk/src/nm-device-wifi.c
- copied, changed from r3741, /trunk/src/nm-device-802-11-wireless.c
trunk/src/nm-device-wifi.h
- copied, changed from r3739, /trunk/src/nm-device-802-11-wireless.h
Removed:
trunk/introspection/nm-device-802-11-wireless.xml
trunk/libnm-glib/nm-device-802-11-wireless.c
trunk/libnm-glib/nm-device-802-11-wireless.h
trunk/src/nm-device-802-11-wireless.c
trunk/src/nm-device-802-11-wireless.h
Modified:
trunk/ChangeLog
trunk/include/NetworkManager.h
trunk/introspection/Makefile.am
trunk/introspection/all.xml
trunk/libnm-glib/Makefile.am
trunk/libnm-glib/libnm-glib-test.c
trunk/libnm-glib/nm-client.c
trunk/libnm-glib/nm-device.c
trunk/libnm-util/nm-utils.c
trunk/src/Makefile.am
trunk/src/NetworkManagerPolicy.c
trunk/src/NetworkManagerUtils.c
trunk/src/autoip.c
trunk/src/nm-hal-manager.c
trunk/src/nm-manager.c
trunk/test/nm-tool.c
Modified: trunk/include/NetworkManager.h
==============================================================================
--- trunk/include/NetworkManager.h (original)
+++ trunk/include/NetworkManager.h Tue Jun 10 16:32:39 2008
@@ -95,13 +95,13 @@
/* 802.11 wireless device-specific capabilities */
-#define NM_802_11_DEVICE_CAP_NONE 0x00000000
-#define NM_802_11_DEVICE_CAP_CIPHER_WEP40 0x00000001
-#define NM_802_11_DEVICE_CAP_CIPHER_WEP104 0x00000002
-#define NM_802_11_DEVICE_CAP_CIPHER_TKIP 0x00000004
-#define NM_802_11_DEVICE_CAP_CIPHER_CCMP 0x00000008
-#define NM_802_11_DEVICE_CAP_WPA 0x00000010
-#define NM_802_11_DEVICE_CAP_RSN 0x00000020
+#define NM_WIFI_DEVICE_CAP_NONE 0x00000000
+#define NM_WIFI_DEVICE_CAP_CIPHER_WEP40 0x00000001
+#define NM_WIFI_DEVICE_CAP_CIPHER_WEP104 0x00000002
+#define NM_WIFI_DEVICE_CAP_CIPHER_TKIP 0x00000004
+#define NM_WIFI_DEVICE_CAP_CIPHER_CCMP 0x00000008
+#define NM_WIFI_DEVICE_CAP_WPA 0x00000010
+#define NM_WIFI_DEVICE_CAP_RSN 0x00000020
/*
Modified: trunk/introspection/Makefile.am
==============================================================================
--- trunk/introspection/Makefile.am (original)
+++ trunk/introspection/Makefile.am Tue Jun 10 16:32:39 2008
@@ -1,6 +1,6 @@
EXTRA_DIST = \
nm-access-point.xml \
- nm-device-802-11-wireless.xml \
+ nm-device-wifi.xml \
nm-device-ethernet.xml \
nm-device-cdma.xml \
nm-device-gsm.xml \
Modified: trunk/introspection/all.xml
==============================================================================
--- trunk/introspection/all.xml (original)
+++ trunk/introspection/all.xml Tue Jun 10 16:32:39 2008
@@ -28,8 +28,8 @@
<xi:include href="nm-manager.xml"/>
<xi:include href="nm-access-point.xml"/>
<xi:include href="nm-device.xml"/>
-<xi:include href="nm-device-802-3-ethernet.xml"/>
-<xi:include href="nm-device-802-11-wireless.xml"/>
+<xi:include href="nm-device-ethernet.xml"/>
+<xi:include href="nm-device-wifi.xml"/>
<xi:include href="nm-device-cdma.xml"/>
<xi:include href="nm-device-gsm.xml"/>
<xi:include href="nm-device-serial.xml"/>
Modified: trunk/libnm-glib/Makefile.am
==============================================================================
--- trunk/libnm-glib/Makefile.am (original)
+++ trunk/libnm-glib/Makefile.am Tue Jun 10 16:32:39 2008
@@ -8,7 +8,7 @@
nm-client-bindings.h \
nm-device-bindings.h \
nm-device-ethernet-bindings.h \
- nm-device-802-11-wireless-bindings.h \
+ nm-device-wifi-bindings.h \
nm-exported-connection-glue.h \
nm-exported-connection-bindings.h \
nm-settings-glue.h \
@@ -35,7 +35,7 @@
nm-client.h \
nm-device.h \
nm-device-ethernet.h \
- nm-device-802-11-wireless.h \
+ nm-device-wifi.h \
nm-access-point.h \
nm-ip4-config.h \
nm-settings.h \
@@ -60,7 +60,7 @@
nm-device.c \
nm-device-private.h \
nm-device-ethernet.c \
- nm-device-802-11-wireless.c \
+ nm-device-wifi.c \
nm-access-point.c \
nm-ip4-config.c \
nm-settings.c \
@@ -106,8 +106,8 @@
nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=nm-device-ethernet-bindings.h $(top_srcdir)/introspection/nm-device-ethernet.xml
-nm-device-802-11-wireless-bindings.h: $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
- dbus-binding-tool --prefix=nm_device_802_11_wireless --mode=glib-client --output=nm-device-802-11-wireless-bindings.h $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
+nm-device-wifi-bindings.h: $(top_srcdir)/introspection/nm-device-wifi.xml
+ dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=nm-device-wifi-bindings.h $(top_srcdir)/introspection/nm-device-wifi.xml
nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=nm-access-point-bindings.h $(top_srcdir)/introspection/nm-access-point.xml
Modified: trunk/libnm-glib/libnm-glib-test.c
==============================================================================
--- trunk/libnm-glib/libnm-glib-test.c (original)
+++ trunk/libnm-glib/libnm-glib-test.c Tue Jun 10 16:32:39 2008
@@ -10,7 +10,7 @@
#include "nm-client.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-utils.h"
#include "nm-active-connection.h"
#include "nm-setting-ip4-config.h"
@@ -137,20 +137,20 @@
}
static void
-dump_wireless (NMDevice80211Wireless *device)
+dump_wireless (NMDeviceWifi *device)
{
const char *str;
const GPtrArray *aps;
int i;
- g_print ("Mode: %d\n", nm_device_802_11_wireless_get_mode (device));
- g_print ("Bitrate: %d\n", nm_device_802_11_wireless_get_bitrate (device));
+ g_print ("Mode: %d\n", nm_device_wifi_get_mode (device));
+ g_print ("Bitrate: %d\n", nm_device_wifi_get_bitrate (device));
- str = nm_device_802_11_wireless_get_hw_address (device);
+ str = nm_device_wifi_get_hw_address (device);
g_print ("MAC: %s\n", str);
g_print ("AccessPoints:\n");
- aps = nm_device_802_11_wireless_get_access_points (device);
+ aps = nm_device_wifi_get_access_points (device);
for (i = 0; i < aps->len; i++) {
dump_access_point (NM_ACCESS_POINT (g_ptr_array_index (aps, i)));
g_print ("\n");
@@ -197,8 +197,8 @@
if (NM_IS_DEVICE_ETHERNET (device))
dump_wired (NM_DEVICE_ETHERNET (device));
- else if (NM_IS_DEVICE_802_11_WIRELESS (device))
- dump_wireless (NM_DEVICE_802_11_WIRELESS (device));
+ else if (NM_IS_DEVICE_WIFI (device))
+ dump_wireless (NM_DEVICE_WIFI (device));
}
static gboolean
Modified: trunk/libnm-glib/nm-client.c
==============================================================================
--- trunk/libnm-glib/nm-client.c (original)
+++ trunk/libnm-glib/nm-client.c Tue Jun 10 16:32:39 2008
@@ -6,7 +6,7 @@
#include "nm-client.h"
#include "nm-device-ethernet.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
#include "nm-device-private.h"
@@ -20,7 +20,7 @@
#include "nm-client-bindings.h"
-void nm_device_802_11_wireless_set_wireless_enabled (NMDevice80211Wireless *device, gboolean enabled);
+void nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
G_DEFINE_TYPE (NMClient, nm_client, NM_TYPE_OBJECT)
@@ -87,8 +87,8 @@
for (i = 0; priv->devices && (i < priv->devices->len); i++) {
NMDevice *device = g_ptr_array_index (priv->devices, i);
- if (NM_IS_DEVICE_802_11_WIRELESS (device))
- nm_device_802_11_wireless_set_wireless_enabled (NM_DEVICE_802_11_WIRELESS (device), priv->wireless_enabled);
+ if (NM_IS_DEVICE_WIFI (device))
+ nm_device_wifi_set_wireless_enabled (NM_DEVICE_WIFI (device), priv->wireless_enabled);
}
}
Copied: trunk/libnm-glib/nm-device-wifi.c (from r3739, /trunk/libnm-glib/nm-device-802-11-wireless.c)
==============================================================================
--- /trunk/libnm-glib/nm-device-802-11-wireless.c (original)
+++ trunk/libnm-glib/nm-device-wifi.c Tue Jun 10 16:32:39 2008
@@ -2,22 +2,22 @@
#include <string.h>
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
#include "nm-object-cache.h"
#include "nm-dbus-glib-types.h"
#include "nm-types-private.h"
-#include "nm-device-802-11-wireless-bindings.h"
+#include "nm-device-wifi-bindings.h"
-G_DEFINE_TYPE (NMDevice80211Wireless, nm_device_802_11_wireless, NM_TYPE_DEVICE)
+G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
-#define NM_DEVICE_802_11_WIRELESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessPrivate))
+#define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
static gboolean demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
-void nm_device_802_11_wireless_set_wireless_enabled (NMDevice80211Wireless *device, gboolean enabled);
+void nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
typedef struct {
gboolean disposed;
@@ -32,7 +32,7 @@
GPtrArray *aps;
gboolean wireless_enabled;
-} NMDevice80211WirelessPrivate;
+} NMDeviceWifiPrivate;
enum {
PROP_0,
@@ -61,25 +61,25 @@
static guint signals[LAST_SIGNAL] = { 0 };
GObject *
-nm_device_802_11_wireless_new (DBusGConnection *connection, const char *path)
+nm_device_wifi_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (NM_TYPE_DEVICE_802_11_WIRELESS,
+ return g_object_new (NM_TYPE_DEVICE_WIFI,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
const char *
-nm_device_802_11_wireless_get_hw_address (NMDevice80211Wireless *device)
+nm_device_wifi_get_hw_address (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (device), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->hw_address) {
priv->hw_address = nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
@@ -90,13 +90,13 @@
}
NM80211Mode
-nm_device_802_11_wireless_get_mode (NMDevice80211Wireless *device)
+nm_device_wifi_get_mode (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (device), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->mode) {
priv->mode = nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
@@ -107,12 +107,12 @@
}
guint32
-nm_device_802_11_wireless_get_bitrate (NMDevice80211Wireless *device)
+nm_device_wifi_get_bitrate (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
NMDeviceState state;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (device), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
state = nm_device_get_state (NM_DEVICE (device));
switch (state) {
@@ -127,7 +127,7 @@
break;
}
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->rate) {
priv->rate = nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
@@ -138,13 +138,13 @@
}
guint32
-nm_device_802_11_wireless_get_capabilities (NMDevice80211Wireless *device)
+nm_device_wifi_get_capabilities (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (device), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->wireless_caps) {
priv->wireless_caps = nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
@@ -155,14 +155,14 @@
}
NMAccessPoint *
-nm_device_802_11_wireless_get_active_access_point (NMDevice80211Wireless *self)
+nm_device_wifi_get_active_access_point (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
NMDeviceState state;
char *path;
GValue value = { 0, };
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NULL);
state = nm_device_get_state (NM_DEVICE (self));
switch (state) {
@@ -177,7 +177,7 @@
break;
}
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->active_ap)
return priv->active_ap;
if (priv->null_active_ap)
@@ -197,17 +197,17 @@
}
const GPtrArray *
-nm_device_802_11_wireless_get_access_points (NMDevice80211Wireless *self)
+nm_device_wifi_get_access_points (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
DBusGConnection *connection;
GValue value = { 0, };
GError *error = NULL;
GPtrArray *temp;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NULL);
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->aps)
return handle_ptr_array_return (priv->aps);
@@ -227,17 +227,17 @@
}
NMAccessPoint *
-nm_device_802_11_wireless_get_access_point_by_path (NMDevice80211Wireless *self,
+nm_device_wifi_get_access_point_by_path (NMDeviceWifi *self,
const char *path)
{
const GPtrArray *aps;
int i;
NMAccessPoint *ap = NULL;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NULL);
g_return_val_if_fail (path != NULL, NULL);
- aps = nm_device_802_11_wireless_get_access_points (self);
+ aps = nm_device_wifi_get_access_points (self);
if (!aps)
return NULL;
@@ -255,17 +255,17 @@
static void
access_point_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (user_data);
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
+ NMDeviceWifiPrivate *priv;
GObject *ap;
g_return_if_fail (self != NULL);
- ap = G_OBJECT (nm_device_802_11_wireless_get_access_point_by_path (self, path));
+ ap = G_OBJECT (nm_device_wifi_get_access_point_by_path (self, path));
if (!ap) {
DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (self));
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
ap = G_OBJECT (nm_object_cache_get (path));
if (ap) {
g_ptr_array_add (priv->aps, g_object_ref (ap));
@@ -283,13 +283,13 @@
static void
access_point_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (user_data);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *ap;
g_return_if_fail (self != NULL);
- ap = nm_device_802_11_wireless_get_access_point_by_path (self, path);
+ ap = nm_device_wifi_get_access_point_by_path (self, path);
if (ap) {
g_signal_emit (self, signals[ACCESS_POINT_REMOVED], 0, ap);
g_ptr_array_remove (priv->aps, ap);
@@ -298,13 +298,13 @@
}
static void
-clean_up_aps (NMDevice80211Wireless *self, gboolean notify)
+clean_up_aps (NMDeviceWifi *self, gboolean notify)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
- g_return_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self));
+ g_return_if_fail (NM_IS_DEVICE_WIFI (self));
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->active_ap)
g_object_unref (priv->active_ap);
@@ -324,10 +324,10 @@
}
void
-nm_device_802_11_wireless_set_wireless_enabled (NMDevice80211Wireless *device,
+nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device,
gboolean enabled)
{
- g_return_if_fail (NM_IS_DEVICE_802_11_WIRELESS (device));
+ g_return_if_fail (NM_IS_DEVICE_WIFI (device));
if (!enabled)
clean_up_aps (device, TRUE);
@@ -337,9 +337,9 @@
/**************************************************************/
static void
-nm_device_802_11_wireless_init (NMDevice80211Wireless *device)
+nm_device_wifi_init (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
priv->disposed = FALSE;
}
@@ -350,23 +350,23 @@
GValue *value,
GParamSpec *pspec)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (object);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (object);
switch (prop_id) {
case PROP_HW_ADDRESS:
- g_value_set_string (value, nm_device_802_11_wireless_get_hw_address (self));
+ g_value_set_string (value, nm_device_wifi_get_hw_address (self));
break;
case PROP_MODE:
- g_value_set_uint (value, nm_device_802_11_wireless_get_mode (self));
+ g_value_set_uint (value, nm_device_wifi_get_mode (self));
break;
case PROP_BITRATE:
- g_value_set_uint (value, nm_device_802_11_wireless_get_bitrate (self));
+ g_value_set_uint (value, nm_device_wifi_get_bitrate (self));
break;
case PROP_ACTIVE_ACCESS_POINT:
- g_value_set_object (value, nm_device_802_11_wireless_get_active_access_point (self));
+ g_value_set_object (value, nm_device_wifi_get_active_access_point (self));
break;
case PROP_WIRELESS_CAPABILITIES:
- g_value_set_uint (value, nm_device_802_11_wireless_get_capabilities (self));
+ g_value_set_uint (value, nm_device_wifi_get_capabilities (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -377,8 +377,8 @@
static void
state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (device);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (device);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
switch (nm_device_get_state (device)) {
case NM_DEVICE_STATE_UNKNOWN:
@@ -392,9 +392,9 @@
priv->active_ap = NULL;
priv->null_active_ap = FALSE;
}
- nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT);
+ nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
priv->rate = 0;
- nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_802_11_WIRELESS_BITRATE);
+ nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_BITRATE);
break;
default:
break;
@@ -404,7 +404,7 @@
static gboolean
demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (object);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
const char *path;
NMAccessPoint *ap = NULL;
DBusGConnection *connection;
@@ -437,20 +437,20 @@
if (ap)
priv->active_ap = ap;
- nm_object_queue_notify (object, NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT);
+ nm_object_queue_notify (object, NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
return TRUE;
}
static void
-register_for_property_changed (NMDevice80211Wireless *device)
+register_for_property_changed (NMDeviceWifi *device)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_802_11_WIRELESS_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_802_11_WIRELESS_MODE, nm_object_demarshal_generic, &priv->mode },
- { NM_DEVICE_802_11_WIRELESS_BITRATE, nm_object_demarshal_generic, &priv->rate },
- { NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT, demarshal_active_ap, &priv->active_ap },
- { NM_DEVICE_802_11_WIRELESS_CAPABILITIES, nm_object_demarshal_generic, &priv->wireless_caps },
+ { NM_DEVICE_WIFI_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
+ { NM_DEVICE_WIFI_MODE, nm_object_demarshal_generic, &priv->mode },
+ { NM_DEVICE_WIFI_BITRATE, nm_object_demarshal_generic, &priv->rate },
+ { NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, demarshal_active_ap, &priv->active_ap },
+ { NM_DEVICE_WIFI_CAPABILITIES, nm_object_demarshal_generic, &priv->wireless_caps },
{ NULL },
};
@@ -465,15 +465,15 @@
GObjectConstructParam *construct_params)
{
GObject *object;
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->constructor (type,
+ object = G_OBJECT_CLASS (nm_device_wifi_parent_class)->constructor (type,
n_construct_params,
construct_params);
if (!object)
return NULL;
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (object);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
@@ -494,7 +494,7 @@
G_CALLBACK (access_point_removed_proxy),
object, NULL);
- register_for_property_changed (NM_DEVICE_802_11_WIRELESS (object));
+ register_for_property_changed (NM_DEVICE_WIFI (object));
g_signal_connect (NM_DEVICE (object),
"notify::" NM_DEVICE_STATE,
@@ -507,38 +507,38 @@
static void
dispose (GObject *object)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (object);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
if (priv->disposed) {
- G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->dispose (object);
return;
}
priv->disposed = TRUE;
- clean_up_aps (NM_DEVICE_802_11_WIRELESS (object), FALSE);
+ clean_up_aps (NM_DEVICE_WIFI (object), FALSE);
g_object_unref (priv->proxy);
- G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->dispose (object);
}
static void
finalize (GObject *object)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (object);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
if (priv->hw_address)
g_free (priv->hw_address);
- G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->finalize (object);
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->finalize (object);
}
static void
-nm_device_802_11_wireless_class_init (NMDevice80211WirelessClass *device_class)
+nm_device_wifi_class_init (NMDeviceWifiClass *device_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (device_class);
- g_type_class_add_private (device_class, sizeof (NMDevice80211WirelessPrivate));
+ g_type_class_add_private (device_class, sizeof (NMDeviceWifiPrivate));
/* virtual methods */
object_class->constructor = constructor;
@@ -549,7 +549,7 @@
/* properties */
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
- g_param_spec_string (NM_DEVICE_802_11_WIRELESS_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_WIFI_HW_ADDRESS,
"MAC Address",
"Hardware MAC address",
NULL,
@@ -557,7 +557,7 @@
g_object_class_install_property
(object_class, PROP_MODE,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_MODE,
+ g_param_spec_uint (NM_DEVICE_WIFI_MODE,
"Mode",
"Mode",
NM_802_11_MODE_UNKNOWN, NM_802_11_MODE_INFRA, NM_802_11_MODE_INFRA,
@@ -565,7 +565,7 @@
g_object_class_install_property
(object_class, PROP_BITRATE,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_BITRATE,
+ g_param_spec_uint (NM_DEVICE_WIFI_BITRATE,
"Bit Rate",
"Bit Rate",
0, G_MAXUINT32, 0,
@@ -573,7 +573,7 @@
g_object_class_install_property
(object_class, PROP_ACTIVE_ACCESS_POINT,
- g_param_spec_object (NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT,
+ g_param_spec_object (NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT,
"Active Access Point",
"Active Access Point",
NM_TYPE_ACCESS_POINT,
@@ -581,7 +581,7 @@
g_object_class_install_property
(object_class, PROP_WIRELESS_CAPABILITIES,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_CAPABILITIES,
+ g_param_spec_uint (NM_DEVICE_WIFI_CAPABILITIES,
"Wireless Capabilities",
"Wireless Capabilities",
0, G_MAXUINT32, 0,
@@ -592,7 +592,7 @@
g_signal_new ("access-point-added",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, access_point_added),
+ G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_added),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
@@ -602,7 +602,7 @@
g_signal_new ("access-point-removed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, access_point_removed),
+ G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_removed),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
Copied: trunk/libnm-glib/nm-device-wifi.h (from r3739, /trunk/libnm-glib/nm-device-802-11-wireless.h)
==============================================================================
--- /trunk/libnm-glib/nm-device-802-11-wireless.h (original)
+++ trunk/libnm-glib/nm-device-wifi.h Tue Jun 10 16:32:39 2008
@@ -1,51 +1,51 @@
-#ifndef NM_DEVICE_802_11_WIRELESS_H
-#define NM_DEVICE_802_11_WIRELESS_H
+#ifndef NM_DEVICE_WIFI_H
+#define NM_DEVICE_WIFI_H
#include "nm-device.h"
#include "nm-access-point.h"
G_BEGIN_DECLS
-#define NM_TYPE_DEVICE_802_11_WIRELESS (nm_device_802_11_wireless_get_type ())
-#define NM_DEVICE_802_11_WIRELESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211Wireless))
-#define NM_DEVICE_802_11_WIRELESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessClass))
-#define NM_IS_DEVICE_802_11_WIRELESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_802_11_WIRELESS))
-#define NM_IS_DEVICE_802_11_WIRELESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_802_11_WIRELESS))
-#define NM_DEVICE_802_11_WIRELESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessClass))
-
-#define NM_DEVICE_802_11_WIRELESS_HW_ADDRESS "hw-address"
-#define NM_DEVICE_802_11_WIRELESS_MODE "mode"
-#define NM_DEVICE_802_11_WIRELESS_BITRATE "bitrate"
-#define NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT "active-access-point"
-#define NM_DEVICE_802_11_WIRELESS_CAPABILITIES "wireless-capabilities"
+#define NM_TYPE_DEVICE_WIFI (nm_device_wifi_get_type ())
+#define NM_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifi))
+#define NM_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+#define NM_IS_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_WIFI))
+#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_WIFI))
+#define NM_DEVICE_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+
+#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address"
+#define NM_DEVICE_WIFI_MODE "mode"
+#define NM_DEVICE_WIFI_BITRATE "bitrate"
+#define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point"
+#define NM_DEVICE_WIFI_CAPABILITIES "wireless-capabilities"
typedef struct {
NMDevice parent;
-} NMDevice80211Wireless;
+} NMDeviceWifi;
typedef struct {
NMDeviceClass parent;
/* Signals */
- void (*access_point_added) (NMDevice80211Wireless *device, NMAccessPoint *ap);
- void (*access_point_removed) (NMDevice80211Wireless *device, NMAccessPoint *ap);
-} NMDevice80211WirelessClass;
+ void (*access_point_added) (NMDeviceWifi *device, NMAccessPoint *ap);
+ void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
+} NMDeviceWifiClass;
-GType nm_device_802_11_wireless_get_type (void);
+GType nm_device_wifi_get_type (void);
-GObject *nm_device_802_11_wireless_new (DBusGConnection *connection, const char *path);
+GObject *nm_device_wifi_new (DBusGConnection *connection, const char *path);
-const char * nm_device_802_11_wireless_get_hw_address (NMDevice80211Wireless *device);
-NM80211Mode nm_device_802_11_wireless_get_mode (NMDevice80211Wireless *device);
-guint32 nm_device_802_11_wireless_get_bitrate (NMDevice80211Wireless *device);
-guint32 nm_device_802_11_wireless_get_capabilities (NMDevice80211Wireless *device);
-NMAccessPoint * nm_device_802_11_wireless_get_active_access_point (NMDevice80211Wireless *device);
+const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device);
+NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *device);
+guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *device);
+guint32 nm_device_wifi_get_capabilities (NMDeviceWifi *device);
+NMAccessPoint * nm_device_wifi_get_active_access_point (NMDeviceWifi *device);
-NMAccessPoint * nm_device_802_11_wireless_get_access_point_by_path (NMDevice80211Wireless *device,
- const char *path);
+NMAccessPoint * nm_device_wifi_get_access_point_by_path (NMDeviceWifi *device,
+ const char *path);
-const GPtrArray *nm_device_802_11_wireless_get_access_points (NMDevice80211Wireless *device);
+const GPtrArray *nm_device_wifi_get_access_points (NMDeviceWifi *device);
G_END_DECLS
-#endif /* NM_DEVICE_802_11_WIRELESS_H */
+#endif /* NM_DEVICE_WIFI_H */
Modified: trunk/libnm-glib/nm-device.c
==============================================================================
--- trunk/libnm-glib/nm-device.c (original)
+++ trunk/libnm-glib/nm-device.c Tue Jun 10 16:32:39 2008
@@ -2,7 +2,7 @@
#include "NetworkManager.h"
#include "nm-device-ethernet.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
#include "nm-device.h"
@@ -342,7 +342,7 @@
dtype = NM_TYPE_DEVICE_ETHERNET;
break;
case NM_DEVICE_TYPE_WIFI:
- dtype = NM_TYPE_DEVICE_802_11_WIRELESS;
+ dtype = NM_TYPE_DEVICE_WIFI;
break;
case NM_DEVICE_TYPE_GSM:
dtype = NM_TYPE_GSM_DEVICE;
Modified: trunk/libnm-util/nm-utils.c
==============================================================================
--- trunk/libnm-util/nm-utils.c (original)
+++ trunk/libnm-util/nm-utils.c Tue Jun 10 16:32:39 2008
@@ -622,32 +622,32 @@
/* Static WEP only uses group ciphers */
have_pair = TRUE;
} else {
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_WEP40)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_WEP40)
if (ap_flags & NM_802_11_AP_SEC_PAIR_WEP40)
have_pair = TRUE;
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_WEP104)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_WEP104)
if (ap_flags & NM_802_11_AP_SEC_PAIR_WEP104)
have_pair = TRUE;
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_TKIP)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)
if (ap_flags & NM_802_11_AP_SEC_PAIR_TKIP)
have_pair = TRUE;
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_CCMP)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)
if (ap_flags & NM_802_11_AP_SEC_PAIR_CCMP)
have_pair = TRUE;
}
/* Group */
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_WEP40)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_WEP40)
if (ap_flags & NM_802_11_AP_SEC_GROUP_WEP40)
have_group = TRUE;
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_WEP104)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_WEP104)
if (ap_flags & NM_802_11_AP_SEC_GROUP_WEP104)
have_group = TRUE;
if (!static_wep) {
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_TKIP)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)
if (ap_flags & NM_802_11_AP_SEC_GROUP_TKIP)
have_group = TRUE;
- if (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_CCMP)
+ if (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)
if (ap_flags & NM_802_11_AP_SEC_GROUP_CCMP)
have_group = TRUE;
}
@@ -672,7 +672,7 @@
if ( (type == NMU_SEC_STATIC_WEP)
|| ((type == NMU_SEC_DYNAMIC_WEP) && !adhoc)
|| ((type == NMU_SEC_LEAP) && !adhoc)) {
- if (dev_caps & (NM_802_11_DEVICE_CAP_CIPHER_WEP40 | NM_802_11_DEVICE_CAP_CIPHER_WEP104))
+ if (dev_caps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104))
return TRUE;
}
}
@@ -714,7 +714,7 @@
}
break;
case NMU_SEC_WPA_PSK:
- if (!(dev_caps & NM_802_11_DEVICE_CAP_WPA))
+ if (!(dev_caps & NM_WIFI_DEVICE_CAP_WPA))
return FALSE;
if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
@@ -722,17 +722,17 @@
if (ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP)
- && (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_TKIP))
+ && (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
return TRUE;
if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_CCMP)
- && (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_CCMP))
+ && (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
return TRUE;
}
return FALSE;
}
break;
case NMU_SEC_WPA2_PSK:
- if (!(dev_caps & NM_802_11_DEVICE_CAP_RSN))
+ if (!(dev_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE;
if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
@@ -740,10 +740,10 @@
if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
- && (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_TKIP))
+ && (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
return TRUE;
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP)
- && (dev_caps & NM_802_11_DEVICE_CAP_CIPHER_CCMP))
+ && (dev_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
return TRUE;
}
return FALSE;
@@ -752,7 +752,7 @@
case NMU_SEC_WPA_ENTERPRISE:
if (adhoc)
return FALSE;
- if (!(dev_caps & NM_802_11_DEVICE_CAP_WPA))
+ if (!(dev_caps & NM_WIFI_DEVICE_CAP_WPA))
return FALSE;
if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
@@ -767,7 +767,7 @@
case NMU_SEC_WPA2_ENTERPRISE:
if (adhoc)
return FALSE;
- if (!(dev_caps & NM_802_11_DEVICE_CAP_RSN))
+ if (!(dev_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE;
if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Tue Jun 10 16:32:39 2008
@@ -30,8 +30,8 @@
nm-device-private.h \
nm-device-ethernet.c \
nm-device-ethernet.h \
- nm-device-802-11-wireless.c \
- nm-device-802-11-wireless.h \
+ nm-device-wifi.c \
+ nm-device-wifi.h \
NetworkManagerAP.c \
NetworkManagerAP.h \
nm-dbus-manager.h \
@@ -84,8 +84,8 @@
nm-device-ethernet-glue.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-server --output=nm-device-ethernet-glue.h $(top_srcdir)/introspection/nm-device-ethernet.xml
-nm-device-802-11-wireless-glue.h: $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
- dbus-binding-tool --prefix=nm_device_802_11_wireless --mode=glib-server --output=nm-device-802-11-wireless-glue.h $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
+nm-device-wifi-glue.h: $(top_srcdir)/introspection/nm-device-wifi.xml
+ dbus-binding-tool --prefix=nm_device_wifi --mode=glib-server --output=nm-device-wifi-glue.h $(top_srcdir)/introspection/nm-device-wifi.xml
nm-serial-device-glue.h: $(top_srcdir)/introspection/nm-device-serial.xml
dbus-binding-tool --prefix=nm_serial_device --mode=glib-server --output=nm-serial-device-glue.h $(top_srcdir)/introspection/nm-device-serial.xml
@@ -107,7 +107,7 @@
nm-manager-glue.h \
nm-device-interface-glue.h \
nm-device-ethernet-glue.h \
- nm-device-802-11-wireless-glue.h \
+ nm-device-wifi-glue.h \
nm-serial-device-glue.h \
nm-cdma-device-glue.h \
nm-gsm-device-glue.h \
Modified: trunk/src/NetworkManagerPolicy.c
==============================================================================
--- trunk/src/NetworkManagerPolicy.c (original)
+++ trunk/src/NetworkManagerPolicy.c Tue Jun 10 16:32:39 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw redhat com>
@@ -39,7 +39,7 @@
#include "nm-utils.h"
#include "nm-device-interface.h"
#include "nm-device.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-device-ethernet.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
@@ -105,7 +105,7 @@
if (NM_IS_GSM_DEVICE (dev))
return 3;
- if (NM_IS_DEVICE_802_11_WIRELESS (dev))
+ if (NM_IS_DEVICE_WIFI (dev))
return 4;
if (NM_IS_DEVICE_ETHERNET (dev))
@@ -564,7 +564,7 @@
}
static void
-wireless_networks_changed (NMDevice80211Wireless *device, NMAccessPoint *ap, gpointer user_data)
+wireless_networks_changed (NMDeviceWifi *device, NMAccessPoint *ap, gpointer user_data)
{
schedule_activate_check ((NMPolicy *) user_data, NM_DEVICE (device));
}
@@ -604,7 +604,7 @@
policy);
policy->dev_signal_ids = add_device_signal_id (policy->dev_signal_ids, id, device);
- if (NM_IS_DEVICE_802_11_WIRELESS (device)) {
+ if (NM_IS_DEVICE_WIFI (device)) {
id = g_signal_connect (device, "access-point-added",
G_CALLBACK (wireless_networks_changed),
policy);
Modified: trunk/src/NetworkManagerUtils.c
==============================================================================
--- trunk/src/NetworkManagerUtils.c (original)
+++ trunk/src/NetworkManagerUtils.c Tue Jun 10 16:32:39 2008
@@ -28,7 +28,7 @@
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-device.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-device-ethernet.h"
#include "nm-dbus-manager.h"
#include "nm-dispatcher-action.h"
@@ -125,7 +125,7 @@
nm_device_get_iface (dev), driver);
full_support = FALSE;
}
- } else if (NM_IS_DEVICE_802_11_WIRELESS (dev)) {
+ } else if (NM_IS_DEVICE_WIFI (dev)) {
/* Print out WPA support */
}
Modified: trunk/src/autoip.c
==============================================================================
--- trunk/src/autoip.c (original)
+++ trunk/src/autoip.c Tue Jun 10 16:32:39 2008
@@ -32,7 +32,7 @@
#include "NetworkManager.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "autoip.h"
@@ -227,8 +227,8 @@
if (NM_IS_DEVICE_ETHERNET (dev))
nm_device_ethernet_get_address (NM_DEVICE_ETHERNET (dev), &addr);
- else if (NM_IS_DEVICE_802_11_WIRELESS (dev))
- nm_device_802_11_wireless_get_address (NM_DEVICE_802_11_WIRELESS (dev), &addr);
+ else if (NM_IS_DEVICE_WIFI (dev))
+ nm_device_wifi_get_address (NM_DEVICE_WIFI (dev), &addr);
else
goto out;
Copied: trunk/src/nm-device-wifi.c (from r3741, /trunk/src/nm-device-802-11-wireless.c)
==============================================================================
--- /trunk/src/nm-device-802-11-wireless.c (original)
+++ trunk/src/nm-device-wifi.c Tue Jun 10 16:32:39 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw redhat com>
@@ -33,7 +33,7 @@
#include <unistd.h>
#include "nm-device.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-utils.h"
@@ -50,20 +50,20 @@
#include "nm-setting-8021x.h"
#include "NetworkManagerSystem.h"
-static gboolean impl_device_get_access_points (NMDevice80211Wireless *device,
+static gboolean impl_device_get_access_points (NMDeviceWifi *device,
GPtrArray **aps,
GError **err);
-static guint32 nm_device_802_11_wireless_get_frequency (NMDevice80211Wireless *self);
+static guint32 nm_device_wifi_get_frequency (NMDeviceWifi *self);
-static void nm_device_802_11_wireless_set_ssid (NMDevice80211Wireless *self,
+static void nm_device_wifi_set_ssid (NMDeviceWifi *self,
const GByteArray * ssid);
#if DEBUG
-static void nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self);
+static void nm_device_wifi_ap_list_print (NMDeviceWifi *self);
#endif
-#include "nm-device-802-11-wireless-glue.h"
+#include "nm-device-wifi-glue.h"
/* #define IW_QUAL_DEBUG */
@@ -76,9 +76,9 @@
#define WIRELESS_SECRETS_TRIES "wireless-secrets-tries"
-G_DEFINE_TYPE (NMDevice80211Wireless, nm_device_802_11_wireless, NM_TYPE_DEVICE)
+G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
-#define NM_DEVICE_802_11_WIRELESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessPrivate))
+#define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
enum {
@@ -129,7 +129,7 @@
guint con_timeout_id;
} Supplicant;
-struct _NMDevice80211WirelessPrivate
+struct _NMDeviceWifiPrivate
{
gboolean dispose_has_run;
@@ -167,49 +167,49 @@
};
-static void schedule_scan (NMDevice80211Wireless *self, gboolean backoff);
+static void schedule_scan (NMDeviceWifi *self, gboolean backoff);
-static void cancel_pending_scan (NMDevice80211Wireless *self);
+static void cancel_pending_scan (NMDeviceWifi *self);
static int wireless_qual_to_percent (const struct iw_quality *qual,
const struct iw_quality *max_qual,
const struct iw_quality *avg_qual);
-static void cleanup_association_attempt (NMDevice80211Wireless * self,
+static void cleanup_association_attempt (NMDeviceWifi * self,
gboolean disconnect);
-static void remove_supplicant_timeouts (NMDevice80211Wireless *self);
+static void remove_supplicant_timeouts (NMDeviceWifi *self);
-static void nm_device_802_11_wireless_disable_encryption (NMDevice80211Wireless *self);
+static void nm_device_wifi_disable_encryption (NMDeviceWifi *self);
static void supplicant_iface_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self);
+ NMDeviceWifi *self);
static void supplicant_iface_connection_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self);
+ NMDeviceWifi *self);
static void supplicant_iface_scanned_ap_cb (NMSupplicantInterface * iface,
GHashTable *properties,
- NMDevice80211Wireless * self);
+ NMDeviceWifi * self);
static void supplicant_iface_scan_result_cb (NMSupplicantInterface * iface,
gboolean result,
- NMDevice80211Wireless * self);
+ NMDeviceWifi * self);
static void supplicant_mgr_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self);
+ NMDeviceWifi *self);
-static void cleanup_supplicant_interface (NMDevice80211Wireless * self);
+static void cleanup_supplicant_interface (NMDeviceWifi * self);
-static void device_cleanup (NMDevice80211Wireless *self);
+static void device_cleanup (NMDeviceWifi *self);
-static guint32 nm_device_802_11_wireless_get_bitrate (NMDevice80211Wireless *self);
+static guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *self);
static GQuark
@@ -245,20 +245,20 @@
}
static void
-access_point_removed (NMDevice80211Wireless *device, NMAccessPoint *ap)
+access_point_removed (NMDeviceWifi *device, NMAccessPoint *ap)
{
g_signal_emit (device, signals[ACCESS_POINT_REMOVED], 0, ap);
}
/*
- * nm_device_802_11_wireless_update_signal_strength
+ * nm_device_wifi_update_signal_strength
*
* Update the device's idea of the strength of its connection to the
* current access point.
*
*/
static void
-nm_device_802_11_wireless_update_signal_strength (NMDevice80211Wireless *self,
+nm_device_wifi_update_signal_strength (NMDeviceWifi *self,
NMAccessPoint *ap)
{
int fd, percent = -1;
@@ -342,54 +342,54 @@
return caps;
}
-#define WPA_CAPS (NM_802_11_DEVICE_CAP_CIPHER_TKIP | \
- NM_802_11_DEVICE_CAP_CIPHER_CCMP | \
- NM_802_11_DEVICE_CAP_WPA | \
- NM_802_11_DEVICE_CAP_RSN)
+#define WPA_CAPS (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | \
+ NM_WIFI_DEVICE_CAP_CIPHER_CCMP | \
+ NM_WIFI_DEVICE_CAP_WPA | \
+ NM_WIFI_DEVICE_CAP_RSN)
static guint32
-get_wireless_capabilities (NMDevice80211Wireless *self,
+get_wireless_capabilities (NMDeviceWifi *self,
iwrange * range,
guint32 data_len)
{
guint32 minlen;
- guint32 caps = NM_802_11_DEVICE_CAP_NONE;
+ guint32 caps = NM_WIFI_DEVICE_CAP_NONE;
const char * iface;
- g_return_val_if_fail (self != NULL, NM_802_11_DEVICE_CAP_NONE);
- g_return_val_if_fail (range != NULL, NM_802_11_DEVICE_CAP_NONE);
+ g_return_val_if_fail (self != NULL, NM_WIFI_DEVICE_CAP_NONE);
+ g_return_val_if_fail (range != NULL, NM_WIFI_DEVICE_CAP_NONE);
iface = nm_device_get_iface (NM_DEVICE (self));
minlen = ((char *) &range->enc_capa) - (char *) range + sizeof (range->enc_capa);
/* All drivers should support WEP by default */
- caps |= NM_802_11_DEVICE_CAP_CIPHER_WEP40 | NM_802_11_DEVICE_CAP_CIPHER_WEP104;
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104;
if ((data_len >= minlen) && range->we_version_compiled >= 18) {
if (range->enc_capa & IW_ENC_CAPA_CIPHER_TKIP)
- caps |= NM_802_11_DEVICE_CAP_CIPHER_TKIP;
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_TKIP;
if (range->enc_capa & IW_ENC_CAPA_CIPHER_CCMP)
- caps |= NM_802_11_DEVICE_CAP_CIPHER_CCMP;
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP;
if (range->enc_capa & IW_ENC_CAPA_WPA)
- caps |= NM_802_11_DEVICE_CAP_WPA;
+ caps |= NM_WIFI_DEVICE_CAP_WPA;
if (range->enc_capa & IW_ENC_CAPA_WPA2)
- caps |= NM_802_11_DEVICE_CAP_RSN;
+ caps |= NM_WIFI_DEVICE_CAP_RSN;
/* Check for cipher support but not WPA support */
- if ( (caps & (NM_802_11_DEVICE_CAP_CIPHER_TKIP | NM_802_11_DEVICE_CAP_CIPHER_CCMP))
- && !(caps & (NM_802_11_DEVICE_CAP_WPA | NM_802_11_DEVICE_CAP_RSN))) {
+ if ( (caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
+ && !(caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))) {
nm_warning ("%s: device supports WPA ciphers but not WPA protocol; "
"WPA unavailable.", iface);
caps &= ~WPA_CAPS;
}
/* Check for WPA support but not cipher support */
- if ( (caps & (NM_802_11_DEVICE_CAP_WPA | NM_802_11_DEVICE_CAP_RSN))
- && !(caps & (NM_802_11_DEVICE_CAP_CIPHER_TKIP | NM_802_11_DEVICE_CAP_CIPHER_CCMP))) {
+ if ( (caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))
+ && !(caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))) {
nm_warning ("%s: device supports WPA protocol but not WPA ciphers; "
"WPA unavailable.", iface);
caps &= ~WPA_CAPS;
@@ -401,9 +401,9 @@
static void
-nm_device_802_11_wireless_init (NMDevice80211Wireless * self)
+nm_device_wifi_init (NMDeviceWifi * self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
self->priv = priv;
priv->dispose_has_run = FALSE;
@@ -460,8 +460,8 @@
{
GObject *object;
GObjectClass *klass;
- NMDevice80211Wireless *self;
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifi *self;
+ NMDeviceWifiPrivate *priv;
const char *iface;
int fd;
struct iw_range range;
@@ -469,13 +469,13 @@
struct iwreq wrq;
int i;
- klass = G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class);
+ klass = G_OBJECT_CLASS (nm_device_wifi_parent_class);
object = klass->constructor (type, n_construct_params, construct_params);
if (!object)
return NULL;
- self = NM_DEVICE_802_11_WIRELESS (object);
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ self = NM_DEVICE_WIFI (object);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
iface = nm_device_get_iface (NM_DEVICE (self));
fd = socket (PF_INET, SOCK_DGRAM, 0);
@@ -537,7 +537,7 @@
}
static void
-init_supplicant_interface (NMDevice80211Wireless * self)
+init_supplicant_interface (NMDeviceWifi * self)
{
Supplicant * sup;
guint id;
@@ -579,7 +579,7 @@
}
static NMAccessPoint *
-get_active_ap (NMDevice80211Wireless *self,
+get_active_ap (NMDeviceWifi *self,
NMAccessPoint *ignore_ap,
gboolean match_hidden)
{
@@ -588,11 +588,11 @@
GSList *iter;
int i = 0;
- nm_device_802_11_wireless_get_bssid (self, &bssid);
+ nm_device_wifi_get_bssid (self, &bssid);
if (!nm_ethernet_address_is_valid (&bssid))
return NULL;
- ssid = nm_device_802_11_wireless_get_ssid (self);
+ ssid = nm_device_wifi_get_ssid (self);
/* When matching hidden APs, do a second pass that ignores the SSID check,
* because NM might not yet know the SSID of the hidden AP in the scan list
@@ -614,10 +614,10 @@
if ((i == 0) && !nm_utils_same_ssid (ssid, ap_ssid, TRUE))
continue;
- if (nm_device_802_11_wireless_get_mode (self) != nm_ap_get_mode (ap))
+ if (nm_device_wifi_get_mode (self) != nm_ap_get_mode (ap))
continue;
- if (nm_device_802_11_wireless_get_frequency (self) != nm_ap_get_freq (ap))
+ if (nm_device_wifi_get_frequency (self) != nm_ap_get_freq (ap))
continue;
// FIXME: handle security settings here too
@@ -629,12 +629,12 @@
}
static void
-set_current_ap (NMDevice80211Wireless *self, NMAccessPoint *new_ap)
+set_current_ap (NMDeviceWifi *self, NMAccessPoint *new_ap)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
char *old_path = NULL;
- g_return_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self));
+ g_return_if_fail (NM_IS_DEVICE_WIFI (self));
if (priv->current_ap) {
old_path = g_strdup (nm_ap_get_dbus_path (priv->current_ap));
@@ -649,21 +649,21 @@
if ( (!old_path && new_ap)
|| (old_path && !new_ap)
|| (old_path && new_ap && strcmp (old_path, nm_ap_get_dbus_path (new_ap))))
- g_object_notify (G_OBJECT (self), NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
g_free (old_path);
}
static void
-periodic_update (NMDevice80211Wireless *self)
+periodic_update (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *new_ap;
guint32 new_rate;
new_ap = get_active_ap (self, NULL, FALSE);
if (new_ap)
- nm_device_802_11_wireless_update_signal_strength (self, new_ap);
+ nm_device_wifi_update_signal_strength (self, new_ap);
if ((new_ap || priv->current_ap) && (new_ap != priv->current_ap)) {
const struct ether_addr *new_bssid = NULL;
@@ -695,24 +695,24 @@
set_current_ap (self, new_ap);
}
- new_rate = nm_device_802_11_wireless_get_bitrate (self);
+ new_rate = nm_device_wifi_get_bitrate (self);
if (new_rate != priv->rate) {
priv->rate = new_rate;
- g_object_notify (G_OBJECT (self), NM_DEVICE_802_11_WIRELESS_BITRATE);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_WIFI_BITRATE);
}
}
/*
- * nm_device_802_11_periodic_update
+ * nm_device_wifi_periodic_update
*
* Periodically update device statistics.
*
*/
static gboolean
-nm_device_802_11_periodic_update (gpointer data)
+nm_device_wifi_periodic_update (gpointer data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (data);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (data);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMDeviceState state;
/* BSSID and signal strength have meaningful values only if the device
@@ -751,7 +751,7 @@
static gboolean
real_is_up (NMDevice *device)
{
- if (!NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device)->periodic_source_id)
+ if (!NM_DEVICE_WIFI_GET_PRIVATE (device)->periodic_source_id)
return FALSE;
return TRUE;
@@ -760,10 +760,10 @@
static gboolean
real_bring_up (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
- nm_device_802_11_wireless_set_mode (self, NM_802_11_MODE_INFRA);
+ nm_device_wifi_set_mode (self, NM_802_11_MODE_INFRA);
priv->supplicant.mgr = nm_supplicant_manager_get ();
priv->supplicant.mgr_state_id = g_signal_connect (priv->supplicant.mgr,
@@ -774,15 +774,15 @@
init_supplicant_interface (self);
/* Peridoically update signal strength */
- priv->periodic_source_id = g_timeout_add (6000, nm_device_802_11_periodic_update, self);
+ priv->periodic_source_id = g_timeout_add (6000, nm_device_wifi_periodic_update, self);
return TRUE;
}
static void
-remove_all_aps (NMDevice80211Wireless *self)
+remove_all_aps (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
/* Remove outdated APs */
while (g_slist_length (priv->ap_list)) {
@@ -797,9 +797,9 @@
}
static void
-device_cleanup (NMDevice80211Wireless *self)
+device_cleanup (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->periodic_source_id) {
g_source_remove (priv->periodic_source_id);
@@ -841,7 +841,7 @@
static void
real_take_down (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
device_cleanup (self);
}
@@ -849,8 +849,8 @@
static void
real_deactivate_quickly (NMDevice *dev)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
cleanup_association_attempt (self, TRUE);
@@ -858,18 +858,18 @@
priv->rate = 0;
/* Clean up stuff, don't leave the card associated */
- nm_device_802_11_wireless_set_ssid (self, NULL);
- nm_device_802_11_wireless_disable_encryption (self);
+ nm_device_wifi_set_ssid (self, NULL);
+ nm_device_wifi_disable_encryption (self);
}
static void
real_deactivate (NMDevice *dev)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
- nm_device_802_11_wireless_set_mode (self, NM_802_11_MODE_INFRA);
+ nm_device_wifi_set_mode (self, NM_802_11_MODE_INFRA);
/* FIXME: Should we reset the scan interval here? */
-/* nm_device_802_11_wireless_set_scan_interval (app_data, self, NM_WIRELESS_SCAN_INTERVAL_ACTIVE); */
+/* nm_device_wifi_set_scan_interval (app_data, self, NM_WIRELESS_SCAN_INTERVAL_ACTIVE); */
}
static gboolean
@@ -877,8 +877,8 @@
NMConnection *connection,
GError **error)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (device);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (device);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMSettingConnection *s_con;
NMSettingWireless *s_wireless;
@@ -918,8 +918,8 @@
static gboolean
real_can_activate (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMSupplicantInterface *sup_iface;
guint32 state;
@@ -942,8 +942,8 @@
GSList *connections,
char **specific_object)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
GSList *iter, *ap_iter;
for (iter = connections; iter; iter = g_slist_next (iter)) {
@@ -988,13 +988,13 @@
}
/*
- * nm_device_802_11_wireless_get_address
+ * nm_device_wifi_get_address
*
* Get a device's hardware address
*
*/
void
-nm_device_802_11_wireless_get_address (NMDevice80211Wireless *self,
+nm_device_wifi_get_address (NMDeviceWifi *self,
struct ether_addr *addr)
{
g_return_if_fail (self != NULL);
@@ -1005,12 +1005,12 @@
#if DEBUG
static void
-nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self)
+nm_device_wifi_ap_list_print (NMDeviceWifi *self)
{
GSList * elt;
int i = 0;
- g_return_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self));
+ g_return_if_fail (NM_IS_DEVICE_WIFI (self));
nm_info ("AP_LIST_PRINT:");
for (elt = self->priv->ap_list; elt; elt = g_slist_next (elt), i++) {
@@ -1022,7 +1022,7 @@
#endif
static gboolean
-impl_device_get_access_points (NMDevice80211Wireless *self,
+impl_device_get_access_points (NMDeviceWifi *self,
GPtrArray **aps,
GError **err)
{
@@ -1046,7 +1046,7 @@
*
*/
NM80211Mode
-nm_device_802_11_wireless_get_mode (NMDevice80211Wireless *self)
+nm_device_wifi_get_mode (NMDeviceWifi *self)
{
int fd;
NM80211Mode mode = NM_802_11_MODE_UNKNOWN;
@@ -1086,14 +1086,13 @@
/*
- * nm_device_set_mode
+ * nm_device_wifi_set_mode
*
* Set managed/infrastructure/adhoc mode on a device
*
*/
gboolean
-nm_device_802_11_wireless_set_mode (NMDevice80211Wireless *self,
- const NM80211Mode mode)
+nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode)
{
int fd;
const char *iface;
@@ -1103,7 +1102,7 @@
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail ((mode == NM_802_11_MODE_INFRA) || (mode == NM_802_11_MODE_ADHOC), FALSE);
- if (nm_device_802_11_wireless_get_mode (self) == mode)
+ if (nm_device_wifi_get_mode (self) == mode)
return TRUE;
fd = socket (PF_INET, SOCK_DGRAM, 0);
@@ -1141,13 +1140,13 @@
/*
- * nm_device_802_11_wireless_get_frequency
+ * nm_device_wifi_get_frequency
*
* Get current frequency
*
*/
static guint32
-nm_device_802_11_wireless_get_frequency (NMDevice80211Wireless *self)
+nm_device_wifi_get_frequency (NMDeviceWifi *self)
{
int err, fd;
guint32 freq = 0;
@@ -1288,15 +1287,15 @@
/*
- * nm_device_802_11_wireless_get_ssid
+ * nm_device_wifi_get_ssid
*
* If a device is wireless, return the ssid that it is attempting
* to use.
*/
const GByteArray *
-nm_device_802_11_wireless_get_ssid (NMDevice80211Wireless *self)
+nm_device_wifi_get_ssid (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
int sk;
struct iwreq wrq;
char ssid[IW_ESSID_MAX_SIZE + 1];
@@ -1346,14 +1345,14 @@
/*
- * nm_device_802_11_wireless_set_ssid
+ * nm_device_wifi_set_ssid
*
*/
static void
-nm_device_802_11_wireless_set_ssid (NMDevice80211Wireless *self,
+nm_device_wifi_set_ssid (NMDeviceWifi *self,
const GByteArray * ssid)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
int sk;
struct iwreq wrq;
const char * iface;
@@ -1417,14 +1416,14 @@
/*
- * nm_device_802_11_wireless_get_bitrate
+ * nm_device_wifi_get_bitrate
*
* For wireless devices, get the bitrate to broadcast/receive at.
* Returned value is rate in Kb/s.
*
*/
static guint32
-nm_device_802_11_wireless_get_bitrate (NMDevice80211Wireless *self)
+nm_device_wifi_get_bitrate (NMDeviceWifi *self)
{
int err = -1, fd;
struct iwreq wrq;
@@ -1450,7 +1449,7 @@
* that the card is associated with.
*/
void
-nm_device_802_11_wireless_get_bssid (NMDevice80211Wireless *self,
+nm_device_wifi_get_bssid (NMDeviceWifi *self,
struct ether_addr *bssid)
{
int fd;
@@ -1477,13 +1476,13 @@
/*
- * nm_device_802_11_wireless_disable_encryption
+ * nm_device_wifi_disable_encryption
*
* Clear any encryption keys the device may have set.
*
*/
static void
-nm_device_802_11_wireless_disable_encryption (NMDevice80211Wireless *self)
+nm_device_wifi_disable_encryption (NMDeviceWifi *self)
{
int fd;
const char *iface;
@@ -1515,9 +1514,9 @@
}
static gboolean
-can_scan (NMDevice80211Wireless *self)
+can_scan (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
guint32 sup_state;
NMDeviceState dev_state;
gboolean is_disconnected = FALSE;
@@ -1554,8 +1553,8 @@
static gboolean
request_wireless_scan (gpointer user_data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (user_data);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
gboolean backoff = FALSE;
if (can_scan (self)) {
@@ -1578,9 +1577,9 @@
*
*/
static void
-schedule_scan (NMDevice80211Wireless *self, gboolean backoff)
+schedule_scan (NMDeviceWifi *self, gboolean backoff)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
GTimeVal now;
g_get_current_time (&now);
@@ -1615,9 +1614,9 @@
static void
-cancel_pending_scan (NMDevice80211Wireless *self)
+cancel_pending_scan (NMDeviceWifi *self)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->pending_scan_id) {
g_source_remove (priv->pending_scan_id);
@@ -1629,7 +1628,7 @@
static void
supplicant_iface_scan_result_cb (NMSupplicantInterface * iface,
gboolean result,
- NMDevice80211Wireless * self)
+ NMDeviceWifi * self)
{
if (can_scan (self))
schedule_scan (self, TRUE);
@@ -1726,7 +1725,7 @@
*
*/
static void
-merge_scanned_ap (NMDevice80211Wireless *self,
+merge_scanned_ap (NMDeviceWifi *self,
NMAccessPoint *merge_ap)
{
NMAccessPoint *found_ap = NULL;
@@ -1749,7 +1748,7 @@
* constructed from the NMConnection of the activation request, they won't
* always be the same as the capabilities of the real AP from the scan.
*/
- current_ap = nm_device_802_11_wireless_get_activation_ap (self);
+ current_ap = nm_device_wifi_get_activation_ap (self);
if (current_ap && nm_ap_get_fake (current_ap))
strict_match = FALSE;
@@ -1779,7 +1778,7 @@
}
static void
-cull_scan_list (NMDevice80211Wireless * self)
+cull_scan_list (NMDeviceWifi * self)
{
GTimeVal cur_time;
GSList * outdated_list = NULL;
@@ -1834,7 +1833,7 @@
}
static void
-set_ap_strength_from_properties (NMDevice80211Wireless *self,
+set_ap_strength_from_properties (NMDeviceWifi *self,
NMAccessPoint *ap,
GHashTable *properties)
{
@@ -1866,7 +1865,7 @@
static void
supplicant_iface_scanned_ap_cb (NMSupplicantInterface *iface,
GHashTable *properties,
- NMDevice80211Wireless *self)
+ NMDeviceWifi *self)
{
NMDeviceState state;
NMAccessPoint *ap;
@@ -1897,7 +1896,7 @@
static void
-remove_supplicant_interface_connection_error_handler (NMDevice80211Wireless * self)
+remove_supplicant_interface_connection_error_handler (NMDeviceWifi * self)
{
g_return_if_fail (self != NULL);
@@ -1909,7 +1908,7 @@
}
static void
-cleanup_association_attempt (NMDevice80211Wireless * self, gboolean disconnect)
+cleanup_association_attempt (NMDeviceWifi * self, gboolean disconnect)
{
g_return_if_fail (self != NULL);
@@ -1921,7 +1920,7 @@
static void
-remove_link_timeout (NMDevice80211Wireless *self)
+remove_link_timeout (NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -1942,8 +1941,8 @@
link_timeout_cb (gpointer user_data)
{
NMDevice * dev = NM_DEVICE (user_data);
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMActRequest * req = NULL;
NMAccessPoint * ap = NULL;
NMConnection * connection;
@@ -1959,7 +1958,7 @@
priv->link_timeout_id = 0;
req = nm_device_get_act_request (dev);
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
if (req == NULL || ap == NULL) {
nm_warning ("couldn't get activation request or activation AP.");
if (nm_device_is_activating (dev)) {
@@ -2024,13 +2023,13 @@
struct state_cb_data {
- NMDevice80211Wireless * self;
+ NMDeviceWifi * self;
guint32 new_state;
guint32 old_state;
};
static gboolean
-schedule_state_handler (NMDevice80211Wireless * self,
+schedule_state_handler (NMDeviceWifi * self,
GSourceFunc handler,
guint32 new_state,
guint32 old_state)
@@ -2063,14 +2062,14 @@
supplicant_iface_state_cb_handler (gpointer user_data)
{
struct state_cb_data * cb_data = (struct state_cb_data *) user_data;
- NMDevice80211Wireless * self;
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifi * self;
+ NMDeviceWifiPrivate *priv;
guint32 new_state, old_state;
g_return_val_if_fail (cb_data != NULL, FALSE);
self = cb_data->self;
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
new_state = cb_data->new_state;
old_state = cb_data->old_state;
@@ -2097,7 +2096,7 @@
supplicant_iface_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self)
+ NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -2112,7 +2111,7 @@
supplicant_iface_connection_state_cb_handler (gpointer user_data)
{
struct state_cb_data * cb_data = (struct state_cb_data *) user_data;
- NMDevice80211Wireless * self;
+ NMDeviceWifi * self;
NMDevice * dev;
guint32 new_state, old_state;
@@ -2139,7 +2138,7 @@
* schedule the next activation stage.
*/
if (nm_device_get_state (dev) == NM_DEVICE_STATE_CONFIG) {
- NMAccessPoint *ap = nm_device_802_11_wireless_get_activation_ap (self);
+ NMAccessPoint *ap = nm_device_wifi_get_activation_ap (self);
const GByteArray * ssid = nm_ap_get_ssid (ap);
nm_info ("Activation (%s/wireless) Stage 2 of 5 (Device Configure) "
@@ -2172,7 +2171,7 @@
supplicant_iface_connection_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self)
+ NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -2184,7 +2183,7 @@
static void
-cleanup_supplicant_interface (NMDevice80211Wireless * self)
+cleanup_supplicant_interface (NMDeviceWifi * self)
{
Supplicant * sup;
@@ -2228,7 +2227,7 @@
supplicant_mgr_state_cb_handler (gpointer user_data)
{
struct state_cb_data * cb_data = (struct state_cb_data *) user_data;
- NMDevice80211Wireless * self;
+ NMDeviceWifi * self;
guint32 new_state, old_state;
g_return_val_if_fail (cb_data != NULL, FALSE);
@@ -2269,7 +2268,7 @@
supplicant_mgr_state_cb (NMSupplicantInterface * iface,
guint32 new_state,
guint32 old_state,
- NMDevice80211Wireless *self)
+ NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -2280,7 +2279,7 @@
}
struct iface_con_error_cb_data {
- NMDevice80211Wireless * self;
+ NMDeviceWifi * self;
char * name;
char * message;
};
@@ -2290,7 +2289,7 @@
supplicant_iface_connection_error_cb_handler (gpointer user_data)
{
struct iface_con_error_cb_data * cb_data = (struct iface_con_error_cb_data *) user_data;
- NMDevice80211Wireless * self;
+ NMDeviceWifi * self;
g_return_val_if_fail (cb_data != NULL, FALSE);
@@ -2320,7 +2319,7 @@
supplicant_iface_connection_error_cb (NMSupplicantInterface * iface,
const char * name,
const char * message,
- NMDevice80211Wireless * self)
+ NMDeviceWifi * self)
{
struct iface_con_error_cb_data * cb_data;
guint id;
@@ -2341,7 +2340,7 @@
}
static void
-remove_supplicant_connection_timeout (NMDevice80211Wireless *self)
+remove_supplicant_connection_timeout (NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -2353,7 +2352,7 @@
}
static NMActStageReturn
-handle_auth_or_fail (NMDevice80211Wireless *self,
+handle_auth_or_fail (NMDeviceWifi *self,
NMActRequest *req,
gboolean new_secrets)
{
@@ -2362,13 +2361,13 @@
NMAccessPoint *ap;
NMConnection *connection;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self), NM_ACT_STAGE_RETURN_FAILURE);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NM_ACT_STAGE_RETURN_FAILURE);
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NM_ACT_STAGE_RETURN_FAILURE);
connection = nm_act_request_get_connection (req);
g_assert (connection);
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
g_assert (ap);
tries = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES));
@@ -2408,7 +2407,7 @@
supplicant_connection_timeout_cb (gpointer user_data)
{
NMDevice * dev = NM_DEVICE (user_data);
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (user_data);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (user_data);
NMAccessPoint * ap;
NMActRequest * req;
gboolean auth_enforced = FALSE, encrypted = FALSE;
@@ -2431,7 +2430,7 @@
connection = nm_act_request_get_connection (req);
g_assert (connection);
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
g_assert (ap);
auth_enforced = ap_auth_enforced (connection, ap, &encrypted);
@@ -2458,7 +2457,7 @@
static gboolean
-start_supplicant_connection_timeout (NMDevice80211Wireless *self)
+start_supplicant_connection_timeout (NMDeviceWifi *self)
{
NMDevice * dev;
guint id;
@@ -2481,7 +2480,7 @@
static void
-remove_supplicant_timeouts (NMDevice80211Wireless *self)
+remove_supplicant_timeouts (NMDeviceWifi *self)
{
g_return_if_fail (self != NULL);
@@ -2490,9 +2489,9 @@
}
static guint32
-find_supported_frequency (NMDevice80211Wireless *self, guint32 *freqs)
+find_supported_frequency (NMDeviceWifi *self, guint32 *freqs)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
int i;
for (i = 0; i < priv->num_freqs; i++) {
@@ -2507,11 +2506,11 @@
}
static NMSupplicantConfig *
-build_supplicant_config (NMDevice80211Wireless *self,
+build_supplicant_config (NMDeviceWifi *self,
NMConnection *connection,
NMAccessPoint *ap)
{
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMSupplicantConfig *config = NULL;
NMSettingWireless *s_wireless;
NMSettingWirelessSecurity *s_wireless_sec;
@@ -2595,8 +2594,8 @@
static void
real_update_hw_address (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
struct ifreq req;
int ret, fd;
@@ -2617,7 +2616,7 @@
if (memcmp (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr))) {
memcpy (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr));
- g_object_notify (G_OBJECT (dev), NM_DEVICE_802_11_WIRELESS_HW_ADDRESS);
+ g_object_notify (G_OBJECT (dev), NM_DEVICE_WIFI_HW_ADDRESS);
}
out:
@@ -2628,7 +2627,7 @@
static NMActStageReturn
real_act_stage1_prepare (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
NMAccessPoint *ap = NULL;
/* If the user is trying to connect to an AP that NM doesn't yet know about
@@ -2636,7 +2635,7 @@
* settings in the connection to use until the AP is recognized from the
* scan list, which should show up when the connection is successful.
*/
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
if (!ap) {
NMActRequest *req;
NMConnection *connection;
@@ -2723,7 +2722,7 @@
static NMActStageReturn
real_act_stage2_config (NMDevice *dev)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
const char * iface = nm_device_get_iface (dev);
NMSupplicantConfig * config = NULL;
@@ -2739,7 +2738,7 @@
req = nm_device_get_act_request (dev);
g_assert (req);
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
g_assert (ap);
connection = nm_act_request_get_connection (req);
@@ -2822,7 +2821,7 @@
g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
/* Chain up to parent */
- parent_class = NM_DEVICE_CLASS (nm_device_802_11_wireless_parent_class);
+ parent_class = NM_DEVICE_CLASS (nm_device_wifi_parent_class);
ret = parent_class->act_stage4_get_ip4_config (dev, config);
if ((ret == NM_ACT_STAGE_RETURN_SUCCESS) && *config) {
@@ -2847,8 +2846,8 @@
real_act_stage4_ip_config_timeout (NMDevice *dev,
NMIP4Config **config)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
- NMAccessPoint * ap = nm_device_802_11_wireless_get_activation_ap (self);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
+ NMAccessPoint * ap = nm_device_wifi_get_activation_ap (self);
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
NMIP4Config * real_config = NULL;
NMActRequest * req = nm_device_get_act_request (dev);
@@ -2883,11 +2882,11 @@
nm_device_get_iface (dev));
}
} else if (nm_ap_get_mode (ap) == NM_802_11_MODE_ADHOC) {
- NMDevice80211WirelessClass * klass;
+ NMDeviceWifiClass * klass;
NMDeviceClass * parent_class;
/* For Ad-Hoc networks, chain up to parent to get a Zeroconf IP */
- klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (self);
+ klass = NM_DEVICE_WIFI_GET_CLASS (self);
parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass));
ret = parent_class->act_stage4_ip_config_timeout (dev, &real_config);
} else {
@@ -2907,8 +2906,8 @@
static void
activation_success_handler (NMDevice *dev)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *ap;
struct ether_addr bssid = { {0x0, 0x0, 0x0, 0x0, 0x0, 0x0} };
NMAccessPoint *tmp_ap;
@@ -2924,7 +2923,7 @@
/* Clear wireless secrets tries on success */
g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, NULL);
- ap = nm_device_802_11_wireless_get_activation_ap (self);
+ ap = nm_device_wifi_get_activation_ap (self);
/* If the activate AP was fake, it probably won't have a BSSID at all.
* But if activation was successful, the card will know the BSSID. Grab
@@ -2933,11 +2932,11 @@
if (!nm_ap_get_fake (ap))
goto done;
- nm_device_802_11_wireless_get_bssid (self, &bssid);
+ nm_device_wifi_get_bssid (self, &bssid);
if (!nm_ethernet_address_is_valid (nm_ap_get_address (ap)))
nm_ap_set_address (ap, &bssid);
if (!nm_ap_get_freq (ap))
- nm_ap_set_freq (ap, nm_device_802_11_wireless_get_frequency (self));
+ nm_ap_set_freq (ap, nm_device_wifi_get_frequency (self));
tmp_ap = get_active_ap (self, ap, TRUE);
if (tmp_ap) {
@@ -2969,7 +2968,7 @@
static void
activation_failure_handler (NMDevice *dev)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
NMAccessPoint * ap;
const GByteArray * ssid;
NMActRequest *req;
@@ -2984,7 +2983,7 @@
/* Clear wireless secrets tries on failure */
g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, NULL);
- if ((ap = nm_device_802_11_wireless_get_activation_ap (self))) {
+ if ((ap = nm_device_wifi_get_activation_ap (self))) {
if (nm_ap_get_fake (ap)) {
/* Fake APs are ones that don't show up in scans,
* but which the user explicitly attempted to connect to.
@@ -3020,20 +3019,20 @@
static guint32
real_get_type_capabilities (NMDevice *dev)
{
- NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
+ NMDeviceWifi * self = NM_DEVICE_WIFI (dev);
return self->priv->capabilities;
}
static void
-nm_device_802_11_wireless_dispose (GObject *object)
+nm_device_wifi_dispose (GObject *object)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (object);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (object);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->dispose_has_run) {
- G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->dispose (object);
return;
}
@@ -3046,24 +3045,24 @@
priv->state_to_disconnected_id = 0;
}
- G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->dispose (object);
}
static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDevice80211Wireless *device = NM_DEVICE_802_11_WIRELESS (object);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (device);
+ NMDeviceWifi *device = NM_DEVICE_WIFI (object);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
struct ether_addr hw_addr;
switch (prop_id) {
case PROP_HW_ADDRESS:
- nm_device_802_11_wireless_get_address (device, &hw_addr);
+ nm_device_wifi_get_address (device, &hw_addr);
g_value_take_string (value, nm_ether_ntop (&hw_addr));
break;
case PROP_MODE:
- g_value_set_uint (value, nm_device_802_11_wireless_get_mode (device));
+ g_value_set_uint (value, nm_device_wifi_get_mode (device));
break;
case PROP_BITRATE:
g_value_set_uint (value, priv->rate);
@@ -3084,16 +3083,16 @@
}
static void
-nm_device_802_11_wireless_class_init (NMDevice80211WirelessClass *klass)
+nm_device_wifi_class_init (NMDeviceWifiClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (NMDevice80211WirelessPrivate));
+ g_type_class_add_private (object_class, sizeof (NMDeviceWifiPrivate));
object_class->constructor = constructor;
object_class->get_property = get_property;
- object_class->dispose = nm_device_802_11_wireless_dispose;
+ object_class->dispose = nm_device_wifi_dispose;
parent_class->get_type_capabilities = real_get_type_capabilities;
parent_class->get_generic_capabilities = real_get_generic_capabilities;
@@ -3120,38 +3119,38 @@
/* Properties */
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
- g_param_spec_string (NM_DEVICE_802_11_WIRELESS_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_WIFI_HW_ADDRESS,
"MAC Address",
"Hardware MAC address",
NULL,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_MODE,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_MODE,
+ g_param_spec_uint (NM_DEVICE_WIFI_MODE,
"Mode",
"Mode",
NM_802_11_MODE_UNKNOWN, NM_802_11_MODE_INFRA, NM_802_11_MODE_INFRA,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_BITRATE,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_BITRATE,
+ g_param_spec_uint (NM_DEVICE_WIFI_BITRATE,
"Bitrate",
"Bitrate",
0, G_MAXUINT32, 0,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_ACTIVE_ACCESS_POINT,
- g_param_spec_boxed (NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT,
+ g_param_spec_boxed (NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT,
"Active access point",
"Currently active access point",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_CAPABILITIES,
- g_param_spec_uint (NM_DEVICE_802_11_WIRELESS_CAPABILITIES,
+ g_param_spec_uint (NM_DEVICE_WIFI_CAPABILITIES,
"Wireless Capabilities",
"Wireless Capabilities",
- 0, G_MAXUINT32, NM_802_11_DEVICE_CAP_NONE,
+ 0, G_MAXUINT32, NM_WIFI_DEVICE_CAP_NONE,
G_PARAM_READABLE));
/* Signals */
@@ -3159,7 +3158,7 @@
g_signal_new ("access-point-added",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, access_point_added),
+ G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_added),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
@@ -3169,7 +3168,7 @@
g_signal_new ("access-point-removed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, access_point_removed),
+ G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_removed),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
@@ -3179,7 +3178,7 @@
g_signal_new ("hidden-ap-found",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, hidden_ap_found),
+ G_STRUCT_OFFSET (NMDeviceWifiClass, hidden_ap_found),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
@@ -3187,10 +3186,10 @@
signals[PROPERTIES_CHANGED] =
nm_properties_changed_signal_new (object_class,
- G_STRUCT_OFFSET (NMDevice80211WirelessClass, properties_changed));
+ G_STRUCT_OFFSET (NMDeviceWifiClass, properties_changed));
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
- &dbus_glib_nm_device_802_11_wireless_object_info);
+ &dbus_glib_nm_device_wifi_object_info);
dbus_g_error_domain_register (NM_WIFI_ERROR, NULL, NM_TYPE_WIFI_ERROR);
}
@@ -3205,8 +3204,8 @@
static void
state_changed_cb (NMDevice *device, NMDeviceState state, gpointer user_data)
{
- NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (device);
- NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (device);
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
gboolean clear_aps = FALSE;
/* Remove any previous delayed transition to disconnected */
@@ -3247,8 +3246,8 @@
}
-NMDevice80211Wireless *
-nm_device_802_11_wireless_new (const char *udi,
+NMDeviceWifi *
+nm_device_wifi_new (const char *udi,
const char *iface,
const char *driver,
gboolean managed)
@@ -3259,7 +3258,7 @@
g_return_val_if_fail (iface != NULL, NULL);
g_return_val_if_fail (driver != NULL, NULL);
- obj = g_object_new (NM_TYPE_DEVICE_802_11_WIRELESS,
+ obj = g_object_new (NM_TYPE_DEVICE_WIFI,
NM_DEVICE_INTERFACE_UDI, udi,
NM_DEVICE_INTERFACE_IFACE, iface,
NM_DEVICE_INTERFACE_DRIVER, driver,
@@ -3272,17 +3271,17 @@
G_CALLBACK (state_changed_cb),
NULL);
- return NM_DEVICE_802_11_WIRELESS (obj);
+ return NM_DEVICE_WIFI (obj);
}
NMAccessPoint *
-nm_device_802_11_wireless_get_activation_ap (NMDevice80211Wireless *self)
+nm_device_wifi_get_activation_ap (NMDeviceWifi *self)
{
NMActRequest *req;
const char *ap_path;
GSList * elt;
- g_return_val_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NULL);
req = nm_device_get_act_request (NM_DEVICE (self));
if (!req)
@@ -3303,14 +3302,14 @@
}
void
-nm_device_802_11_wireless_set_enabled (NMDevice80211Wireless *self, gboolean enabled)
+nm_device_wifi_set_enabled (NMDeviceWifi *self, gboolean enabled)
{
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
NMDeviceState state;
- g_return_if_fail (NM_IS_DEVICE_802_11_WIRELESS (self));
+ g_return_if_fail (NM_IS_DEVICE_WIFI (self));
- priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+ priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->enabled == enabled)
return;
Copied: trunk/src/nm-device-wifi.h (from r3739, /trunk/src/nm-device-802-11-wireless.h)
==============================================================================
--- /trunk/src/nm-device-802-11-wireless.h (original)
+++ trunk/src/nm-device-wifi.h Tue Jun 10 16:32:39 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
@@ -21,8 +21,8 @@
* (C) Copyright 2005 Red Hat, Inc.
*/
-#ifndef NM_DEVICE_802_11_WIRELESS_H
-#define NM_DEVICE_802_11_WIRELESS_H
+#ifndef NM_DEVICE_WIFI_H
+#define NM_DEVICE_WIFI_H
#include <glib-object.h>
#include <dbus/dbus.h>
@@ -36,72 +36,72 @@
G_BEGIN_DECLS
-#define NM_TYPE_DEVICE_802_11_WIRELESS (nm_device_802_11_wireless_get_type ())
-#define NM_DEVICE_802_11_WIRELESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211Wireless))
-#define NM_DEVICE_802_11_WIRELESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessClass))
-#define NM_IS_DEVICE_802_11_WIRELESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_802_11_WIRELESS))
-#define NM_IS_DEVICE_802_11_WIRELESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_802_11_WIRELESS))
-#define NM_DEVICE_802_11_WIRELESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessClass))
-
-
-#define NM_DEVICE_802_11_WIRELESS_HW_ADDRESS "hw-address"
-#define NM_DEVICE_802_11_WIRELESS_MODE "mode"
-#define NM_DEVICE_802_11_WIRELESS_BITRATE "bitrate"
-#define NM_DEVICE_802_11_WIRELESS_ACTIVE_ACCESS_POINT "active-access-point"
-#define NM_DEVICE_802_11_WIRELESS_CAPABILITIES "wireless-capabilities"
-
-#ifndef NM_DEVICE_802_11_WIRELESS_DEFINED
-#define NM_DEVICE_802_11_WIRELESS_DEFINED
-typedef struct _NMDevice80211Wireless NMDevice80211Wireless;
+#define NM_TYPE_DEVICE_WIFI (nm_device_wifi_get_type ())
+#define NM_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifi))
+#define NM_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+#define NM_IS_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_WIFI))
+#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIFI))
+#define NM_DEVICE_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+
+
+#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address"
+#define NM_DEVICE_WIFI_MODE "mode"
+#define NM_DEVICE_WIFI_BITRATE "bitrate"
+#define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point"
+#define NM_DEVICE_WIFI_CAPABILITIES "wireless-capabilities"
+
+#ifndef NM_DEVICE_WIFI_DEFINED
+#define NM_DEVICE_WIFI_DEFINED
+typedef struct _NMDeviceWifi NMDeviceWifi;
#endif
-typedef struct _NMDevice80211WirelessClass NMDevice80211WirelessClass;
-typedef struct _NMDevice80211WirelessPrivate NMDevice80211WirelessPrivate;
+typedef struct _NMDeviceWifiClass NMDeviceWifiClass;
+typedef struct _NMDeviceWifiPrivate NMDeviceWifiPrivate;
-struct _NMDevice80211Wireless
+struct _NMDeviceWifi
{
NMDevice parent;
/*< private >*/
- NMDevice80211WirelessPrivate *priv;
+ NMDeviceWifiPrivate *priv;
};
-struct _NMDevice80211WirelessClass
+struct _NMDeviceWifiClass
{
NMDeviceClass parent;
/* Signals */
- void (*access_point_added) (NMDevice80211Wireless *device, NMAccessPoint *ap);
- void (*access_point_removed) (NMDevice80211Wireless *device, NMAccessPoint *ap);
- void (*hidden_ap_found) (NMDevice80211Wireless *device, NMAccessPoint *ap);
- void (*properties_changed) (NMDevice80211Wireless *device, GHashTable *properties);
+ void (*access_point_added) (NMDeviceWifi *device, NMAccessPoint *ap);
+ void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
+ void (*hidden_ap_found) (NMDeviceWifi *device, NMAccessPoint *ap);
+ void (*properties_changed) (NMDeviceWifi *device, GHashTable *properties);
};
-GType nm_device_802_11_wireless_get_type (void);
+GType nm_device_wifi_get_type (void);
-NMDevice80211Wireless *nm_device_802_11_wireless_new (const char *udi,
+NMDeviceWifi *nm_device_wifi_new (const char *udi,
const char *iface,
const char *driver,
gboolean managed);
-void nm_device_802_11_wireless_get_address (NMDevice80211Wireless *dev,
+void nm_device_wifi_get_address (NMDeviceWifi *dev,
struct ether_addr *addr);
-void nm_device_802_11_wireless_get_bssid (NMDevice80211Wireless *dev,
+void nm_device_wifi_get_bssid (NMDeviceWifi *dev,
struct ether_addr *bssid);
-const GByteArray * nm_device_802_11_wireless_get_ssid (NMDevice80211Wireless *self);
+const GByteArray * nm_device_wifi_get_ssid (NMDeviceWifi *self);
-gboolean nm_device_802_11_wireless_set_mode (NMDevice80211Wireless *self,
+gboolean nm_device_wifi_set_mode (NMDeviceWifi *self,
const NM80211Mode mode);
-NM80211Mode nm_device_802_11_wireless_get_mode (NMDevice80211Wireless *self);
+NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *self);
-NMAccessPoint * nm_device_802_11_wireless_get_activation_ap (NMDevice80211Wireless *self);
+NMAccessPoint * nm_device_wifi_get_activation_ap (NMDeviceWifi *self);
-void nm_device_802_11_wireless_set_enabled (NMDevice80211Wireless *self, gboolean enabled);
+void nm_device_wifi_set_enabled (NMDeviceWifi *self, gboolean enabled);
G_END_DECLS
-#endif /* NM_DEVICE_802_11_WIRELESS_H */
+#endif /* NM_DEVICE_WIFI_H */
Modified: trunk/src/nm-hal-manager.c
==============================================================================
--- trunk/src/nm-hal-manager.c (original)
+++ trunk/src/nm-hal-manager.c Tue Jun 10 16:32:39 2008
@@ -11,7 +11,7 @@
#include "nm-marshal.h"
#include "nm-dbus-manager.h"
#include "nm-utils.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "nm-device-ethernet.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
@@ -186,7 +186,7 @@
}
driver = nm_get_device_driver_name (priv->hal_ctx, udi);
- device = (GObject *) nm_device_802_11_wireless_new (udi, iface, driver, managed);
+ device = (GObject *) nm_device_wifi_new (udi, iface, driver, managed);
libhal_free_string (iface);
g_free (driver);
Modified: trunk/src/nm-manager.c
==============================================================================
--- trunk/src/nm-manager.c (original)
+++ trunk/src/nm-manager.c Tue Jun 10 16:32:39 2008
@@ -9,7 +9,7 @@
#include "nm-vpn-manager.h"
#include "nm-device-interface.h"
#include "nm-device-private.h"
-#include "nm-device-802-11-wireless.h"
+#include "nm-device-wifi.h"
#include "NetworkManagerSystem.h"
#include "nm-properties-changed-signal.h"
#include "nm-setting-connection.h"
@@ -1362,8 +1362,8 @@
/* enable/disable wireless devices as required */
for (iter = priv->devices; iter; iter = iter->next) {
- if (NM_IS_DEVICE_802_11_WIRELESS (iter->data))
- nm_device_802_11_wireless_set_enabled (NM_DEVICE_802_11_WIRELESS (iter->data), enabled);
+ if (NM_IS_DEVICE_WIFI (iter->data))
+ nm_device_wifi_set_enabled (NM_DEVICE_WIFI (iter->data), enabled);
}
}
@@ -1473,13 +1473,13 @@
/* Attach to the access-point-added signal so that the manager can fill
* non-SSID-broadcasting APs with an SSID.
*/
- if (NM_IS_DEVICE_802_11_WIRELESS (device)) {
+ if (NM_IS_DEVICE_WIFI (device)) {
g_signal_connect (device, "hidden-ap-found",
G_CALLBACK (manager_hidden_ap_found),
self);
/* Set initial rfkill state */
- nm_device_802_11_wireless_set_enabled (NM_DEVICE_802_11_WIRELESS (device), priv->wireless_enabled);
+ nm_device_wifi_set_enabled (NM_DEVICE_WIFI (device), priv->wireless_enabled);
}
iface = nm_device_get_iface (NM_DEVICE (device));
Modified: trunk/test/nm-tool.c
==============================================================================
--- trunk/test/nm-tool.c (original)
+++ trunk/test/nm-tool.c Tue Jun 10 16:32:39 2008
@@ -33,7 +33,7 @@
#include <nm-client.h>
#include <nm-device.h>
#include <nm-device-ethernet.h>
-#include <nm-device-802-11-wireless.h>
+#include <nm-device-wifi.h>
#include <nm-gsm-device.h>
#include <nm-cdma-device.h>
#include <nm-utils.h>
@@ -215,8 +215,8 @@
/* General information */
if (NM_IS_DEVICE_ETHERNET (device))
print_string ("Type", "Wired");
- else if (NM_IS_DEVICE_802_11_WIRELESS (device))
- print_string ("Type", "802.11 Wireless");
+ else if (NM_IS_DEVICE_WIFI (device))
+ print_string ("Type", "802.11 WiFi");
else if (NM_IS_GSM_DEVICE (device))
print_string ("Type", "Mobile Broadband (GSM)");
else if (NM_IS_CDMA_DEVICE (device))
@@ -245,8 +245,8 @@
tmp = NULL;
if (NM_IS_DEVICE_ETHERNET (device))
tmp = g_strdup (nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)));
- else if (NM_IS_DEVICE_802_11_WIRELESS (device))
- tmp = g_strdup (nm_device_802_11_wireless_get_hw_address (NM_DEVICE_802_11_WIRELESS (device)));
+ else if (NM_IS_DEVICE_WIFI (device))
+ tmp = g_strdup (nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (device)));
if (tmp) {
print_string ("HW Address", tmp);
@@ -267,9 +267,9 @@
if (NM_IS_DEVICE_ETHERNET (device)) {
/* Speed in Mb/s */
speed = nm_device_ethernet_get_speed (NM_DEVICE_ETHERNET (device));
- } else if (NM_IS_DEVICE_802_11_WIRELESS (device)) {
+ } else if (NM_IS_DEVICE_WIFI (device)) {
/* Speed in b/s */
- speed = nm_device_802_11_wireless_get_bitrate (NM_DEVICE_802_11_WIRELESS (device));
+ speed = nm_device_wifi_get_bitrate (NM_DEVICE_WIFI (device));
speed /= 1000;
}
@@ -282,7 +282,7 @@
}
/* Wireless specific information */
- if ((NM_IS_DEVICE_802_11_WIRELESS (device))) {
+ if ((NM_IS_DEVICE_WIFI (device))) {
guint32 wcaps;
NMAccessPoint *active_ap = NULL;
const char *active_bssid = NULL;
@@ -290,23 +290,23 @@
printf ("\n Wireless Settings\n");
- wcaps = nm_device_802_11_wireless_get_capabilities (NM_DEVICE_802_11_WIRELESS (device));
+ wcaps = nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (device));
- if (wcaps & (NM_802_11_DEVICE_CAP_CIPHER_WEP40 | NM_802_11_DEVICE_CAP_CIPHER_WEP104))
+ if (wcaps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104))
print_string (" WEP Encryption", "yes");
- if (wcaps & NM_802_11_DEVICE_CAP_WPA)
+ if (wcaps & NM_WIFI_DEVICE_CAP_WPA)
print_string (" WPA Encryption", "yes");
- if (wcaps & NM_802_11_DEVICE_CAP_RSN)
+ if (wcaps & NM_WIFI_DEVICE_CAP_RSN)
print_string (" WPA2 Encryption", "yes");
if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) {
- active_ap = nm_device_802_11_wireless_get_active_access_point (NM_DEVICE_802_11_WIRELESS (device));
+ active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (device));
active_bssid = active_ap ? nm_access_point_get_hw_address (active_ap) : NULL;
}
printf ("\n Wireless Access Points%s\n", active_ap ? "(* = Current AP)" : "");
- aps = nm_device_802_11_wireless_get_access_points (NM_DEVICE_802_11_WIRELESS (device));
+ aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (device));
if (aps && aps->len)
g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) active_bssid);
} else if (NM_IS_DEVICE_ETHERNET (device)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]