aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-11-23 11:11:13 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:24 +0100
commit4ad9374159551463e976c825a50685e27140b31f (patch)
treeea612e42058e2c5f3054dfb3486e27d83166692b /src
parentfa01e7a6d31c77192d631ed656bb495a1e5b9d6a (diff)
plugin-base: explicitly request to probe for AT capabilities
Diffstat (limited to 'src')
-rw-r--r--src/mm-plugin-base.c19
-rw-r--r--src/mm-plugin-base.h1
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"