aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@gnu.org>2011-09-15 23:45:22 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:20 +0100
commit24ebb00ed2010ba3c724afd4d35f39bf02840b09 (patch)
treec88d07eefa1ce6ecb8fd9d404e016e63280890a3 /src
parent8f95a2d78d0f7d94597699095838d69b6f3b50d1 (diff)
plugin-base: new 'allowed-qcdm' property
The plugins can set this boolean property to specify whether they can handle QCDM ports, and therefore probing for them is needed.
Diffstat (limited to 'src')
-rw-r--r--src/mm-plugin-base.c17
-rw-r--r--src/mm-plugin-base.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index d42dc3ef..5820e280 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -76,6 +76,7 @@ typedef struct {
const guint16 *product_ids;
const gchar **vendor_strings;
const gchar **product_strings;
+ gboolean qcdm;
const MMPortProbeAtCommand *custom_init;
guint64 send_delay;
} MMPluginBasePrivate;
@@ -89,6 +90,7 @@ enum {
PROP_ALLOWED_PRODUCT_IDS,
PROP_ALLOWED_VENDOR_STRINGS,
PROP_ALLOWED_PRODUCT_STRINGS,
+ PROP_ALLOWED_QCDM,
PROP_CUSTOM_INIT,
PROP_SEND_DELAY,
PROP_SORT_LAST,
@@ -1589,6 +1591,10 @@ set_property (GObject *object, guint prop_id,
/* Construct only */
priv->product_strings = (const gchar **)g_value_get_pointer (value);
break;
+ case PROP_ALLOWED_QCDM:
+ /* Construct only */
+ priv->qcdm = g_value_get_boolean (value);
+ break;
case PROP_CUSTOM_INIT:
/* Construct only */
priv->custom_init = (const MMPortProbeAtCommand *)g_value_get_pointer (value);
@@ -1635,6 +1641,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_QCDM:
+ g_value_set_boolean (value, priv->qcdm);
+ break;
case PROP_CUSTOM_INIT:
g_value_set_pointer (value, (gpointer)priv->custom_init);
break;
@@ -1736,6 +1745,14 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass)
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",
+ "Whether QCDM ports are allowed in this plugin",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
(object_class, PROP_CUSTOM_INIT,
g_param_spec_pointer (MM_PLUGIN_BASE_CUSTOM_INIT,
"Custom initialization",
diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h
index 66f288f0..9e8a07f5 100644
--- a/src/mm-plugin-base.h
+++ b/src/mm-plugin-base.h
@@ -130,6 +130,7 @@ typedef struct {
#define MM_PLUGIN_BASE_ALLOWED_PRODUCT_IDS "allowed-product-ids"
#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_QCDM "allowed-qcdm"
#define MM_PLUGIN_BASE_CUSTOM_INIT "custom-init"
#define MM_PLUGIN_BASE_SEND_DELAY "send-delay"
#define MM_PLUGIN_BASE_SORT_LAST "sort-last"