summaryrefslogtreecommitdiff
path: root/src/nm-device-modem.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-11-17 23:38:08 -0600
committerDan Williams <dcbw@redhat.com>2011-12-02 13:30:07 -0600
commit827d9defb92b1f4834e6d739d180f76827fcc827 (patch)
treebbd472bc66a1f4e943071ba6148dc2db8040cc9e /src/nm-device-modem.c
parent51c25508c28717d9ae13ad1ca9db5ec8fc43c8b0 (diff)
downloadNetworkManager-827d9defb92b1f4834e6d739d180f76827fcc827.tar.gz
core: move nm_device_interface_set_enabled() to nm-device.c
Diffstat (limited to 'src/nm-device-modem.c')
-rw-r--r--src/nm-device-modem.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c
index 1f9e0cbb6a..59a5c4879d 100644
--- a/src/nm-device-modem.c
+++ b/src/nm-device-modem.c
@@ -31,10 +31,7 @@
#include "nm-marshal.h"
#include "nm-logging.h"
-static void device_interface_init (NMDeviceInterface *iface_class);
-
-G_DEFINE_TYPE_EXTENDED (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))
+G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE)
#define NM_DEVICE_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MODEM, NMDeviceModemPrivate))
@@ -60,7 +57,7 @@ enum {
};
static guint signals[LAST_SIGNAL] = { 0 };
-static void real_set_enabled (NMDeviceInterface *device, gboolean enabled);
+static void real_set_enabled (NMDevice *device, gboolean enabled);
/*****************************************************************************/
@@ -163,7 +160,7 @@ modem_enabled_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
NMDeviceModem *self = NM_DEVICE_MODEM (user_data);
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
- real_set_enabled (NM_DEVICE_INTERFACE (self), nm_modem_get_mm_enabled (priv->modem));
+ real_set_enabled (NM_DEVICE (self), nm_modem_get_mm_enabled (priv->modem));
g_signal_emit (G_OBJECT (self), signals[ENABLE_CHANGED], 0);
}
@@ -292,7 +289,7 @@ real_get_enabled (NMDevice *device)
}
static void
-real_set_enabled (NMDeviceInterface *device, gboolean enabled)
+real_set_enabled (NMDevice *device, gboolean enabled)
{
NMDeviceModem *self = NM_DEVICE_MODEM (device);
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
@@ -349,12 +346,6 @@ nm_device_modem_new (NMModem *modem, const char *driver)
}
static void
-device_interface_init (NMDeviceInterface *iface_class)
-{
- iface_class->set_enabled = real_set_enabled;
-}
-
-static void
nm_device_modem_init (NMDeviceModem *self)
{
g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), self);
@@ -457,6 +448,7 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass)
device_class->act_stage2_config = real_act_stage2_config;
device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
device_class->get_enabled = real_get_enabled;
+ device_class->set_enabled = real_set_enabled;
/* Properties */
g_object_class_install_property