diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-plugin-base.c | 17 | ||||
-rw-r--r-- | src/mm-plugin-base.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index 5820e280..eb5d23ed 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -72,6 +72,7 @@ typedef struct { /* Plugin-specific setups */ guint32 capabilities; const gchar **subsystems; + const gchar **drivers; const guint16 *vendor_ids; const guint16 *product_ids; const gchar **vendor_strings; @@ -86,6 +87,7 @@ enum { PROP_NAME, PROP_ALLOWED_CAPABILITIES, PROP_ALLOWED_SUBSYSTEMS, + PROP_ALLOWED_DRIVERS, PROP_ALLOWED_VENDOR_IDS, PROP_ALLOWED_PRODUCT_IDS, PROP_ALLOWED_VENDOR_STRINGS, @@ -1575,6 +1577,10 @@ set_property (GObject *object, guint prop_id, /* Construct only */ priv->subsystems = (const gchar **)g_value_get_pointer (value); break; + case PROP_ALLOWED_DRIVERS: + /* Construct only */ + priv->drivers = (const gchar **)g_value_get_pointer (value); + break; case PROP_ALLOWED_VENDOR_IDS: /* Construct only */ priv->vendor_ids = (const guint16 *)g_value_get_pointer (value); @@ -1629,6 +1635,9 @@ get_property (GObject *object, guint prop_id, case PROP_ALLOWED_SUBSYSTEMS: g_value_set_pointer (value, (gpointer)priv->subsystems); break; + case PROP_ALLOWED_DRIVERS: + g_value_set_pointer (value, (gpointer)priv->drivers); + break; case PROP_ALLOWED_VENDOR_IDS: g_value_set_pointer (value, (gpointer)priv->vendor_ids); break; @@ -1712,6 +1721,14 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property + (object_class, PROP_ALLOWED_DRIVERS, + g_param_spec_pointer (MM_PLUGIN_BASE_ALLOWED_DRIVERS, + "Allowed drivers", + "List of drivers this plugin can support, " + "should be an array of strings finished with 'NULL'", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (object_class, PROP_ALLOWED_VENDOR_IDS, g_param_spec_pointer (MM_PLUGIN_BASE_ALLOWED_VENDOR_IDS, "Allowed vendor IDs", diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h index 9e8a07f5..2b9e2f45 100644 --- a/src/mm-plugin-base.h +++ b/src/mm-plugin-base.h @@ -126,6 +126,7 @@ typedef struct { #define MM_PLUGIN_BASE_NAME "name" #define MM_PLUGIN_BASE_ALLOWED_CAPABILITIES "allowed-capabilities" #define MM_PLUGIN_BASE_ALLOWED_SUBSYSTEMS "allowed-subsystems" +#define MM_PLUGIN_BASE_ALLOWED_DRIVERS "allowed-drivers" #define MM_PLUGIN_BASE_ALLOWED_VENDOR_IDS "allowed-vendor-ids" #define MM_PLUGIN_BASE_ALLOWED_PRODUCT_IDS "allowed-product-ids" #define MM_PLUGIN_BASE_ALLOWED_VENDOR_STRINGS "allowed-vendor-strings" |