diff options
Diffstat (limited to 'src/mm-plugin-base.c')
-rw-r--r-- | src/mm-plugin-base.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index 4393e6c4..f8dab8bf 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -28,6 +28,7 @@ #include <gudev/gudev.h> #include "mm-plugin-base.h" +#include "mm-port-probe.h" #include "mm-at-serial-port.h" #include "mm-qcdm-serial-port.h" #include "mm-serial-parsers.h" @@ -72,6 +73,7 @@ typedef struct { const gchar **subsystems; const guint16 *vendor_ids; const guint16 *product_ids; + const MMPortProbeAtCommand *custom_init; } MMPluginBasePrivate; enum { @@ -80,6 +82,7 @@ enum { PROP_ALLOWED_SUBSYSTEMS, PROP_ALLOWED_VENDOR_IDS, PROP_ALLOWED_PRODUCT_IDS, + PROP_CUSTOM_INIT, PROP_SORT_LAST, LAST_PROP }; @@ -1564,6 +1567,10 @@ set_property (GObject *object, guint prop_id, /* Construct only */ priv->product_ids = (const guint16 *)g_value_get_pointer (value); break; + case PROP_CUSTOM_INIT: + /* Construct only */ + priv->custom_init = (const MMPortProbeAtCommand *)g_value_get_pointer (value); + break; case PROP_SORT_LAST: /* Construct only */ priv->sort_last = g_value_get_boolean (value); @@ -1593,6 +1600,9 @@ get_property (GObject *object, guint prop_id, case PROP_ALLOWED_PRODUCT_IDS: g_value_set_pointer (value, (gpointer)priv->product_ids); break; + case PROP_CUSTOM_INIT: + g_value_set_pointer (value, (gpointer)priv->custom_init); + break; case PROP_SORT_LAST: g_value_set_boolean (value, priv->sort_last); break; @@ -1663,6 +1673,15 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass) 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", + "List of custom initializations this plugin needs, " + "should be an array of MMPortProbeAtCommand structs " + "finished with 'NULL'", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (object_class, PROP_SORT_LAST, g_param_spec_boolean (MM_PLUGIN_BASE_SORT_LAST, "Sort Last", |