filter: additional strict rules when all device ports available
All the previous filter rules were applicable per-port independently. But, we also want to apply rules on a port based on the existence of other ports on the same device (e.g. allow TTY if the device also has a NET port). In this case, we need to wait for all ports to appear and then apply the additional rules. We re-use the "min wait time" timeout in the plugin-manager for this same purpose. This timeout is setup to wait for ports to appear before starting the probing process (e.g. so that plugin filters like the forbidden-drivers one work). The very same timeout can therefore be used to check whether we start the probing or not based on additional filter rules.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "mm-device.h"
|
||||
#include "mm-plugin.h"
|
||||
#include "mm-filter.h"
|
||||
#include "mm-base-modem.h"
|
||||
|
||||
#define MM_TYPE_PLUGIN_MANAGER (mm_plugin_manager_get_type ())
|
||||
@@ -32,6 +33,7 @@
|
||||
#define MM_PLUGIN_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_MANAGER, MMPluginManagerClass))
|
||||
|
||||
#define MM_PLUGIN_MANAGER_PLUGIN_DIR "plugin-dir" /* Construct-only */
|
||||
#define MM_PLUGIN_MANAGER_FILTER "filter" /* Construct-only */
|
||||
|
||||
typedef struct _MMPluginManager MMPluginManager;
|
||||
typedef struct _MMPluginManagerClass MMPluginManagerClass;
|
||||
@@ -48,6 +50,7 @@ struct _MMPluginManagerClass {
|
||||
|
||||
GType mm_plugin_manager_get_type (void);
|
||||
MMPluginManager *mm_plugin_manager_new (const gchar *plugindir,
|
||||
MMFilter *filter,
|
||||
GError **error);
|
||||
void mm_plugin_manager_device_support_check (MMPluginManager *self,
|
||||
MMDevice *device,
|
||||
|
||||
Reference in New Issue
Block a user