aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-base.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-05-05 10:32:48 +0200
committerAleksander Morgado <aleksander@lanedo.com>2011-06-06 17:20:17 +0200
commit5a2078a2a5f012772612dea0921b147bf6d75d88 (patch)
tree9dfbb4ecbf7a15c2ba2d656a5d2d2bc776f38b9c /src/mm-plugin-base.h
parent9578e1b9cab988b11bf9a4cd1af3842cdfb1eb28 (diff)
plugin base: include vendor ID and product ID retrieval during AT port probing
Port probing is extended to also query for Vendor ID and Product ID. This allows plugins to check whether the reported IDs are expected, and thus we enable plugins to handle modems connected via RS232 ports (where udev doesn't give any vendor ID) or modems connected via a USB adapter (where udev gives the vendor ID of the adapter). Note that this effectively means that a plugin which expects these kind of modem connections will end up always launching port probing as they won't only rely on the vendor ID reported by udev.
Diffstat (limited to 'src/mm-plugin-base.h')
-rw-r--r--src/mm-plugin-base.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h
index 799f6813..91b3b8df 100644
--- a/src/mm-plugin-base.h
+++ b/src/mm-plugin-base.h
@@ -56,7 +56,7 @@ typedef struct {
GType mm_plugin_base_supports_task_get_type (void);
-/*
+/*
* response: the response string from the modem, if no error occurred
* error: the error returned by the modem or serial stack, if any
* tries: number of times the custom init command has been sent to the modem
@@ -86,6 +86,10 @@ const char *mm_plugin_base_supports_task_get_driver (MMPluginBaseSupportsTask *t
guint32 mm_plugin_base_supports_task_get_probed_capabilities (MMPluginBaseSupportsTask *task);
+const gchar *mm_plugin_base_supports_task_get_probed_vendor (MMPluginBaseSupportsTask *task);
+
+const gchar *mm_plugin_base_supports_task_get_probed_product (MMPluginBaseSupportsTask *task);
+
void mm_plugin_base_supports_task_complete (MMPluginBaseSupportsTask *task,
guint32 level);
@@ -159,5 +163,11 @@ gboolean mm_plugin_base_get_cached_port_capabilities (MMPluginBase *self,
GUdevDevice *port,
guint32 *capabilities);
+/* Returns TRUE if the port was previously probed, FALSE if not */
+gboolean mm_plugin_base_get_cached_product_info (MMPluginBase *self,
+ GUdevDevice *port,
+ gchar **vendor,
+ gchar **product);
+
#endif /* MM_PLUGIN_BASE_H */