summary refs log tree commit diff
path: root/src/devices/wwan/nm-wwan-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/wwan/nm-wwan-factory.c')
-rw-r--r--src/devices/wwan/nm-wwan-factory.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/devices/wwan/nm-wwan-factory.c b/src/devices/wwan/nm-wwan-factory.c
index 2b9c3d4d..49b0b0af 100644
--- a/src/devices/wwan/nm-wwan-factory.c
+++ b/src/devices/wwan/nm-wwan-factory.c
@@ -25,9 +25,12 @@
 
 #include "nm-device-factory.h"
 #include "nm-wwan-factory.h"
+#include "nm-setting-gsm.h"
+#include "nm-setting-cdma.h"
 #include "nm-modem-manager.h"
 #include "nm-device-modem.h"
 #include "nm-logging.h"
+#include "nm-platform.h"
 
 static GType nm_wwan_factory_get_type (void);
 
@@ -87,10 +90,17 @@ modem_added_cb (NMModemManager *manager,
 }
 
 
-static NMDeviceType
-get_device_type (NMDeviceFactory *factory)
+NM_DEVICE_FACTORY_DECLARE_TYPES (
+	NM_DEVICE_FACTORY_DECLARE_LINK_TYPES    (NM_LINK_TYPE_WWAN_ETHERNET)
+	NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_GSM_SETTING_NAME, NM_SETTING_CDMA_SETTING_NAME)
+)
+
+static NMDevice *
+new_link (NMDeviceFactory *factory, NMPlatformLink *plink, gboolean *out_ignore, GError **error)
 {
-	return NM_DEVICE_TYPE_MODEM;
+	g_warn_if_fail (plink->type == NM_LINK_TYPE_WWAN_ETHERNET);
+	*out_ignore = TRUE;
+	return NULL;
 }
 
 static void
@@ -115,7 +125,8 @@ nm_wwan_factory_init (NMWwanFactory *self)
 static void
 device_factory_interface_init (NMDeviceFactory *factory_iface)
 {
-	factory_iface->get_device_type = get_device_type;
+	factory_iface->get_supported_types = get_supported_types;
+	factory_iface->new_link = new_link;
 	factory_iface->start = start;
 }