aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile.am2
-rw-r--r--plugins/fibocom/mm-broadband-modem-fibocom.c60
-rw-r--r--plugins/fibocom/mm-broadband-modem-fibocom.h47
-rw-r--r--plugins/fibocom/mm-plugin-fibocom.c11
-rw-r--r--plugins/meson.build7
5 files changed, 121 insertions, 6 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 5e2d4a14..905ddfcf 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -690,6 +690,8 @@ if ENABLE_PLUGIN_FIBOCOM
pkglib_LTLIBRARIES += libmm-plugin-fibocom.la
libmm_plugin_fibocom_la_SOURCES = \
+ fibocom/mm-broadband-modem-fibocom.c \
+ fibocom/mm-broadband-modem-fibocom.h \
fibocom/mm-plugin-fibocom.c \
fibocom/mm-plugin-fibocom.h \
$(NULL)
diff --git a/plugins/fibocom/mm-broadband-modem-fibocom.c b/plugins/fibocom/mm-broadband-modem-fibocom.c
new file mode 100644
index 00000000..900e6e42
--- /dev/null
+++ b/plugins/fibocom/mm-broadband-modem-fibocom.c
@@ -0,0 +1,60 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details:
+ *
+ * Copyright (C) 2022 Disruptive Technologies Research AS
+ */
+
+#include <config.h>
+
+#include "mm-broadband-modem-fibocom.h"
+#include "mm-broadband-modem.h"
+#include "mm-iface-modem.h"
+
+static void iface_modem_init (MMIfaceModem *iface);
+
+G_DEFINE_TYPE_EXTENDED (MMBroadbandModemFibocom, mm_broadband_modem_fibocom, MM_TYPE_BROADBAND_MODEM, 0,
+ G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init))
+
+/*****************************************************************************/
+
+MMBroadbandModemFibocom *
+mm_broadband_modem_fibocom_new (const gchar *device,
+ const gchar **drivers,
+ const gchar *plugin,
+ guint16 vendor_id,
+ guint16 product_id)
+{
+ return g_object_new (MM_TYPE_BROADBAND_MODEM_FIBOCOM,
+ MM_BASE_MODEM_DEVICE, device,
+ MM_BASE_MODEM_DRIVERS, drivers,
+ MM_BASE_MODEM_PLUGIN, plugin,
+ MM_BASE_MODEM_VENDOR_ID, vendor_id,
+ MM_BASE_MODEM_PRODUCT_ID, product_id,
+ MM_BASE_MODEM_DATA_NET_SUPPORTED, FALSE,
+ MM_BASE_MODEM_DATA_TTY_SUPPORTED, TRUE,
+ NULL);
+}
+
+static void
+mm_broadband_modem_fibocom_init (MMBroadbandModemFibocom *self)
+{
+}
+
+static void
+iface_modem_init (MMIfaceModem *iface)
+{
+}
+
+static void
+mm_broadband_modem_fibocom_class_init (MMBroadbandModemFibocomClass *klass)
+{
+}
diff --git a/plugins/fibocom/mm-broadband-modem-fibocom.h b/plugins/fibocom/mm-broadband-modem-fibocom.h
new file mode 100644
index 00000000..51a43e91
--- /dev/null
+++ b/plugins/fibocom/mm-broadband-modem-fibocom.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details:
+ *
+ * Copyright (C) 2022 Disruptive Technologies Research AS
+ */
+
+#ifndef MM_BROADBAND_MODEM_FIBOCOM_H
+#define MM_BROADBAND_MODEM_FIBOCOM_H
+
+#include "mm-broadband-modem.h"
+
+#define MM_TYPE_BROADBAND_MODEM_FIBOCOM (mm_broadband_modem_fibocom_get_type ())
+#define MM_BROADBAND_MODEM_FIBOCOM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_BROADBAND_MODEM_FIBOCOM, MMBroadbandModemFibocom))
+#define MM_BROADBAND_MODEM_FIBOCOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_BROADBAND_MODEM_FIBOCOM, MMBroadbandModemFibocomClass))
+#define MM_IS_BROADBAND_MODEM_FIBOCOM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_BROADBAND_MODEM_FIBOCOM))
+#define MM_IS_BROADBAND_MODEM_FIBOCOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_BROADBAND_MODEM_FIBOCOM))
+#define MM_BROADBAND_MODEM_FIBOCOM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_BROADBAND_MODEM_FIBOCOM, MMBroadbandModemFibocomClass))
+
+typedef struct _MMBroadbandModemFibocom MMBroadbandModemFibocom;
+typedef struct _MMBroadbandModemFibocomClass MMBroadbandModemFibocomClass;
+
+struct _MMBroadbandModemFibocom {
+ MMBroadbandModem parent;
+};
+
+struct _MMBroadbandModemFibocomClass{
+ MMBroadbandModemClass parent;
+};
+
+GType mm_broadband_modem_fibocom_get_type (void);
+
+MMBroadbandModemFibocom *mm_broadband_modem_fibocom_new (const gchar *device,
+ const gchar **drivers,
+ const gchar *plugin,
+ guint16 vendor_id,
+ guint16 product_id);
+
+#endif /* MM_BROADBAND_MODEM_FIBOCOM_H */
diff --git a/plugins/fibocom/mm-plugin-fibocom.c b/plugins/fibocom/mm-plugin-fibocom.c
index 1ff9f17c..97aa2bb3 100644
--- a/plugins/fibocom/mm-plugin-fibocom.c
+++ b/plugins/fibocom/mm-plugin-fibocom.c
@@ -23,6 +23,7 @@
#include "mm-plugin-fibocom.h"
#include "mm-broadband-modem.h"
#include "mm-broadband-modem-xmm.h"
+#include "mm-broadband-modem-fibocom.h"
#if defined WITH_MBIM
#include "mm-broadband-modem-mbim.h"
@@ -89,11 +90,11 @@ create_modem (MMPlugin *self,
}
mm_obj_dbg (self, "Fibocom modem found...");
- return MM_BASE_MODEM (mm_broadband_modem_new (uid,
- drivers,
- mm_plugin_get_name (self),
- vendor,
- product));
+ return MM_BASE_MODEM (mm_broadband_modem_fibocom_new (uid,
+ drivers,
+ mm_plugin_get_name (self),
+ vendor,
+ product));
}
/*****************************************************************************/
diff --git a/plugins/meson.build b/plugins/meson.build
index ea40ebab..2e185a14 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -337,9 +337,14 @@ if plugins_options['fibocom']
'-DTESTUDEVRULESDIR_FIBOCOM="@0@"'.format(plugins_dir / 'fibocom'),
]
+ sources = files(
+ 'fibocom/mm-broadband-modem-fibocom.c',
+ 'fibocom/mm-plugin-fibocom.c',
+ )
+
plugins += {'plugin-fibocom': {
'plugin': true,
- 'module': {'sources': files('fibocom/mm-plugin-fibocom.c'), 'include_directories': plugins_incs + [xmm_inc], 'c_args': c_args},
+ 'module': {'sources': sources, 'include_directories': plugins_incs + [xmm_inc], 'c_args': c_args},
}}
plugins_udev_rules += files('fibocom/77-mm-fibocom-port-types.rules')