diff options
-rw-r--r-- | src/mm-plugin-base.c | 19 | ||||
-rw-r--r-- | src/mm-plugin-base.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index efea29c5..4cc4bf39 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -67,6 +67,7 @@ typedef struct { const gchar **vendor_strings; const gchar **product_strings; const gchar **udev_tags; + gboolean at; gboolean qcdm; const MMPortProbeAtCommand *custom_init; guint64 send_delay; @@ -82,6 +83,7 @@ enum { PROP_ALLOWED_VENDOR_STRINGS, PROP_ALLOWED_PRODUCT_STRINGS, PROP_ALLOWED_UDEV_TAGS, + PROP_ALLOWED_AT, PROP_ALLOWED_QCDM, PROP_CUSTOM_INIT, PROP_SEND_DELAY, @@ -635,6 +637,8 @@ supports_port (MMPlugin *plugin, /* Build flags depending on what probing needed */ probe_run_flags = 0; + if (priv->at) + probe_run_flags |= MM_PORT_PROBE_AT; if (need_vendor_probing) probe_run_flags |= MM_PORT_PROBE_AT_VENDOR; if (need_product_probing) @@ -788,6 +792,10 @@ set_property (GObject *object, guint prop_id, /* Construct only */ priv->udev_tags = (const gchar **)g_value_get_pointer (value); break; + case PROP_ALLOWED_AT: + /* Construct only */ + priv->at = g_value_get_boolean (value); + break; case PROP_ALLOWED_QCDM: /* Construct only */ priv->qcdm = g_value_get_boolean (value); @@ -838,6 +846,9 @@ get_property (GObject *object, guint prop_id, case PROP_ALLOWED_PRODUCT_STRINGS: g_value_set_pointer (value, (gpointer)priv->product_strings); break; + case PROP_ALLOWED_AT: + g_value_set_boolean (value, priv->at); + break; case PROP_ALLOWED_QCDM: g_value_set_boolean (value, priv->qcdm); break; @@ -951,6 +962,14 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property + (object_class, PROP_ALLOWED_AT, + g_param_spec_boolean (MM_PLUGIN_BASE_ALLOWED_AT, + "Allowed AT", + "Whether AT ports are allowed in this plugin", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (object_class, PROP_ALLOWED_QCDM, g_param_spec_boolean (MM_PLUGIN_BASE_ALLOWED_QCDM, "Allowed QCDM", diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h index 54a2a360..a9f4b885 100644 --- a/src/mm-plugin-base.h +++ b/src/mm-plugin-base.h @@ -42,6 +42,7 @@ #define MM_PLUGIN_BASE_ALLOWED_VENDOR_STRINGS "allowed-vendor-strings" #define MM_PLUGIN_BASE_ALLOWED_PRODUCT_STRINGS "allowed-product-strings" #define MM_PLUGIN_BASE_ALLOWED_UDEV_TAGS "allowed-udev-tags" +#define MM_PLUGIN_BASE_ALLOWED_AT "allowed-at" #define MM_PLUGIN_BASE_ALLOWED_QCDM "allowed-qcdm" #define MM_PLUGIN_BASE_CUSTOM_INIT "custom-init" #define MM_PLUGIN_BASE_SEND_DELAY "send-delay" |