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'
This commit is contained in:
Aleksander Morgado
2012-08-24 13:28:22 +02:00
parent a595912d2d
commit 0436b3e457
84 changed files with 268 additions and 214 deletions

3
TODO
View File

@@ -109,9 +109,6 @@ example to update the signal quality value or check registration status.
** serial-parsers: convert the v1 parser to a GObject. ** 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 ** MMBroadbandBearer: include additional step for authentication, with
retries. retries.

View File

@@ -220,6 +220,7 @@ print_bearer_short_info (MMBearer *bearer)
static void static void
print_modem_info (void) print_modem_info (void)
{ {
gchar *drivers_string;
gchar *prefixed_revision; gchar *prefixed_revision;
gchar *capabilities_string; gchar *capabilities_string;
gchar *access_technologies_string; gchar *access_technologies_string;
@@ -272,6 +273,15 @@ print_modem_info (void)
} else } else
own_numbers_string = NULL; 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 */ /* Rework possible multiline strings */
prefixed_revision = mmcli_prefix_newlines (" | ", prefixed_revision = mmcli_prefix_newlines (" | ",
mm_modem_get_revision (ctx->modem)); mm_modem_get_revision (ctx->modem));
@@ -298,10 +308,10 @@ print_modem_info (void)
/* System related stuff */ /* System related stuff */
g_print (" -------------------------\n" g_print (" -------------------------\n"
" System | device: '%s'\n" " System | device: '%s'\n"
" | driver: '%s'\n" " | drivers: '%s'\n"
" | plugin: '%s'\n", " | plugin: '%s'\n",
VALIDATE_UNKNOWN (mm_modem_get_device (ctx->modem)), 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))); VALIDATE_UNKNOWN (mm_modem_get_plugin (ctx->modem)));
/* Numbers related stuff */ /* Numbers related stuff */
@@ -410,6 +420,7 @@ print_modem_info (void)
g_free (supported_modes_string); g_free (supported_modes_string);
g_free (unlock_retries_string); g_free (unlock_retries_string);
g_free (own_numbers_string); g_free (own_numbers_string);
g_free (drivers_string);
} }
static void static void

View File

@@ -280,12 +280,12 @@
<property name="Device" type="s" access="read" /> <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. hardware.
--> -->
<property name="Driver" type="s" access="read" /> <property name="Drivers" type="as" access="read" />
<!-- <!--
Plugin: Plugin:

View File

