aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.c
diff options
context:
space:
mode:
authorThomas Vogt <acc-github@tovotu.de>2024-06-19 20:33:22 +0200
committerAleksander Morgado <aleksander@aleksander.es>2024-07-31 17:36:14 +0000
commitc2e3a8c10e6d398ef79067666c976fe6e8fb190e (patch)
treebb6f776bf18e351d8439e4e92b5d45ae4a10fbce /src/mm-plugin.c
parent1c4f2320f1f50e22851bd477c88467e7436d2d33 (diff)
port-probe: detect XMMRPC ports
Diffstat (limited to 'src/mm-plugin.c')
-rw-r--r--src/mm-plugin.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
index 1e721e54..75dc02d7 100644
--- a/src/mm-plugin.c
+++ b/src/mm-plugin.c
@@ -94,6 +94,7 @@ struct _MMPluginPrivate {
gboolean qcdm_required;
gboolean qmi;
gboolean mbim;
+ gboolean xmmrpc;
gboolean icera_probe;
gboolean xmm_probe;
MMPortProbeAtCommand *custom_at_probe;
@@ -128,6 +129,7 @@ enum {
PROP_REQUIRED_QCDM,
PROP_ALLOWED_QMI,
PROP_ALLOWED_MBIM,
+ PROP_ALLOWED_XMMRPC,
PROP_ICERA_PROBE,
PROP_ALLOWED_ICERA,
PROP_FORBIDDEN_ICERA,
@@ -283,7 +285,8 @@ apply_pre_probing_filters (MMPlugin *self,
if (self->priv->drivers ||
self->priv->forbidden_drivers ||
!self->priv->qmi ||
- !self->priv->mbim) {
+ !self->priv->mbim ||
+ !self->priv->xmmrpc) {
static const gchar *virtual_drivers [] = { "virtual", NULL };
const gchar **drivers;
@@ -1256,6 +1259,10 @@ set_property (GObject *object,
/* Construct only */
self->priv->mbim = g_value_get_boolean (value);
break;
+ case PROP_ALLOWED_XMMRPC:
+ /* Construct only */
+ self->priv->xmmrpc = g_value_get_boolean (value);
+ break;
case PROP_ICERA_PROBE:
/* Construct only */
self->priv->icera_probe = g_value_get_boolean (value);
@@ -1369,6 +1376,9 @@ get_property (GObject *object,
case PROP_ALLOWED_MBIM:
g_value_set_boolean (value, self->priv->mbim);
break;
+ case PROP_ALLOWED_XMMRPC:
+ g_value_set_boolean (value, self->priv->xmmrpc);
+ break;
case PROP_ALLOWED_UDEV_TAGS:
g_value_set_boxed (value, self->priv->udev_tags);
break;
@@ -1620,6 +1630,14 @@ mm_plugin_class_init (MMPluginClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property
+ (object_class, PROP_ALLOWED_XMMRPC,
+ g_param_spec_boolean (MM_PLUGIN_ALLOWED_XMMRPC,
+ "Allowed XMMRPC",
+ "Whether XMMRPC ports are allowed in this plugin.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
g_object_class_install_property
(object_class, PROP_ICERA_PROBE,
g_param_spec_boolean (MM_PLUGIN_ICERA_PROBE,