diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-24 13:28:22 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-24 13:34:51 +0200 |
commit | 0436b3e45753a166fea18d6c1463aef5a38fd1ee (patch) | |
tree | 5317581a8f5e85be45ba9cec8cd03be90c717fb8 | |
parent | a595912d2d70fce7a8370b194c230331fee605a7 (diff) |
api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').
$ sudo mmcli -m 0 | grep drivers
| drivers: 'qcserial, qmi_wwan'
84 files changed, 268 insertions, 214 deletions
@@ -109,9 +109,6 @@ example to update the signal quality value or check registration status. ** serial-parsers: convert the v1 parser to a GObject. - ** Modem iface: Provide a list of drivers instead of just one, so that we list - all drivers of all ports grabbed. - ** MMBroadbandBearer: include additional step for authentication, with retries. diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index 3be15da2..7fff7d30 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -220,6 +220,7 @@ print_bearer_short_info (MMBearer *bearer) static void print_modem_info (void) { + gchar *drivers_string; gchar *prefixed_revision; gchar *capabilities_string; gchar *access_technologies_string; @@ -272,6 +273,15 @@ print_modem_info (void) } else own_numbers_string = NULL; + if (mm_modem_get_drivers (ctx->modem)) { + drivers_string = g_strjoinv (", ", (gchar **)mm_modem_get_drivers (ctx->modem)); + if (!drivers_string[0]) { + g_free (drivers_string); + drivers_string = NULL; + } + } else + drivers_string = NULL; + /* Rework possible multiline strings */ prefixed_revision = mmcli_prefix_newlines (" | ", mm_modem_get_revision (ctx->modem)); @@ -298,10 +308,10 @@ print_modem_info (void) /* System related stuff */ g_print (" -------------------------\n" " System | device: '%s'\n" - " | driver: '%s'\n" + " | drivers: '%s'\n" " | plugin: '%s'\n", VALIDATE_UNKNOWN (mm_modem_get_device (ctx->modem)), - VALIDATE_UNKNOWN (mm_modem_get_driver (ctx->modem)), + VALIDATE_UNKNOWN (drivers_string), VALIDATE_UNKNOWN (mm_modem_get_plugin (ctx->modem))); /* Numbers related stuff */ @@ -410,6 +420,7 @@ print_modem_info (void) g_free (supported_modes_string); g_free (unlock_retries_string); g_free (own_numbers_string); + g_free (drivers_string); } static void diff --git a/introspection/org.freedesktop.ModemManager1.Modem.xml b/introspection/org.freedesktop.ModemManager1.Modem.xml index 5869db7f..8ff6e49b 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.xml @@ -280,12 +280,12 @@ <property name="Device" type="s" access="read" /> <!-- - Driver: + Drivers: - The Operating System device driver handling communication with the modem + The Operating System device drivers handling communication with the modem hardware. --> - <property name="Driver" type="s" access="read" /> + <property name="Drivers" type="as" access="read" /> <!-- Plugin: diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c index db7d7299..6bbaf00f 100644 --- a/libmm-glib/mm-modem.c +++ b/libmm-glib/mm-modem.c @@ -382,41 +382,39 @@ mm_modem_dup_device (MMModem *self) } /** - * mm_modem_get_driver: + * mm_modem_get_drivers: * @self: A #MMModem. * - * Gets the Operating System device driver handling communication with the modem + * Gets the Operating System device drivers handling communication with the modem * hardware. * * <warning>It is only safe to use this function on the thread where @self was constructed. Use mm_modem_dup_driver() if on another thread.</warning> * - * Returns: (transfer none): The driver, or %NULL if none available. + * Returns: (transfer none): The drivers, or %NULL if none available. */ -const gchar * -mm_modem_get_driver (MMModem *self) +const gchar * const * +mm_modem_get_drivers (MMModem *self) { g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL); - RETURN_NON_EMPTY_CONSTANT_STRING ( - mm_gdbus_modem_get_driver (self)); + return mm_gdbus_modem_get_drivers (self); } /** - * mm_modem_dup_driver: + * mm_modem_dup_drivers: * @self: A #MMModem. * * Gets a copy of the Operating System device driver handling communication with the modem * hardware. * - * Returns: (transfer full): The driver, or %NULL if none available. The returned value should be freed with g_free(). + * Returns: (transfer full): The drivers, or %NULL if none available. The returned value should be freed with g_strfreev(). */ -gchar * -mm_modem_dup_driver (MMModem *self) +gchar ** +mm_modem_dup_drivers (MMModem *self) { g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL); - RETURN_NON_EMPTY_STRING ( - mm_gdbus_modem_dup_driver (self)); + return mm_gdbus_modem_dup_drivers (self); } /** diff --git a/libmm-glib/mm-modem.h b/libmm-glib/mm-modem.h index 56b4ac91..d9cfd748 100644 --- a/libmm-glib/mm-modem.h +++ b/libmm-glib/mm-modem.h @@ -55,8 +55,8 @@ const gchar *mm_modem_get_device_identifier (MMModem *self); gchar *mm_modem_dup_device_identifier (MMModem *self); const gchar *mm_modem_get_device (MMModem *self); gchar *mm_modem_dup_device (MMModem *self); -const gchar *mm_modem_get_driver (MMModem *self); -gchar *mm_modem_dup_driver (MMModem *self); +const gchar * const *mm_modem_get_drivers (MMModem *self); +gchar **mm_modem_dup_drivers (MMModem *self); const gchar *mm_modem_get_plugin (MMModem *self); gchar *mm_modem_dup_plugin (MMModem *self); const gchar *mm_modem_get_equipment_identifier (MMModem *self); diff --git a/plugins/anydata/mm-broadband-modem-anydata.c b/plugins/anydata/mm-broadband-modem-anydata.c index cb08138e..c8ed3175 100644 --- a/plugins/anydata/mm-broadband-modem-anydata.c +++ b/plugins/anydata/mm-broadband-modem-anydata.c @@ -343,14 +343,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemAnydata * mm_broadband_modem_anydata_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_ANYDATA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/anydata/mm-broadband-modem-anydata.h b/plugins/anydata/mm-broadband-modem-anydata.h index 9744ec62..94145623 100644 --- a/plugins/anydata/mm-broadband-modem-anydata.h +++ b/plugins/anydata/mm-broadband-modem-anydata.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemAnydataClass{ GType mm_broadband_modem_anydata_get_type (void); MMBroadbandModemAnydata *mm_broadband_modem_anydata_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/anydata/mm-plugin-anydata.c b/plugins/anydata/mm-plugin-anydata.c index acc3aa7c..3229ddc6 100644 --- a/plugins/anydata/mm-plugin-anydata.c +++ b/plugins/anydata/mm-plugin-anydata.c @@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_anydata_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c index 176fd7c8..3ec339b4 100644 --- a/plugins/cinterion/mm-broadband-modem-cinterion.c +++ b/plugins/cinterion/mm-broadband-modem-cinterion.c @@ -1147,14 +1147,14 @@ setup_flow_control (MMIfaceModem *self, MMBroadbandModemCinterion * mm_broadband_modem_cinterion_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_CINTERION, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.h b/plugins/cinterion/mm-broadband-modem-cinterion.h index 53e95b4f..47f0dcb4 100644 --- a/plugins/cinterion/mm-broadband-modem-cinterion.h +++ b/plugins/cinterion/mm-broadband-modem-cinterion.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemCinterionClass{ GType mm_broadband_modem_cinterion_get_type (void); MMBroadbandModemCinterion *mm_broadband_modem_cinterion_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/cinterion/mm-plugin-cinterion.c b/plugins/cinterion/mm-plugin-cinterion.c index a656bee4..22945d6c 100644 --- a/plugins/cinterion/mm-plugin-cinterion.c +++ b/plugins/cinterion/mm-plugin-cinterion.c @@ -38,14 +38,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_cinterion_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/generic/mm-plugin-generic.c b/plugins/generic/mm-plugin-generic.c index 66babea5..f75e1a14 100644 --- a/plugins/generic/mm-plugin-generic.c +++ b/plugins/generic/mm-plugin-generic.c @@ -42,14 +42,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/gobi/mm-broadband-modem-gobi.c b/plugins/gobi/mm-broadband-modem-gobi.c index 6c712629..27aded25 100644 --- a/plugins/gobi/mm-broadband-modem-gobi.c +++ b/plugins/gobi/mm-broadband-modem-gobi.c @@ -89,14 +89,14 @@ load_access_technologies (MMIfaceModem *self, MMBroadbandModemGobi * mm_broadband_modem_gobi_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_GOBI, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/gobi/mm-broadband-modem-gobi.h b/plugins/gobi/mm-broadband-modem-gobi.h index 844fd80f..4164cfe6 100644 --- a/plugins/gobi/mm-broadband-modem-gobi.h +++ b/plugins/gobi/mm-broadband-modem-gobi.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemGobiClass{ GType mm_broadband_modem_gobi_get_type (void); MMBroadbandModemGobi *mm_broadband_modem_gobi_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/gobi/mm-plugin-gobi.c b/plugins/gobi/mm-plugin-gobi.c index 377069e0..fdfb48ec 100644 --- a/plugins/gobi/mm-plugin-gobi.c +++ b/plugins/gobi/mm-plugin-gobi.c @@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_gobi_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index ffac200f..e9fbc7f9 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -1524,14 +1524,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemHuawei * mm_broadband_modem_huawei_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_HUAWEI, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/huawei/mm-broadband-modem-huawei.h b/plugins/huawei/mm-broadband-modem-huawei.h index e459b929..06874bcf 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.h +++ b/plugins/huawei/mm-broadband-modem-huawei.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemHuaweiClass{ GType mm_broadband_modem_huawei_get_type (void); MMBroadbandModemHuawei *mm_broadband_modem_huawei_new (const gchar *device, - const gchar *driver, + const gchar **driver, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/huawei/mm-plugin-huawei.c b/plugins/huawei/mm-plugin-huawei.c index 05e25965..e66d287b 100644 --- a/plugins/huawei/mm-plugin-huawei.c +++ b/plugins/huawei/mm-plugin-huawei.c @@ -415,7 +415,7 @@ propagate_port_mode_results (GList *probes) static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, @@ -424,7 +424,7 @@ create_modem (MMPlugin *self, propagate_port_mode_results (probes); return MM_BASE_MODEM (mm_broadband_modem_huawei_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c index 9d390d30..738eca5a 100644 --- a/plugins/icera/mm-broadband-modem-icera.c +++ b/plugins/icera/mm-broadband-modem-icera.c @@ -1546,14 +1546,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemIcera * mm_broadband_modem_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_ICERA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/icera/mm-broadband-modem-icera.h b/plugins/icera/mm-broadband-modem-icera.h index 5c89cdbe..7826c661 100644 --- a/plugins/icera/mm-broadband-modem-icera.h +++ b/plugins/icera/mm-broadband-modem-icera.h @@ -45,7 +45,7 @@ struct _MMBroadbandModemIceraClass{ GType mm_broadband_modem_icera_get_type (void); MMBroadbandModemIcera *mm_broadband_modem_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/iridium/mm-broadband-modem-iridium.c b/plugins/iridium/mm-broadband-modem-iridium.c index 5d109cf6..020bcb41 100644 --- a/plugins/iridium/mm-broadband-modem-iridium.c +++ b/plugins/iridium/mm-broadband-modem-iridium.c @@ -395,14 +395,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemIridium * mm_broadband_modem_iridium_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_IRIDIUM, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/iridium/mm-broadband-modem-iridium.h b/plugins/iridium/mm-broadband-modem-iridium.h index 941f82f0..96ca0dd1 100644 --- a/plugins/iridium/mm-broadband-modem-iridium.h +++ b/plugins/iridium/mm-broadband-modem-iridium.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemIridiumClass{ GType mm_broadband_modem_iridium_get_type (void); MMBroadbandModemIridium *mm_broadband_modem_iridium_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/iridium/mm-plugin-iridium.c b/plugins/iridium/mm-plugin-iridium.c index 229803cb..bbdec81f 100644 --- a/plugins/iridium/mm-plugin-iridium.c +++ b/plugins/iridium/mm-plugin-iridium.c @@ -38,14 +38,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_iridium_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/linktop/mm-broadband-modem-linktop.c b/plugins/linktop/mm-broadband-modem-linktop.c index 2c6aef57..74793b22 100644 --- a/plugins/linktop/mm-broadband-modem-linktop.c +++ b/plugins/linktop/mm-broadband-modem-linktop.c @@ -204,14 +204,14 @@ set_allowed_modes (MMIfaceModem *self, MMBroadbandModemLinktop * mm_broadband_modem_linktop_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_LINKTOP, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/linktop/mm-broadband-modem-linktop.h b/plugins/linktop/mm-broadband-modem-linktop.h index dbc8a10d..385a20b8 100644 --- a/plugins/linktop/mm-broadband-modem-linktop.h +++ b/plugins/linktop/mm-broadband-modem-linktop.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemLinktopClass{ GType mm_broadband_modem_linktop_get_type (void); MMBroadbandModemLinktop *mm_broadband_modem_linktop_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/linktop/mm-plugin-linktop.c b/plugins/linktop/mm-plugin-linktop.c index 38e127ce..61bbb0e4 100644 --- a/plugins/linktop/mm-plugin-linktop.c +++ b/plugins/linktop/mm-plugin-linktop.c @@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_linktop_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/longcheer/mm-broadband-modem-longcheer.c b/plugins/longcheer/mm-broadband-modem-longcheer.c index d32c36a0..4a492e90 100644 --- a/plugins/longcheer/mm-broadband-modem-longcheer.c +++ b/plugins/longcheer/mm-broadband-modem-longcheer.c @@ -312,14 +312,14 @@ load_unlock_retries (MMIfaceModem *self, MMBroadbandModemLongcheer * mm_broadband_modem_longcheer_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_LONGCHEER, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/longcheer/mm-broadband-modem-longcheer.h b/plugins/longcheer/mm-broadband-modem-longcheer.h index 35d45f85..710abeef 100644 --- a/plugins/longcheer/mm-broadband-modem-longcheer.h +++ b/plugins/longcheer/mm-broadband-modem-longcheer.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemLongcheerClass{ GType mm_broadband_modem_longcheer_get_type (void); MMBroadbandModemLongcheer *mm_broadband_modem_longcheer_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/longcheer/mm-plugin-longcheer.c b/plugins/longcheer/mm-plugin-longcheer.c index 08a9eb46..ddfb83f5 100644 --- a/plugins/longcheer/mm-plugin-longcheer.c +++ b/plugins/longcheer/mm-plugin-longcheer.c @@ -182,14 +182,14 @@ longcheer_custom_init (MMPortProbe *probe, static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_longcheer_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/mbm/mm-broadband-modem-mbm.c b/plugins/mbm/mm-broadband-modem-mbm.c index 298a24fe..afa2098c 100644 --- a/plugins/mbm/mm-broadband-modem-mbm.c +++ b/plugins/mbm/mm-broadband-modem-mbm.c @@ -1032,14 +1032,14 @@ setup_ports (MMBroadbandModem *_self) MMBroadbandModemMbm * mm_broadband_modem_mbm_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_MBM, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/mbm/mm-broadband-modem-mbm.h b/plugins/mbm/mm-broadband-modem-mbm.h index 81e6b842..21eeaef5 100644 --- a/plugins/mbm/mm-broadband-modem-mbm.h +++ b/plugins/mbm/mm-broadband-modem-mbm.h @@ -50,7 +50,7 @@ struct _MMBroadbandModemMbmClass{ GType mm_broadband_modem_mbm_get_type (void); MMBroadbandModemMbm *mm_broadband_modem_mbm_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/mbm/mm-plugin-mbm.c b/plugins/mbm/mm-plugin-mbm.c index f3a040ac..09ba5ccd 100644 --- a/plugins/mbm/mm-plugin-mbm.c +++ b/plugins/mbm/mm-plugin-mbm.c @@ -36,14 +36,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_mbm_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/motorola/mm-broadband-modem-motorola.c b/plugins/motorola/mm-broadband-modem-motorola.c index 78aebc1b..ba784b9f 100644 --- a/plugins/motorola/mm-broadband-modem-motorola.c +++ b/plugins/motorola/mm-broadband-modem-motorola.c @@ -39,14 +39,14 @@ G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMotorola, mm_broadband_modem_motorola, M MMBroadbandModemMotorola * mm_broadband_modem_motorola_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_MOTOROLA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/motorola/mm-broadband-modem-motorola.h b/plugins/motorola/mm-broadband-modem-motorola.h index fb8d3249..f57e5b3d 100644 --- a/plugins/motorola/mm-broadband-modem-motorola.h +++ b/plugins/motorola/mm-broadband-modem-motorola.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemMotorolaClass{ GType mm_broadband_modem_motorola_get_type (void); MMBroadbandModemMotorola *mm_broadband_modem_motorola_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/motorola/mm-plugin-motorola.c b/plugins/motorola/mm-plugin-motorola.c index 176bc0a9..203320f6 100644 --- a/plugins/motorola/mm-plugin-motorola.c +++ b/plugins/motorola/mm-plugin-motorola.c @@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_motorola_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/nokia/mm-broadband-modem-nokia.c b/plugins/nokia/mm-broadband-modem-nokia.c index acfc5305..66baf925 100644 --- a/plugins/nokia/mm-broadband-modem-nokia.c +++ b/plugins/nokia/mm-broadband-modem-nokia.c @@ -153,14 +153,14 @@ modem_init (MMIfaceModem *self, MMBroadbandModemNokia * mm_broadband_modem_nokia_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_NOKIA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/nokia/mm-broadband-modem-nokia.h b/plugins/nokia/mm-broadband-modem-nokia.h index 9583d5ea..d00a5bcb 100644 --- a/plugins/nokia/mm-broadband-modem-nokia.h +++ b/plugins/nokia/mm-broadband-modem-nokia.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemNokiaClass{ GType mm_broadband_modem_nokia_get_type (void); MMBroadbandModemNokia *mm_broadband_modem_nokia_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/nokia/mm-plugin-nokia-icera.c b/plugins/nokia/mm-plugin-nokia-icera.c index fc16f5f5..b85e7d5f 100644 --- a/plugins/nokia/mm-plugin-nokia-icera.c +++ b/plugins/nokia/mm-plugin-nokia-icera.c @@ -33,14 +33,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_icera_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/nokia/mm-plugin-nokia.c b/plugins/nokia/mm-plugin-nokia.c index 74b953d8..e65eca67 100644 --- a/plugins/nokia/mm-plugin-nokia.c +++ b/plugins/nokia/mm-plugin-nokia.c @@ -44,14 +44,14 @@ static const MMPortProbeAtCommand custom_at_probe[] = { static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_nokia_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/novatel/mm-broadband-modem-novatel-lte.c b/plugins/novatel/mm-broadband-modem-novatel-lte.c index 1ed68b1a..71544ea4 100644 --- a/plugins/novatel/mm-broadband-modem-novatel-lte.c +++ b/plugins/novatel/mm-broadband-modem-novatel-lte.c @@ -336,14 +336,14 @@ load_access_technologies (MMIfaceModem *self, MMBroadbandModemNovatelLte * mm_broadband_modem_novatel_lte_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL_LTE, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/novatel/mm-broadband-modem-novatel-lte.h b/plugins/novatel/mm-broadband-modem-novatel-lte.h index 8e31fc5d..ea49d90c 100644 --- a/plugins/novatel/mm-broadband-modem-novatel-lte.h +++ b/plugins/novatel/mm-broadband-modem-novatel-lte.h @@ -42,7 +42,7 @@ struct _MMBroadbandModemNovatelLteClass{ GType mm_broadband_modem_novatel_lte_get_type (void); MMBroadbandModemNovatelLte *mm_broadband_modem_novatel_lte_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/novatel/mm-broadband-modem-novatel.c b/plugins/novatel/mm-broadband-modem-novatel.c index a45bfbc8..d18a39d8 100644 --- a/plugins/novatel/mm-broadband-modem-novatel.c +++ b/plugins/novatel/mm-broadband-modem-novatel.c @@ -742,14 +742,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemNovatel * mm_broadband_modem_novatel_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/novatel/mm-broadband-modem-novatel.h b/plugins/novatel/mm-broadband-modem-novatel.h index 7d4a7602..0dc860c8 100644 --- a/plugins/novatel/mm-broadband-modem-novatel.h +++ b/plugins/novatel/mm-broadband-modem-novatel.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemNovatelClass{ GType mm_broadband_modem_novatel_get_type (void); MMBroadbandModemNovatel *mm_broadband_modem_novatel_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/novatel/mm-plugin-novatel-lte.c b/plugins/novatel/mm-plugin-novatel-lte.c index 296a2033..e5fd91d9 100644 --- a/plugins/novatel/mm-plugin-novatel-lte.c +++ b/plugins/novatel/mm-plugin-novatel-lte.c @@ -36,14 +36,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_novatel_lte_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/novatel/mm-plugin-novatel.c b/plugins/novatel/mm-plugin-novatel.c index 25eb6e46..059ca7e8 100644 --- a/plugins/novatel/mm-plugin-novatel.c +++ b/plugins/novatel/mm-plugin-novatel.c @@ -37,14 +37,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/option/mm-broadband-modem-hso.c b/plugins/option/mm-broadband-modem-hso.c index c3f8d1e4..939bd8eb 100644 --- a/plugins/option/mm-broadband-modem-hso.c +++ b/plugins/option/mm-broadband-modem-hso.c @@ -675,14 +675,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemHso * mm_broadband_modem_hso_new (const gchar *device, - const gchar *driver, - const gchar *plugin, - guint16 vendor_id, - guint16 product_id) + const gchar **drivers, + const gchar *plugin, + guint16 vendor_id, + guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_HSO, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/option/mm-broadband-modem-hso.h b/plugins/option/mm-broadband-modem-hso.h index fc244c49..b918719c 100644 --- a/plugins/option/mm-broadband-modem-hso.h +++ b/plugins/option/mm-broadband-modem-hso.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemHsoClass{ GType mm_broadband_modem_hso_get_type (void); MMBroadbandModemHso *mm_broadband_modem_hso_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/option/mm-broadband-modem-option.c b/plugins/option/mm-broadband-modem-option.c index cda5ccc9..f35108e5 100644 --- a/plugins/option/mm-broadband-modem-option.c +++ b/plugins/option/mm-broadband-modem-option.c @@ -1031,14 +1031,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemOption * mm_broadband_modem_option_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_OPTION, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/option/mm-broadband-modem-option.h b/plugins/option/mm-broadband-modem-option.h index 83f679b7..faf0595e 100644 --- a/plugins/option/mm-broadband-modem-option.h +++ b/plugins/option/mm-broadband-modem-option.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemOptionClass{ GType mm_broadband_modem_option_get_type (void); MMBroadbandModemOption *mm_broadband_modem_option_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/option/mm-plugin-hso.c b/plugins/option/mm-plugin-hso.c index 9d8cdca1..7e1a8ec2 100644 --- a/plugins/option/mm-plugin-hso.c +++ b/plugins/option/mm-plugin-hso.c @@ -35,14 +35,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_hso_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/option/mm-plugin-option.c b/plugins/option/mm-plugin-option.c index 02394297..7579f628 100644 --- a/plugins/option/mm-plugin-option.c +++ b/plugins/option/mm-plugin-option.c @@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_option_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/pantech/mm-plugin-pantech.c b/plugins/pantech/mm-plugin-pantech.c index a2ddc03e..199afb68 100644 --- a/plugins/pantech/mm-plugin-pantech.c +++ b/plugins/pantech/mm-plugin-pantech.c @@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/samsung/mm-broadband-modem-samsung.c b/plugins/samsung/mm-broadband-modem-samsung.c index 724fa591..78de3368 100644 --- a/plugins/samsung/mm-broadband-modem-samsung.c +++ b/plugins/samsung/mm-broadband-modem-samsung.c @@ -63,14 +63,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemSamsung * mm_broadband_modem_samsung_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_SAMSUNG, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/samsung/mm-broadband-modem-samsung.h b/plugins/samsung/mm-broadband-modem-samsung.h index 42a64b23..7bebf54d 100644 --- a/plugins/samsung/mm-broadband-modem-samsung.h +++ b/plugins/samsung/mm-broadband-modem-samsung.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemSamsungClass{ GType mm_broadband_modem_samsung_get_type (void); MMBroadbandModemSamsung *mm_broadband_modem_samsung_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/samsung/mm-plugin-samsung.c b/plugins/samsung/mm-plugin-samsung.c index 43f7220e..634c625d 100644 --- a/plugins/samsung/mm-plugin-samsung.c +++ b/plugins/samsung/mm-plugin-samsung.c @@ -37,14 +37,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_samsung_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/sierra/mm-broadband-modem-sierra-icera.c b/plugins/sierra/mm-broadband-modem-sierra-icera.c index fb8d9ba1..c7d99045 100644 --- a/plugins/sierra/mm-broadband-modem-sierra-icera.c +++ b/plugins/sierra/mm-broadband-modem-sierra-icera.c @@ -51,14 +51,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemSierraIcera * mm_broadband_modem_sierra_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA_ICERA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/sierra/mm-broadband-modem-sierra-icera.h b/plugins/sierra/mm-broadband-modem-sierra-icera.h index 5c9a1206..66a4dfc9 100644 --- a/plugins/sierra/mm-broadband-modem-sierra-icera.h +++ b/plugins/sierra/mm-broadband-modem-sierra-icera.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemSierraIceraClass { GType mm_broadband_modem_sierra_icera_get_type (void); MMBroadbandModemSierraIcera *mm_broadband_modem_sierra_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c index 1622fa73..69f8293a 100644 --- a/plugins/sierra/mm-broadband-modem-sierra.c +++ b/plugins/sierra/mm-broadband-modem-sierra.c @@ -843,14 +843,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemSierra * mm_broadband_modem_sierra_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/sierra/mm-broadband-modem-sierra.h b/plugins/sierra/mm-broadband-modem-sierra.h index 12612f0c..023dd6d5 100644 --- a/plugins/sierra/mm-broadband-modem-sierra.h +++ b/plugins/sierra/mm-broadband-modem-sierra.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemSierraClass{ GType mm_broadband_modem_sierra_get_type (void); MMBroadbandModemSierra *mm_broadband_modem_sierra_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/sierra/mm-common-sierra.c b/plugins/sierra/mm-common-sierra.c index d5ea7ca2..fb71e049 100644 --- a/plugins/sierra/mm-common-sierra.c +++ b/plugins/sierra/mm-common-sierra.c @@ -47,6 +47,8 @@ full_functionality_status_ready (MMBaseModem *self, GSimpleAsyncResult *simple) { GError *error = NULL; + guint i; + const gchar **drivers; if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) { g_simple_async_result_take_error (simple, error); @@ -59,11 +61,14 @@ full_functionality_status_ready (MMBaseModem *self, * away but need some time to finish initialization. Anything driven by * 'sierra' is new enough to need no delay. */ - if (g_str_equal (mm_base_modem_get_driver (MM_BASE_MODEM (self)), "sierra")) { - g_simple_async_result_set_op_res_gboolean (simple, TRUE); - g_simple_async_result_complete (simple); - g_object_unref (simple); - return; + drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self)); + for (i = 0; drivers[i]; i++) { + if (g_str_equal (drivers[i], "sierra")) { + g_simple_async_result_set_op_res_gboolean (simple, TRUE); + g_simple_async_result_complete (simple); + g_object_unref (simple); + return; + } } /* The modem object will be valid in the callback as 'result' keeps a diff --git a/plugins/sierra/mm-plugin-sierra.c b/plugins/sierra/mm-plugin-sierra.c index 99aebf80..dc8fce54 100644 --- a/plugins/sierra/mm-plugin-sierra.c +++ b/plugins/sierra/mm-plugin-sierra.c @@ -157,7 +157,7 @@ sierra_custom_init (MMPortProbe *probe, static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, @@ -173,13 +173,13 @@ create_modem (MMPlugin *self, if (is_icera) return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/simtech/mm-broadband-modem-simtech.c b/plugins/simtech/mm-broadband-modem-simtech.c index 8f0b7706..5d41c80f 100644 --- a/plugins/simtech/mm-broadband-modem-simtech.c +++ b/plugins/simtech/mm-broadband-modem-simtech.c @@ -791,14 +791,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemSimtech * mm_broadband_modem_simtech_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_SIMTECH, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/simtech/mm-broadband-modem-simtech.h b/plugins/simtech/mm-broadband-modem-simtech.h index f73c3525..6ee32b1b 100644 --- a/plugins/simtech/mm-broadband-modem-simtech.h +++ b/plugins/simtech/mm-broadband-modem-simtech.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemSimtechClass{ GType mm_broadband_modem_simtech_get_type (void); MMBroadbandModemSimtech *mm_broadband_modem_simtech_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/simtech/mm-plugin-simtech.c b/plugins/simtech/mm-plugin-simtech.c index 19774a5a..3b4f69f7 100644 --- a/plugins/simtech/mm-plugin-simtech.c +++ b/plugins/simtech/mm-plugin-simtech.c @@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_simtech_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.c b/plugins/wavecom/mm-broadband-modem-wavecom.c index 9be84c09..e6572df3 100644 --- a/plugins/wavecom/mm-broadband-modem-wavecom.c +++ b/plugins/wavecom/mm-broadband-modem-wavecom.c @@ -1178,14 +1178,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemWavecom * mm_broadband_modem_wavecom_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_WAVECOM, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.h b/plugins/wavecom/mm-broadband-modem-wavecom.h index 3bec594d..89bdbde8 100644 --- a/plugins/wavecom/mm-broadband-modem-wavecom.h +++ b/plugins/wavecom/mm-broadband-modem-wavecom.h @@ -42,7 +42,7 @@ struct _MMBroadbandModemWavecomClass{ GType mm_broadband_modem_wavecom_get_type (void); MMBroadbandModemWavecom *mm_broadband_modem_wavecom_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/wavecom/mm-plugin-wavecom.c b/plugins/wavecom/mm-plugin-wavecom.c index 94fc43ec..82eec9bc 100644 --- a/plugins/wavecom/mm-plugin-wavecom.c +++ b/plugins/wavecom/mm-plugin-wavecom.c @@ -40,14 +40,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_wavecom_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/x22x/mm-broadband-modem-x22x.c b/plugins/x22x/mm-broadband-modem-x22x.c index 3101c7e3..b7b16891 100644 --- a/plugins/x22x/mm-broadband-modem-x22x.c +++ b/plugins/x22x/mm-broadband-modem-x22x.c @@ -239,14 +239,14 @@ load_access_technologies (MMIfaceModem *self, MMBroadbandModemX22x * mm_broadband_modem_x22x_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_X22X, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/x22x/mm-broadband-modem-x22x.h b/plugins/x22x/mm-broadband-modem-x22x.h index aeb9f32b..f61e301d 100644 --- a/plugins/x22x/mm-broadband-modem-x22x.h +++ b/plugins/x22x/mm-broadband-modem-x22x.h @@ -41,7 +41,7 @@ struct _MMBroadbandModemX22xClass{ GType mm_broadband_modem_x22x_get_type (void); MMBroadbandModemX22x *mm_broadband_modem_x22x_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/x22x/mm-plugin-x22x.c b/plugins/x22x/mm-plugin-x22x.c index 22977771..859fc4b4 100644 --- a/plugins/x22x/mm-plugin-x22x.c +++ b/plugins/x22x/mm-plugin-x22x.c @@ -181,14 +181,14 @@ x22x_custom_init (MMPortProbe *probe, static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, GError **error) { return MM_BASE_MODEM (mm_broadband_modem_x22x_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/plugins/zte/mm-broadband-modem-zte-icera.c b/plugins/zte/mm-broadband-modem-zte-icera.c index c27b73db..793e2018 100644 --- a/plugins/zte/mm-broadband-modem-zte-icera.c +++ b/plugins/zte/mm-broadband-modem-zte-icera.c @@ -168,14 +168,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemZteIcera * mm_broadband_modem_zte_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE_ICERA, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/zte/mm-broadband-modem-zte-icera.h b/plugins/zte/mm-broadband-modem-zte-icera.h index 8ecb4f21..00261437 100644 --- a/plugins/zte/mm-broadband-modem-zte-icera.h +++ b/plugins/zte/mm-broadband-modem-zte-icera.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemZteIceraClass{ GType mm_broadband_modem_zte_icera_get_type (void); MMBroadbandModemZteIcera *mm_broadband_modem_zte_icera_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/zte/mm-broadband-modem-zte.c b/plugins/zte/mm-broadband-modem-zte.c index 13c6c7b5..4a24f867 100644 --- a/plugins/zte/mm-broadband-modem-zte.c +++ b/plugins/zte/mm-broadband-modem-zte.c @@ -533,14 +533,14 @@ setup_ports (MMBroadbandModem *self) MMBroadbandModemZte * mm_broadband_modem_zte_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/plugins/zte/mm-broadband-modem-zte.h b/plugins/zte/mm-broadband-modem-zte.h index f41fdfcd..a61eead4 100644 --- a/plugins/zte/mm-broadband-modem-zte.h +++ b/plugins/zte/mm-broadband-modem-zte.h @@ -43,7 +43,7 @@ struct _MMBroadbandModemZteClass{ GType mm_broadband_modem_zte_get_type (void); MMBroadbandModemZte *mm_broadband_modem_zte_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index 0c331764..cf48f236 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -53,7 +53,7 @@ static const MMPortProbeAtCommand custom_at_probe[] = { static MMBaseModem * create_modem (MMPlugin *self, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, @@ -69,13 +69,13 @@ create_modem (MMPlugin *self, if (is_icera) return MM_BASE_MODEM (mm_broadband_modem_zte_icera_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); return MM_BASE_MODEM (mm_broadband_modem_zte_new (sysfs_path, - driver, + drivers, mm_plugin_get_name (self), vendor, product)); diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index 5517fcc4..aa844642 100644 --- a/src/mm-base-modem.c +++ b/src/mm-base-modem.c @@ -39,7 +39,7 @@ enum { PROP_VALID, PROP_MAX_TIMEOUTS, PROP_DEVICE, - PROP_DRIVER, + PROP_DRIVERS, PROP_PLUGIN, PROP_VENDOR_ID, PROP_PRODUCT_ID, @@ -59,7 +59,7 @@ struct _MMBaseModemPrivate { gulong invalid_if_cancelled; gchar *device; - gchar *driver; + gchar **drivers; gchar *plugin; guint vendor_id; @@ -809,12 +809,12 @@ mm_base_modem_get_device (MMBaseModem *self) return self->priv->device; } -const gchar * -mm_base_modem_get_driver (MMBaseModem *self) +const gchar ** +mm_base_modem_get_drivers (MMBaseModem *self) { g_return_val_if_fail (MM_IS_BASE_MODEM (self), NULL); - return self->priv->driver; + return (const gchar **)self->priv->drivers; } const gchar * @@ -909,9 +909,9 @@ set_property (GObject *object, g_free (self->priv->device); self->priv->device = g_value_dup_string (value); break; - case PROP_DRIVER: - g_free (self->priv->driver); - self->priv->driver = g_value_dup_string (value); + case PROP_DRIVERS: + g_strfreev (self->priv->drivers); + self->priv->drivers = g_value_dup_boxed (value); break; case PROP_PLUGIN: g_free (self->priv->plugin); @@ -951,8 +951,8 @@ get_property (GObject *object, case PROP_DEVICE: g_value_set_string (value, self->priv->device); break; - case PROP_DRIVER: - g_value_set_string (value, self->priv->driver); + case PROP_DRIVERS: + g_value_set_boxed (value, self->priv->drivers); break; case PROP_PLUGIN: g_value_set_string (value, self->priv->plugin); @@ -986,7 +986,7 @@ finalize (GObject *object) self->priv->device); g_free (self->priv->device); - g_free (self->priv->driver); + g_strfreev (self->priv->drivers); g_free (self->priv->plugin); G_OBJECT_CLASS (mm_base_modem_parent_class)->finalize (object); @@ -1065,13 +1065,13 @@ mm_base_modem_class_init (MMBaseModemClass *klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_DEVICE, properties[PROP_DEVICE]); - properties[PROP_DRIVER] = - g_param_spec_string (MM_BASE_MODEM_DRIVER, - "Driver", - "Kernel driver", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); - g_object_class_install_property (object_class, PROP_DRIVER, properties[PROP_DRIVER]); + properties[PROP_DRIVERS] = + g_param_spec_boxed (MM_BASE_MODEM_DRIVERS, + "Drivers", + "Kernel drivers", + G_TYPE_STRV, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); + g_object_class_install_property (object_class, PROP_DRIVERS, properties[PROP_DRIVERS]); properties[PROP_PLUGIN] = g_param_spec_string (MM_BASE_MODEM_PLUGIN, diff --git a/src/mm-base-modem.h b/src/mm-base-modem.h index c6cc752d..e0eb18d7 100644 --- a/src/mm-base-modem.h +++ b/src/mm-base-modem.h @@ -44,7 +44,7 @@ typedef struct _MMBaseModemPrivate MMBaseModemPrivate; #define MM_BASE_MODEM_MAX_TIMEOUTS "base-modem-max-timeouts" #define MM_BASE_MODEM_VALID "base-modem-valid" #define MM_BASE_MODEM_DEVICE "base-modem-device" -#define MM_BASE_MODEM_DRIVER "base-modem-driver" +#define MM_BASE_MODEM_DRIVERS "base-modem-drivers" #define MM_BASE_MODEM_PLUGIN "base-modem-plugin" #define MM_BASE_MODEM_VENDOR_ID "base-modem-vendor-id" #define MM_BASE_MODEM_PRODUCT_ID "base-modem-product-id" @@ -131,9 +131,9 @@ void mm_base_modem_set_valid (MMBaseModem *self, gboolean valid); gboolean mm_base_modem_get_valid (MMBaseModem *self); -const gchar *mm_base_modem_get_device (MMBaseModem *self); -const gchar *mm_base_modem_get_driver (MMBaseModem *self); -const gchar *mm_base_modem_get_plugin (MMBaseModem *self); +const gchar *mm_base_modem_get_device (MMBaseModem *self); +const gchar **mm_base_modem_get_drivers (MMBaseModem *self); +const gchar *mm_base_modem_get_plugin (MMBaseModem *self); guint mm_base_modem_get_vendor_id (MMBaseModem *self); guint mm_base_modem_get_product_id (MMBaseModem *self); diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 4d11562c..4193651f 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -7631,14 +7631,14 @@ mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem *self, MMBroadbandModem * mm_broadband_modem_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id) { return g_object_new (MM_TYPE_BROADBAND_MODEM, MM_BASE_MODEM_DEVICE, device, - MM_BASE_MODEM_DRIVER, driver, + MM_BASE_MODEM_DRIVERS, drivers, MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, diff --git a/src/mm-broadband-modem.h b/src/mm-broadband-modem.h index 74324847..a8c10581 100644 --- a/src/mm-broadband-modem.h +++ b/src/mm-broadband-modem.h @@ -75,7 +75,7 @@ struct _MMBroadbandModemClass { GType mm_broadband_modem_get_type (void); MMBroadbandModem *mm_broadband_modem_new (const gchar *device, - const gchar *driver, + const gchar **drivers, const gchar *plugin, guint16 vendor_id, guint16 product_id); diff --git a/src/mm-device.c b/src/mm-device.c index 1733f943..6af43dae 100644 --- a/src/mm-device.c +++ b/src/mm-device.c @@ -53,8 +53,8 @@ struct _MMDevicePrivate { guint16 vendor; guint16 product; - /* Kernel driver managing this device */ - gchar *driver; + /* Kernel drivers managing this device */ + gchar **drivers; /* Best plugin to manage this device */ MMPlugin *plugin; @@ -217,6 +217,37 @@ get_driver_name (GUdevDevice *device) return ret; } +static void +add_port_driver (MMDevice *self, + GUdevDevice *udev_port) +{ + gchar *driver = NULL; + guint n_items; + guint i; + + driver = get_driver_name (udev_port); + + n_items = (self->priv->drivers ? g_strv_length (self->priv->drivers) : 0); + if (n_items > 0) { + /* Add driver to our list of drivers, if not already there */ + for (i = 0; self->priv->drivers[i]; i++) { + if (g_str_equal (self->priv->drivers[i], driver)) { + g_free (driver); + driver = NULL; + break; + } + } + } + + if (!driver) + return; + + self->priv->drivers = g_realloc (self->priv->drivers, + (n_items + 2) * sizeof (gchar *)); + self->priv->drivers[n_items] = driver; + self->priv->drivers[n_items + 1] = NULL; +} + void mm_device_grab_port (MMDevice *self, GUdevDevice *udev_port) @@ -226,10 +257,8 @@ mm_device_grab_port (MMDevice *self, if (mm_device_owns_port (self, udev_port)) return; - /* Get the driver name and vendor/product IDs out of the first port - * grabbed */ + /* Get the vendor/product IDs out of the first port grabbed */ if (!self->priv->port_probes) { - self->priv->driver = get_driver_name (udev_port); if (!get_device_ids (udev_port, &self->priv->vendor, &self->priv->product)) { @@ -238,6 +267,9 @@ mm_device_grab_port (MMDevice *self, } } + /* Add new port driver */ + add_port_driver (self, udev_port); + /* Create and store new port probe */ probe = mm_port_probe_new (self, udev_port); self->priv->port_probes = g_list_prepend (self->priv->port_probes, probe); @@ -438,10 +470,10 @@ mm_device_get_path (MMDevice *self) return self->priv->udev_device_path; } -const gchar * -mm_device_get_driver (MMDevice *self) +const gchar ** +mm_device_get_drivers (MMDevice *self) { - return self->priv->driver; + return (const gchar **)self->priv->drivers; } guint16 @@ -636,7 +668,7 @@ finalize (GObject *object) MMDevice *self = MM_DEVICE (object); g_free (self->priv->udev_device_path); - g_free (self->priv->driver); + g_strfreev (self->priv->drivers); G_OBJECT_CLASS (mm_device_parent_class)->finalize (object); } diff --git a/src/mm-device.h b/src/mm-device.h index 36b905e1..c8aa6412 100644 --- a/src/mm-device.h +++ b/src/mm-device.h @@ -74,18 +74,18 @@ gboolean mm_device_create_modem (MMDevice *self, GError **error); void mm_device_remove_modem (MMDevice *self); -const gchar *mm_device_get_path (MMDevice *self); -const gchar *mm_device_get_driver (MMDevice *self); -guint16 mm_device_get_vendor (MMDevice *self); -guint16 mm_device_get_product (MMDevice *self); -GUdevDevice *mm_device_peek_udev_device (MMDevice *self); -GUdevDevice *mm_device_get_udev_device (MMDevice *self); -void mm_device_set_plugin (MMDevice *self, - GObject *plugin); -GObject *mm_device_peek_plugin (MMDevice *self); -GObject *mm_device_get_plugin (MMDevice *self); -MMBaseModem *mm_device_peek_modem (MMDevice *self); -MMBaseModem *mm_device_get_modem (MMDevice *self); +const gchar *mm_device_get_path (MMDevice *self); +const gchar **mm_device_get_drivers (MMDevice *self); +guint16 mm_device_get_vendor (MMDevice *self); +guint16 mm_device_get_product (MMDevice *self); +GUdevDevice *mm_device_peek_udev_device (MMDevice *self); +GUdevDevice *mm_device_get_udev_device (MMDevice *self); +void mm_device_set_plugin (MMDevice *self, + GObject *plugin); +GObject *mm_device_peek_plugin (MMDevice *self); +GObject *mm_device_get_plugin (MMDevice *self); +MMBaseModem *mm_device_peek_modem (MMDevice *self); +MMBaseModem *mm_device_get_modem (MMDevice *self); GObject *mm_device_peek_port_probe (MMDevice *self, GUdevDevice *udev_port); diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index c8d1b96b..6bb38224 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -3185,14 +3185,14 @@ interface_initialization_step (InitializationContext *ctx) g_free (device); } /* Load driver if not done before */ - if (!mm_gdbus_modem_get_driver (ctx->skeleton)) { - gchar *driver; + if (!mm_gdbus_modem_get_drivers (ctx->skeleton)) { + gchar **drivers; g_object_get (ctx->self, - MM_BASE_MODEM_DRIVER, &driver, + MM_BASE_MODEM_DRIVERS, &drivers, NULL); - mm_gdbus_modem_set_driver (ctx->skeleton, driver); - g_free (driver); + mm_gdbus_modem_set_drivers (ctx->skeleton, (const gchar * const *)drivers); + g_strfreev (drivers); } /* Load plugin if not done before */ if (!mm_gdbus_modem_get_plugin (ctx->skeleton)) { @@ -3563,7 +3563,7 @@ mm_iface_modem_initialize (MMIfaceModem *self, mm_gdbus_modem_set_own_numbers (skeleton, NULL); mm_gdbus_modem_set_device_identifier (skeleton, NULL); mm_gdbus_modem_set_device (skeleton, NULL); - mm_gdbus_modem_set_driver (skeleton, NULL); + mm_gdbus_modem_set_drivers (skeleton, NULL); mm_gdbus_modem_set_plugin (skeleton, NULL); mm_gdbus_modem_set_equipment_identifier (skeleton, NULL); mm_gdbus_modem_set_unlock_required (skeleton, MM_MODEM_LOCK_UNKNOWN); diff --git a/src/mm-plugin.c b/src/mm-plugin.c index d078667a..a9ce28b0 100644 --- a/src/mm-plugin.c +++ b/src/mm-plugin.c @@ -199,34 +199,45 @@ apply_pre_probing_filters (MMPlugin *self, * drivers are not supported. If that is the case, filter by driver */ if (self->priv->drivers || self->priv->forbidden_drivers) { - const gchar *driver; + static const gchar *virtual_drivers [] = { "virtual", NULL }; + const gchar **drivers; /* Detect any modems accessible through the list of virtual ports */ - driver = (is_virtual_port (g_udev_device_get_name (port)) ? - "virtual" : - mm_device_get_driver (device)); + drivers = (is_virtual_port (g_udev_device_get_name (port)) ? + virtual_drivers : + mm_device_get_drivers (device)); /* If error retrieving driver: unsupported */ - if (!driver) + if (!drivers) return TRUE; /* Filtering by allowed drivers */ if (self->priv->drivers) { - for (i = 0; self->priv->drivers[i]; i++) { - if (g_str_equal (driver, self->priv->drivers[i])) - break; + gboolean found = FALSE; + + for (i = 0; self->priv->drivers[i] && !found; i++) { + guint j; + + for (j = 0; drivers[j] && !found; j++) { + if (g_str_equal (drivers[j], self->priv->drivers[i])) + found = TRUE; + } } /* If we didn't match any driver: unsupported */ - if (!self->priv->drivers[i]) + if (!found) return TRUE; } /* Filtering by forbidden drivers */ else { for (i = 0; self->priv->forbidden_drivers[i]; i++) { - /* If we match a forbidden driver: unsupported */ - if (g_str_equal (driver, self->priv->forbidden_drivers[i])) - return TRUE; + guint j; + + for (j = 0; drivers[j]; j++) { + /* If we match a forbidden driver: unsupported */ + if (g_str_equal (drivers[j], self->priv->forbidden_drivers[i])) + return TRUE; + } } } } @@ -662,7 +673,7 @@ mm_plugin_create_modem (MMPlugin *self, /* Let the plugin create the modem from the port probe results */ modem = MM_PLUGIN_GET_CLASS (self)->create_modem (MM_PLUGIN (self), mm_device_get_path (device), - mm_device_get_driver (device), + mm_device_get_drivers (device), mm_device_get_vendor (device), mm_device_get_product (device), port_probes, diff --git a/src/mm-plugin.h b/src/mm-plugin.h index e5796e63..14c16d35 100644 --- a/src/mm-plugin.h +++ b/src/mm-plugin.h @@ -84,7 +84,7 @@ struct _MMPluginClass { * a list of port probes (Mandatory) */ MMBaseModem *(*create_modem) (MMPlugin *plugin, const gchar *sysfs_path, - const gchar *driver, + const gchar **drivers, guint16 vendor, guint16 product, GList *probes, |