aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-manager.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-12-08 14:37:56 +0000
committerAleksander Morgado <aleksander@aleksander.es>2023-01-03 13:56:25 +0000
commit1c4da332ee6e0d948f85a63f74cb27e89075c011 (patch)
tree03a01bf796b4d435cd233c89ed3d05c562ed3fd1 /src/mm-plugin-manager.h
parent1dd70be4c834ba025ff16b343aa4032a8c64fb71 (diff)
build: new option to build plugins within the daemon binary
Instead of creating libmm-plugin* and libmm-shared* libraries that are dlopen()-ed on runtime, allow incorporating all plugins into the daemon binary itself. This makes the startup of the daemon much faster and also avoids issues with builds that require linker namespace isolation. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/674
Diffstat (limited to 'src/mm-plugin-manager.h')
-rw-r--r--src/mm-plugin-manager.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mm-plugin-manager.h b/src/mm-plugin-manager.h
index 79e7c1a1..f1ddcc29 100644
--- a/src/mm-plugin-manager.h
+++ b/src/mm-plugin-manager.h
@@ -32,7 +32,9 @@
#define MM_IS_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), MM_TYPE_PLUGIN_MANAGER))
#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 */
+#if !defined WITH_BUILTIN_PLUGINS
+# define MM_PLUGIN_MANAGER_PLUGIN_DIR "plugin-dir" /* Construct-only */
+#endif
#define MM_PLUGIN_MANAGER_FILTER "filter" /* Construct-only */
typedef struct _MMPluginManager MMPluginManager;
@@ -51,8 +53,10 @@ struct _MMPluginManagerClass {
GType mm_plugin_manager_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPluginManager, g_object_unref)
-MMPluginManager *mm_plugin_manager_new (const gchar *plugindir,
- MMFilter *filter,
+MMPluginManager *mm_plugin_manager_new (MMFilter *filter,
+#if !defined WITH_BUILTIN_PLUGINS
+ const gchar *plugindir,
+#endif
GError **error);
void mm_plugin_manager_device_support_check (MMPluginManager *self,
MMDevice *device,