@@ -382,41 +382,39 @@ mm_modem_dup_device (MMModem *self)
} }
/** /**
* mm_modem_get_driver: * mm_modem_get_drivers:
* @self: A #MMModem. * @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. * 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> * <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 * const gchar * const *
mm_modem_get_driver (MMModem *self) mm_modem_get_drivers (MMModem *self)
{ {
g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL); g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL);
RETURN_NON_EMPTY_CONSTANT_STRING ( return mm_gdbus_modem_get_drivers (self);
mm_gdbus_modem_get_driver (self));
} }
/** /**
* mm_modem_dup_driver: * mm_modem_dup_drivers:
* @self: A #MMModem. * @self: A #MMModem.
* *
* Gets a copy of the Operating System device driver handling communication with the modem * Gets a copy of the Operating System device driver handling communication with the modem
* hardware. * 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 * gchar **
mm_modem_dup_driver (MMModem *self) mm_modem_dup_drivers (MMModem *self)
{ {
g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL); g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL);
RETURN_NON_EMPTY_STRING ( return mm_gdbus_modem_dup_drivers (self);
mm_gdbus_modem_dup_driver (self));
} }
/** /**

View File

@@ -55,8 +55,8 @@ const gchar *mm_modem_get_device_identifier (MMModem *self);
gchar *mm_modem_dup_device_identifier (MMModem *self); gchar *mm_modem_dup_device_identifier (MMModem *self);
const gchar *mm_modem_get_device (MMModem *self); const gchar *mm_modem_get_device (MMModem *self);
gchar *mm_modem_dup_device (MMModem *self); gchar *mm_modem_dup_device (MMModem *self);
const gchar *mm_modem_get_driver (MMModem *self); const gchar * const *mm_modem_get_drivers (MMModem *self);
gchar *mm_modem_dup_driver (MMModem *self); gchar **mm_modem_dup_drivers (MMModem *self);
const gchar *mm_modem_get_plugin (MMModem *self); const gchar *mm_modem_get_plugin (MMModem *self);
gchar *mm_modem_dup_plugin (MMModem *self); gchar *mm_modem_dup_plugin (MMModem *self);
const gchar *mm_modem_get_equipment_identifier (MMModem *self); const gchar *mm_modem_get_equipment_identifier (MMModem *self);

View File

@@ -343,14 +343,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemAnydata * MMBroadbandModemAnydata *
mm_broadband_modem_anydata_new (const gchar *device, mm_broadband_modem_anydata_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_ANYDATA, return g_object_new (MM_TYPE_BROADBAND_MODEM_ANYDATA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemAnydataClass{
GType mm_broadband_modem_anydata_get_type (void); GType mm_broadband_modem_anydata_get_type (void);
MMBroadbandModemAnydata *mm_broadband_modem_anydata_new (const gchar *device, MMBroadbandModemAnydata *mm_broadband_modem_anydata_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_anydata_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_anydata_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -1147,14 +1147,14 @@ setup_flow_control (MMIfaceModem *self,
MMBroadbandModemCinterion * MMBroadbandModemCinterion *
mm_broadband_modem_cinterion_new (const gchar *device, mm_broadband_modem_cinterion_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_CINTERION, return g_object_new (MM_TYPE_BROADBAND_MODEM_CINTERION,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemCinterionClass{
GType mm_broadband_modem_cinterion_get_type (void); GType mm_broadband_modem_cinterion_get_type (void);
MMBroadbandModemCinterion *mm_broadband_modem_cinterion_new (const gchar *device, MMBroadbandModemCinterion *mm_broadband_modem_cinterion_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -38,14 +38,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_cinterion_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_cinterion_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -42,14 +42,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -89,14 +89,14 @@ load_access_technologies (MMIfaceModem *self,
MMBroadbandModemGobi * MMBroadbandModemGobi *
mm_broadband_modem_gobi_new (const gchar *device, mm_broadband_modem_gobi_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_GOBI, return g_object_new (MM_TYPE_BROADBAND_MODEM_GOBI,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemGobiClass{
GType mm_broadband_modem_gobi_get_type (void); GType mm_broadband_modem_gobi_get_type (void);
MMBroadbandModemGobi *mm_broadband_modem_gobi_new (const gchar *device, MMBroadbandModemGobi *mm_broadband_modem_gobi_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_gobi_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_gobi_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -1524,14 +1524,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemHuawei * MMBroadbandModemHuawei *
mm_broadband_modem_huawei_new (const gchar *device, mm_broadband_modem_huawei_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_HUAWEI, return g_object_new (MM_TYPE_BROADBAND_MODEM_HUAWEI,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemHuaweiClass{
GType mm_broadband_modem_huawei_get_type (void); GType mm_broadband_modem_huawei_get_type (void);
MMBroadbandModemHuawei *mm_broadband_modem_huawei_new (const gchar *device, MMBroadbandModemHuawei *mm_broadband_modem_huawei_new (const gchar *device,
const gchar *driver, const gchar **driver,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -415,7 +415,7 @@ propagate_port_mode_results (GList *probes)
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
@@ -424,7 +424,7 @@ create_modem (MMPlugin *self,
propagate_port_mode_results (probes); propagate_port_mode_results (probes);
return MM_BASE_MODEM (mm_broadband_modem_huawei_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_huawei_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -1546,14 +1546,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemIcera * MMBroadbandModemIcera *
mm_broadband_modem_icera_new (const gchar *device, mm_broadband_modem_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_ICERA, return g_object_new (MM_TYPE_BROADBAND_MODEM_ICERA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -45,7 +45,7 @@ struct _MMBroadbandModemIceraClass{
GType mm_broadband_modem_icera_get_type (void); GType mm_broadband_modem_icera_get_type (void);
MMBroadbandModemIcera *mm_broadband_modem_icera_new (const gchar *device, MMBroadbandModemIcera *mm_broadband_modem_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -395,14 +395,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemIridium * MMBroadbandModemIridium *
mm_broadband_modem_iridium_new (const gchar *device, mm_broadband_modem_iridium_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_IRIDIUM, return g_object_new (MM_TYPE_BROADBAND_MODEM_IRIDIUM,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemIridiumClass{
GType mm_broadband_modem_iridium_get_type (void); GType mm_broadband_modem_iridium_get_type (void);
MMBroadbandModemIridium *mm_broadband_modem_iridium_new (const gchar *device, MMBroadbandModemIridium *mm_broadband_modem_iridium_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -38,14 +38,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_iridium_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_iridium_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -204,14 +204,14 @@ set_allowed_modes (MMIfaceModem *self,
MMBroadbandModemLinktop * MMBroadbandModemLinktop *
mm_broadband_modem_linktop_new (const gchar *device, mm_broadband_modem_linktop_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_LINKTOP, return g_object_new (MM_TYPE_BROADBAND_MODEM_LINKTOP,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemLinktopClass{
GType mm_broadband_modem_linktop_get_type (void); GType mm_broadband_modem_linktop_get_type (void);
MMBroadbandModemLinktop *mm_broadband_modem_linktop_new (const gchar *device, MMBroadbandModemLinktop *mm_broadband_modem_linktop_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_linktop_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_linktop_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -312,14 +312,14 @@ load_unlock_retries (MMIfaceModem *self,
MMBroadbandModemLongcheer * MMBroadbandModemLongcheer *
mm_broadband_modem_longcheer_new (const gchar *device, mm_broadband_modem_longcheer_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_LONGCHEER, return g_object_new (MM_TYPE_BROADBAND_MODEM_LONGCHEER,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemLongcheerClass{
GType mm_broadband_modem_longcheer_get_type (void); GType mm_broadband_modem_longcheer_get_type (void);
MMBroadbandModemLongcheer *mm_broadband_modem_longcheer_new (const gchar *device, MMBroadbandModemLongcheer *mm_broadband_modem_longcheer_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -182,14 +182,14 @@ longcheer_custom_init (MMPortProbe *probe,
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_longcheer_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_longcheer_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -1032,14 +1032,14 @@ setup_ports (MMBroadbandModem *_self)
MMBroadbandModemMbm * MMBroadbandModemMbm *
mm_broadband_modem_mbm_new (const gchar *device, mm_broadband_modem_mbm_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_MBM, return g_object_new (MM_TYPE_BROADBAND_MODEM_MBM,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -50,7 +50,7 @@ struct _MMBroadbandModemMbmClass{
GType mm_broadband_modem_mbm_get_type (void); GType mm_broadband_modem_mbm_get_type (void);
MMBroadbandModemMbm *mm_broadband_modem_mbm_new (const gchar *device, MMBroadbandModemMbm *mm_broadband_modem_mbm_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -36,14 +36,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_mbm_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_mbm_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -39,14 +39,14 @@ G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMotorola, mm_broadband_modem_motorola, M
MMBroadbandModemMotorola * MMBroadbandModemMotorola *
mm_broadband_modem_motorola_new (const gchar *device, mm_broadband_modem_motorola_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_MOTOROLA, return g_object_new (MM_TYPE_BROADBAND_MODEM_MOTOROLA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemMotorolaClass{
GType mm_broadband_modem_motorola_get_type (void); GType mm_broadband_modem_motorola_get_type (void);
MMBroadbandModemMotorola *mm_broadband_modem_motorola_new (const gchar *device, MMBroadbandModemMotorola *mm_broadband_modem_motorola_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_motorola_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_motorola_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -153,14 +153,14 @@ modem_init (MMIfaceModem *self,
MMBroadbandModemNokia * MMBroadbandModemNokia *
mm_broadband_modem_nokia_new (const gchar *device, mm_broadband_modem_nokia_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_NOKIA, return g_object_new (MM_TYPE_BROADBAND_MODEM_NOKIA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemNokiaClass{
GType mm_broadband_modem_nokia_get_type (void); GType mm_broadband_modem_nokia_get_type (void);
MMBroadbandModemNokia *mm_broadband_modem_nokia_new (const gchar *device, MMBroadbandModemNokia *mm_broadband_modem_nokia_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -33,14 +33,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_icera_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_icera_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -44,14 +44,14 @@ static const MMPortProbeAtCommand custom_at_probe[] = {
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_nokia_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_nokia_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -336,14 +336,14 @@ load_access_technologies (MMIfaceModem *self,
MMBroadbandModemNovatelLte * MMBroadbandModemNovatelLte *
mm_broadband_modem_novatel_lte_new (const gchar *device, mm_broadband_modem_novatel_lte_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL_LTE, return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL_LTE,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -42,7 +42,7 @@ struct _MMBroadbandModemNovatelLteClass{
GType mm_broadband_modem_novatel_lte_get_type (void); GType mm_broadband_modem_novatel_lte_get_type (void);
MMBroadbandModemNovatelLte *mm_broadband_modem_novatel_lte_new (const gchar *device, MMBroadbandModemNovatelLte *mm_broadband_modem_novatel_lte_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -742,14 +742,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemNovatel * MMBroadbandModemNovatel *
mm_broadband_modem_novatel_new (const gchar *device, mm_broadband_modem_novatel_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL, return g_object_new (MM_TYPE_BROADBAND_MODEM_NOVATEL,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemNovatelClass{
GType mm_broadband_modem_novatel_get_type (void); GType mm_broadband_modem_novatel_get_type (void);
MMBroadbandModemNovatel *mm_broadband_modem_novatel_new (const gchar *device, MMBroadbandModemNovatel *mm_broadband_modem_novatel_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -36,14 +36,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_novatel_lte_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_novatel_lte_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -37,14 +37,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -675,14 +675,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemHso * MMBroadbandModemHso *
mm_broadband_modem_hso_new (const gchar *device, mm_broadband_modem_hso_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_HSO, return g_object_new (MM_TYPE_BROADBAND_MODEM_HSO,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemHsoClass{
GType mm_broadband_modem_hso_get_type (void); GType mm_broadband_modem_hso_get_type (void);
MMBroadbandModemHso *mm_broadband_modem_hso_new (const gchar *device, MMBroadbandModemHso *mm_broadband_modem_hso_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -1031,14 +1031,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemOption * MMBroadbandModemOption *
mm_broadband_modem_option_new (const gchar *device, mm_broadband_modem_option_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_OPTION, return g_object_new (MM_TYPE_BROADBAND_MODEM_OPTION,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemOptionClass{
GType mm_broadband_modem_option_get_type (void); GType mm_broadband_modem_option_get_type (void);
MMBroadbandModemOption *mm_broadband_modem_option_new (const gchar *device, MMBroadbandModemOption *mm_broadband_modem_option_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -35,14 +35,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_hso_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_hso_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -34,14 +34,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_option_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_option_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -63,14 +63,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemSamsung * MMBroadbandModemSamsung *
mm_broadband_modem_samsung_new (const gchar *device, mm_broadband_modem_samsung_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_SAMSUNG, return g_object_new (MM_TYPE_BROADBAND_MODEM_SAMSUNG,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemSamsungClass{
GType mm_broadband_modem_samsung_get_type (void); GType mm_broadband_modem_samsung_get_type (void);
MMBroadbandModemSamsung *mm_broadband_modem_samsung_new (const gchar *device, MMBroadbandModemSamsung *mm_broadband_modem_samsung_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -37,14 +37,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_samsung_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_samsung_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -51,14 +51,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemSierraIcera * MMBroadbandModemSierraIcera *
mm_broadband_modem_sierra_icera_new (const gchar *device, mm_broadband_modem_sierra_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA_ICERA, return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA_ICERA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemSierraIceraClass {
GType mm_broadband_modem_sierra_icera_get_type (void); GType mm_broadband_modem_sierra_icera_get_type (void);
MMBroadbandModemSierraIcera *mm_broadband_modem_sierra_icera_new (const gchar *device, MMBroadbandModemSierraIcera *mm_broadband_modem_sierra_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -843,14 +843,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemSierra * MMBroadbandModemSierra *
mm_broadband_modem_sierra_new (const gchar *device, mm_broadband_modem_sierra_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA, return g_object_new (MM_TYPE_BROADBAND_MODEM_SIERRA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemSierraClass{
GType mm_broadband_modem_sierra_get_type (void); GType mm_broadband_modem_sierra_get_type (void);
MMBroadbandModemSierra *mm_broadband_modem_sierra_new (const gchar *device, MMBroadbandModemSierra *mm_broadband_modem_sierra_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -47,6 +47,8 @@ full_functionality_status_ready (MMBaseModem *self,
GSimpleAsyncResult *simple) GSimpleAsyncResult *simple)
{ {
GError *error = NULL; GError *error = NULL;
guint i;
const gchar **drivers;
if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) { if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) {
g_simple_async_result_take_error (simple, 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 * away but need some time to finish initialization. Anything driven by
* 'sierra' is new enough to need no delay. * 'sierra' is new enough to need no delay.
*/ */
if (g_str_equal (mm_base_modem_get_driver (MM_BASE_MODEM (self)), "sierra")) { drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self));
g_simple_async_result_set_op_res_gboolean (simple, TRUE); for (i = 0; drivers[i]; i++) {
g_simple_async_result_complete (simple); if (g_str_equal (drivers[i], "sierra")) {
g_object_unref (simple); g_simple_async_result_set_op_res_gboolean (simple, TRUE);
return; g_simple_async_result_complete (simple);
g_object_unref (simple);
return;
}
} }
/* The modem object will be valid in the callback as 'result' keeps a /* The modem object will be valid in the callback as 'result' keeps a

View File

@@ -157,7 +157,7 @@ sierra_custom_init (MMPortProbe *probe,
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
@@ -173,13 +173,13 @@ create_modem (MMPlugin *self,
if (is_icera) if (is_icera)
return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));
return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -791,14 +791,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemSimtech * MMBroadbandModemSimtech *
mm_broadband_modem_simtech_new (const gchar *device, mm_broadband_modem_simtech_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_SIMTECH, return g_object_new (MM_TYPE_BROADBAND_MODEM_SIMTECH,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemSimtechClass{
GType mm_broadband_modem_simtech_get_type (void); GType mm_broadband_modem_simtech_get_type (void);
MMBroadbandModemSimtech *mm_broadband_modem_simtech_new (const gchar *device, MMBroadbandModemSimtech *mm_broadband_modem_simtech_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -32,14 +32,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_simtech_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_simtech_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -1178,14 +1178,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemWavecom * MMBroadbandModemWavecom *
mm_broadband_modem_wavecom_new (const gchar *device, mm_broadband_modem_wavecom_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_WAVECOM, return g_object_new (MM_TYPE_BROADBAND_MODEM_WAVECOM,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -42,7 +42,7 @@ struct _MMBroadbandModemWavecomClass{
GType mm_broadband_modem_wavecom_get_type (void); GType mm_broadband_modem_wavecom_get_type (void);
MMBroadbandModemWavecom *mm_broadband_modem_wavecom_new (const gchar *device, MMBroadbandModemWavecom *mm_broadband_modem_wavecom_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -40,14 +40,14 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_wavecom_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_wavecom_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -239,14 +239,14 @@ load_access_technologies (MMIfaceModem *self,
MMBroadbandModemX22x * MMBroadbandModemX22x *
mm_broadband_modem_x22x_new (const gchar *device, mm_broadband_modem_x22x_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_X22X, return g_object_new (MM_TYPE_BROADBAND_MODEM_X22X,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -41,7 +41,7 @@ struct _MMBroadbandModemX22xClass{
GType mm_broadband_modem_x22x_get_type (void); GType mm_broadband_modem_x22x_get_type (void);
MMBroadbandModemX22x *mm_broadband_modem_x22x_new (const gchar *device, MMBroadbandModemX22x *mm_broadband_modem_x22x_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -181,14 +181,14 @@ x22x_custom_init (MMPortProbe *probe,
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
GError **error) GError **error)
{ {
return MM_BASE_MODEM (mm_broadband_modem_x22x_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_x22x_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -168,14 +168,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemZteIcera * MMBroadbandModemZteIcera *
mm_broadband_modem_zte_icera_new (const gchar *device, mm_broadband_modem_zte_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE_ICERA, return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE_ICERA,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemZteIceraClass{
GType mm_broadband_modem_zte_icera_get_type (void); GType mm_broadband_modem_zte_icera_get_type (void);
MMBroadbandModemZteIcera *mm_broadband_modem_zte_icera_new (const gchar *device, MMBroadbandModemZteIcera *mm_broadband_modem_zte_icera_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -533,14 +533,14 @@ setup_ports (MMBroadbandModem *self)
MMBroadbandModemZte * MMBroadbandModemZte *
mm_broadband_modem_zte_new (const gchar *device, mm_broadband_modem_zte_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE, return g_object_new (MM_TYPE_BROADBAND_MODEM_ZTE,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -43,7 +43,7 @@ struct _MMBroadbandModemZteClass{
GType mm_broadband_modem_zte_get_type (void); GType mm_broadband_modem_zte_get_type (void);
MMBroadbandModemZte *mm_broadband_modem_zte_new (const gchar *device, MMBroadbandModemZte *mm_broadband_modem_zte_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -53,7 +53,7 @@ static const MMPortProbeAtCommand custom_at_probe[] = {
static MMBaseModem * static MMBaseModem *
create_modem (MMPlugin *self, create_modem (MMPlugin *self,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,
@@ -69,13 +69,13 @@ create_modem (MMPlugin *self,
if (is_icera) if (is_icera)
return MM_BASE_MODEM (mm_broadband_modem_zte_icera_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_zte_icera_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));
return MM_BASE_MODEM (mm_broadband_modem_zte_new (sysfs_path, return MM_BASE_MODEM (mm_broadband_modem_zte_new (sysfs_path,
driver, drivers,
mm_plugin_get_name (self), mm_plugin_get_name (self),
vendor, vendor,
product)); product));

View File

@@ -39,7 +39,7 @@ enum {
PROP_VALID, PROP_VALID,
PROP_MAX_TIMEOUTS, PROP_MAX_TIMEOUTS,
PROP_DEVICE, PROP_DEVICE,
PROP_DRIVER, PROP_DRIVERS,
PROP_PLUGIN, PROP_PLUGIN,
PROP_VENDOR_ID, PROP_VENDOR_ID,
PROP_PRODUCT_ID, PROP_PRODUCT_ID,
@@ -59,7 +59,7 @@ struct _MMBaseModemPrivate {
gulong invalid_if_cancelled; gulong invalid_if_cancelled;
gchar *device; gchar *device;
gchar *driver; gchar **drivers;
gchar *plugin; gchar *plugin;
guint vendor_id; guint vendor_id;
@@ -809,12 +809,12 @@ mm_base_modem_get_device (MMBaseModem *self)
return self->priv->device; return self->priv->device;
} }
const gchar * const gchar **
mm_base_modem_get_driver (MMBaseModem *self) mm_base_modem_get_drivers (MMBaseModem *self)
{ {
g_return_val_if_fail (MM_IS_BASE_MODEM (self), NULL); g_return_val_if_fail (MM_IS_BASE_MODEM (self), NULL);
return self->priv->driver; return (const gchar **)self->priv->drivers;
} }
const gchar * const gchar *
@@ -909,9 +909,9 @@ set_property (GObject *object,
g_free (self->priv->device); g_free (self->priv->device);
self->priv->device = g_value_dup_string (value); self->priv->device = g_value_dup_string (value);
break; break;
case PROP_DRIVER: case PROP_DRIVERS:
g_free (self->priv->driver); g_strfreev (self->priv->drivers);
self->priv->driver = g_value_dup_string (value); self->priv->drivers = g_value_dup_boxed (value);
break; break;
case PROP_PLUGIN: case PROP_PLUGIN:
g_free (self->priv->plugin); g_free (self->priv->plugin);
@@ -951,8 +951,8 @@ get_property (GObject *object,
case PROP_DEVICE: case PROP_DEVICE:
g_value_set_string (value, self->priv->device); g_value_set_string (value, self->priv->device);
break; break;
case PROP_DRIVER: case PROP_DRIVERS:
g_value_set_string (value, self->priv->driver); g_value_set_boxed (value, self->priv->drivers);
break; break;
case PROP_PLUGIN: case PROP_PLUGIN:
g_value_set_string (value, self->priv->plugin); g_value_set_string (value, self->priv->plugin);
@@ -986,7 +986,7 @@ finalize (GObject *object)
self->priv->device); self->priv->device);
g_free (self->priv->device); g_free (self->priv->device);
g_free (self->priv->driver); g_strfreev (self->priv->drivers);
g_free (self->priv->plugin); g_free (self->priv->plugin);
G_OBJECT_CLASS (mm_base_modem_parent_class)->finalize (object); 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_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_DEVICE, properties[PROP_DEVICE]); g_object_class_install_property (object_class, PROP_DEVICE, properties[PROP_DEVICE]);
properties[PROP_DRIVER] = properties[PROP_DRIVERS] =
g_param_spec_string (MM_BASE_MODEM_DRIVER, g_param_spec_boxed (MM_BASE_MODEM_DRIVERS,
"Driver", "Drivers",
"Kernel driver", "Kernel drivers",
NULL, G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_DRIVER, properties[PROP_DRIVER]); g_object_class_install_property (object_class, PROP_DRIVERS, properties[PROP_DRIVERS]);
properties[PROP_PLUGIN] = properties[PROP_PLUGIN] =
g_param_spec_string (MM_BASE_MODEM_PLUGIN, g_param_spec_string (MM_BASE_MODEM_PLUGIN,

View File

@@ -44,7 +44,7 @@ typedef struct _MMBaseModemPrivate MMBaseModemPrivate;
#define MM_BASE_MODEM_MAX_TIMEOUTS "base-modem-max-timeouts" #define MM_BASE_MODEM_MAX_TIMEOUTS "base-modem-max-timeouts"
#define MM_BASE_MODEM_VALID "base-modem-valid" #define MM_BASE_MODEM_VALID "base-modem-valid"
#define MM_BASE_MODEM_DEVICE "base-modem-device" #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_PLUGIN "base-modem-plugin"
#define MM_BASE_MODEM_VENDOR_ID "base-modem-vendor-id" #define MM_BASE_MODEM_VENDOR_ID "base-modem-vendor-id"
#define MM_BASE_MODEM_PRODUCT_ID "base-modem-product-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 valid);
gboolean mm_base_modem_get_valid (MMBaseModem *self); gboolean mm_base_modem_get_valid (MMBaseModem *self);
const gchar *mm_base_modem_get_device (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_drivers (MMBaseModem *self);
const gchar *mm_base_modem_get_plugin (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_vendor_id (MMBaseModem *self);
guint mm_base_modem_get_product_id (MMBaseModem *self); guint mm_base_modem_get_product_id (MMBaseModem *self);

View File

@@ -7631,14 +7631,14 @@ mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem *self,
MMBroadbandModem * MMBroadbandModem *
mm_broadband_modem_new (const gchar *device, mm_broadband_modem_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id) guint16 product_id)
{ {
return g_object_new (MM_TYPE_BROADBAND_MODEM, return g_object_new (MM_TYPE_BROADBAND_MODEM,
MM_BASE_MODEM_DEVICE, device, MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVER, driver, MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id, MM_BASE_MODEM_PRODUCT_ID, product_id,

View File

@@ -75,7 +75,7 @@ struct _MMBroadbandModemClass {
GType mm_broadband_modem_get_type (void); GType mm_broadband_modem_get_type (void);
MMBroadbandModem *mm_broadband_modem_new (const gchar *device, MMBroadbandModem *mm_broadband_modem_new (const gchar *device,
const gchar *driver, const gchar **drivers,
const gchar *plugin, const gchar *plugin,
guint16 vendor_id, guint16 vendor_id,
guint16 product_id); guint16 product_id);

View File

@@ -53,8 +53,8 @@ struct _MMDevicePrivate {
guint16 vendor; guint16 vendor;
guint16 product; guint16 product;
/* Kernel driver managing this device */ /* Kernel drivers managing this device */
gchar *driver; gchar **drivers;
/* Best plugin to manage this device */ /* Best plugin to manage this device */
MMPlugin *plugin; MMPlugin *plugin;
@@ -217,6 +217,37 @@ get_driver_name (GUdevDevice *device)
return ret; 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 void
mm_device_grab_port (MMDevice *self, mm_device_grab_port (MMDevice *self,
GUdevDevice *udev_port) GUdevDevice *udev_port)
@@ -226,10 +257,8 @@ mm_device_grab_port (MMDevice *self,
if (mm_device_owns_port (self, udev_port)) if (mm_device_owns_port (self, udev_port))
return; return;
/* Get the driver name and vendor/product IDs out of the first port /* Get the vendor/product IDs out of the first port grabbed */
* grabbed */
if (!self->priv->port_probes) { if (!self->priv->port_probes) {
self->priv->driver = get_driver_name (udev_port);
if (!get_device_ids (udev_port, if (!get_device_ids (udev_port,
&self->priv->vendor, &self->priv->vendor,
&self->priv->product)) { &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 */ /* Create and store new port probe */
probe = mm_port_probe_new (self, udev_port); probe = mm_port_probe_new (self, udev_port);
self->priv->port_probes = g_list_prepend (self->priv->port_probes, probe); 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; return self->priv->udev_device_path;
} }
const gchar * const gchar **
mm_device_get_driver (MMDevice *self) mm_device_get_drivers (MMDevice *self)
{ {
return self->priv->driver; return (const gchar **)self->priv->drivers;
} }
guint16 guint16
@@ -636,7 +668,7 @@ finalize (GObject *object)
MMDevice *self = MM_DEVICE (object); MMDevice *self = MM_DEVICE (object);
g_free (self->priv->udev_device_path); 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); G_OBJECT_CLASS (mm_device_parent_class)->finalize (object);
} }

View File

@@ -74,18 +74,18 @@ gboolean mm_device_create_modem (MMDevice *self,
GError **error); GError **error);
void mm_device_remove_modem (MMDevice *self); void mm_device_remove_modem (MMDevice *self);
const gchar *mm_device_get_path (MMDevice *self); const gchar *mm_device_get_path (MMDevice *self);
const gchar *mm_device_get_driver (MMDevice *self); const gchar **mm_device_get_drivers (MMDevice *self);
guint16 mm_device_get_vendor (MMDevice *self); guint16 mm_device_get_vendor (MMDevice *self);
guint16 mm_device_get_product (MMDevice *self); guint16 mm_device_get_product (MMDevice *self);
GUdevDevice *mm_device_peek_udev_device (MMDevice *self); GUdevDevice *mm_device_peek_udev_device (MMDevice *self);
GUdevDevice *mm_device_get_udev_device (MMDevice *self); GUdevDevice *mm_device_get_udev_device (MMDevice *self);
void mm_device_set_plugin (MMDevice *self, void mm_device_set_plugin (MMDevice *self,
GObject *plugin); GObject *plugin);
GObject *mm_device_peek_plugin (MMDevice *self); GObject *mm_device_peek_plugin (MMDevice *self);
GObject *mm_device_get_plugin (MMDevice *self); GObject *mm_device_get_plugin (MMDevice *self);
MMBaseModem *mm_device_peek_modem (MMDevice *self); MMBaseModem *mm_device_peek_modem (MMDevice *self);
MMBaseModem *mm_device_get_modem (MMDevice *self); MMBaseModem *mm_device_get_modem (MMDevice *self);
GObject *mm_device_peek_port_probe (MMDevice *self, GObject *mm_device_peek_port_probe (MMDevice *self,
GUdevDevice *udev_port); GUdevDevice *udev_port);

