diff options
author | Dan Williams <dcbw@redhat.com> | 2014-05-02 11:04:21 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-05-13 13:50:25 -0500 |
commit | e62ac0d4691dea8c6e2da5f750228c00ab627b75 (patch) | |
tree | 3fcbf77621bbaa864cdeb53ffcedb2faf646855f /src/devices/wifi/nm-wifi-factory.c | |
parent | 92be78c905c6def01260c2b2acdba041c2edf806 (diff) |
devices: simplify plugin type checking
Instead of having a GObject property and a factory function to get
the plugin's device type, just use the factory function, since it
always has to be around.
Diffstat (limited to 'src/devices/wifi/nm-wifi-factory.c')
-rw-r--r-- | src/devices/wifi/nm-wifi-factory.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c index e4a140a324..02ad93f46d 100644 --- a/src/devices/wifi/nm-wifi-factory.c +++ b/src/devices/wifi/nm-wifi-factory.c @@ -43,11 +43,6 @@ static void device_factory_interface_init (NMDeviceFactory *factory_iface); G_DEFINE_TYPE_EXTENDED (NMWifiFactory, nm_wifi_factory, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_FACTORY, device_factory_interface_init)) -enum { - PROP_0, - PROP_DEVICE_TYPE, -}; - /**************************************************************************/ #define PLUGIN_TYPE NM_DEVICE_TYPE_WIFI @@ -77,19 +72,6 @@ new_link (NMDeviceFactory *factory, NMPlatformLink *plink, GError **error) } static void -get_property (GObject *object, guint prop, GValue *value, GParamSpec *pspec) -{ - switch (prop) { - case PROP_DEVICE_TYPE: - g_value_set_uint (value, PLUGIN_TYPE); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop, pspec); - break; - } -} - -static void device_factory_interface_init (NMDeviceFactory *factory_iface) { factory_iface->new_link = new_link; @@ -103,12 +85,5 @@ nm_wifi_factory_init (NMWifiFactory *self) static void nm_wifi_factory_class_init (NMWifiFactoryClass *wf_class) { - GObjectClass *object_class = G_OBJECT_CLASS (wf_class); - - object_class->get_property = get_property; - - g_object_class_override_property (object_class, - PROP_DEVICE_TYPE, - NM_DEVICE_FACTORY_DEVICE_TYPE); } |