aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-05-05 13:19:32 +0200
committerAleksander Morgado <aleksander@lanedo.com>2011-06-06 17:20:17 +0200
commitdf0d9b480c0db825126c7ebbb36bdd958bf59761 (patch)
treee28fdd56862d763c8da6e4e2bbd22a89de9dfac1 /src/mm-plugin.h
parent5a2078a2a5f012772612dea0921b147bf6d75d88 (diff)
plugin base: let plugins decide if they should be sorted last
Note that even if a plugin says it wants to be sorted last, the generic plugin will always be the last one. Also, there is no order guaranteed between two plugins that request to be sorted last.
Diffstat (limited to 'src/mm-plugin.h')
-rw-r--r--src/mm-plugin.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mm-plugin.h b/src/mm-plugin.h
index 4f1dfc09..07e3ee09 100644
--- a/src/mm-plugin.h
+++ b/src/mm-plugin.h
@@ -54,9 +54,14 @@ typedef enum {
struct _MMPlugin {
GTypeInterface g_iface;
- /* Methods */
+ /* Get plugin name */
const char *(*get_name) (MMPlugin *self);
+ /* Returns TRUE if the plugin should be sorted last in the list of plugins
+ * loaded. This is useful to indicate plugins that need an additional check
+ * on the probed vendor ID to see if they can support it. */
+ gboolean (*get_sort_last) (const MMPlugin *self);
+
/* Check whether a plugin supports a particular modem port, and what level
* of support the plugin has for the device. If the plugin can immediately
* determine whether a port is unsupported, it should return
@@ -104,6 +109,8 @@ GType mm_plugin_get_type (void);
const char *mm_plugin_get_name (MMPlugin *plugin);
+gboolean mm_plugin_get_sort_last (const MMPlugin *plugin);
+
MMPluginSupportsResult mm_plugin_supports_port (MMPlugin *plugin,
const char *subsys,
const char *name,