View File

@@ -3185,14 +3185,14 @@ interface_initialization_step (InitializationContext *ctx)
g_free (device); g_free (device);
} }
/* Load driver if not done before */ /* Load driver if not done before */
if (!mm_gdbus_modem_get_driver (ctx->skeleton)) { if (!mm_gdbus_modem_get_drivers (ctx->skeleton)) {
gchar *driver; gchar **drivers;
g_object_get (ctx->self, g_object_get (ctx->self,
MM_BASE_MODEM_DRIVER, &driver, MM_BASE_MODEM_DRIVERS, &drivers,
NULL); NULL);
mm_gdbus_modem_set_driver (ctx->skeleton, driver); mm_gdbus_modem_set_drivers (ctx->skeleton, (const gchar * const *)drivers);
g_free (driver); g_strfreev (drivers);
} }
/* Load plugin if not done before */ /* Load plugin if not done before */
if (!mm_gdbus_modem_get_plugin (ctx->skeleton)) { 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_own_numbers (skeleton, NULL);
mm_gdbus_modem_set_device_identifier (skeleton, NULL); mm_gdbus_modem_set_device_identifier (skeleton, NULL);
mm_gdbus_modem_set_device (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_plugin (skeleton, NULL);
mm_gdbus_modem_set_equipment_identifier (skeleton, NULL); mm_gdbus_modem_set_equipment_identifier (skeleton, NULL);
mm_gdbus_modem_set_unlock_required (skeleton, MM_MODEM_LOCK_UNKNOWN); mm_gdbus_modem_set_unlock_required (skeleton, MM_MODEM_LOCK_UNKNOWN);

View File

@@ -199,34 +199,45 @@ apply_pre_probing_filters (MMPlugin *self,
* drivers are not supported. If that is the case, filter by driver */ * drivers are not supported. If that is the case, filter by driver */
if (self->priv->drivers || if (self->priv->drivers ||
self->priv->forbidden_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 */ /* Detect any modems accessible through the list of virtual ports */
driver = (is_virtual_port (g_udev_device_get_name (port)) ? drivers = (is_virtual_port (g_udev_device_get_name (port)) ?
"virtual" : virtual_drivers :
mm_device_get_driver (device)); mm_device_get_drivers (device));
/* If error retrieving driver: unsupported */ /* If error retrieving driver: unsupported */
if (!driver) if (!drivers)
return TRUE; return TRUE;
/* Filtering by allowed drivers */ /* Filtering by allowed drivers */
if (self->priv->drivers) { if (self->priv->drivers) {
for (i = 0; self->priv->drivers[i]; i++) { gboolean found = FALSE;
if (g_str_equal (driver, self->priv->drivers[i]))
break; 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 we didn't match any driver: unsupported */
if (!self->priv->drivers[i]) if (!found)
return TRUE; return TRUE;
} }
/* Filtering by forbidden drivers */ /* Filtering by forbidden drivers */
else { else {
for (i = 0; self->priv->forbidden_drivers[i]; i++) { for (i = 0; self->priv->forbidden_drivers[i]; i++) {
/* If we match a forbidden driver: unsupported */ guint j;
if (g_str_equal (driver, self->priv->forbidden_drivers[i]))
return TRUE; 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 */ /* Let the plugin create the modem from the port probe results */
modem = MM_PLUGIN_GET_CLASS (self)->create_modem (MM_PLUGIN (self), modem = MM_PLUGIN_GET_CLASS (self)->create_modem (MM_PLUGIN (self),
mm_device_get_path (device), mm_device_get_path (device),
mm_device_get_driver (device), mm_device_get_drivers (device),
mm_device_get_vendor (device), mm_device_get_vendor (device),
mm_device_get_product (device), mm_device_get_product (device),
port_probes, port_probes,

View File

@@ -84,7 +84,7 @@ struct _MMPluginClass {
* a list of port probes (Mandatory) */ * a list of port probes (Mandatory) */
MMBaseModem *(*create_modem) (MMPlugin *plugin, MMBaseModem *(*create_modem) (MMPlugin *plugin,
const gchar *sysfs_path, const gchar *sysfs_path,
const gchar *driver, const gchar **drivers,
guint16 vendor, guint16 vendor,
guint16 product, guint16 product,
GList *probes, GList *probes,