X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Flibs%2FPlugins%2Fpluginmanager.h;h=f79193c1ab89034575fea35550a4d63456be0884;hb=f26e65c1e66cf02eae9aa209acac743e3b04b4f4;hp=2f320f97b54d0eab2ce57ccae5256976686e8846;hpb=814d12e0a340ae11fa4a22077b37316aa41716d7;p=evaf
diff --git a/src/libs/Plugins/pluginmanager.h b/src/libs/Plugins/pluginmanager.h
index 2f320f9..f79193c 100644
--- a/src/libs/Plugins/pluginmanager.h
+++ b/src/libs/Plugins/pluginmanager.h
@@ -1,5 +1,5 @@
/**
- * @file plugins/pluginmanager.h
+ * @file Plugins/pluginmanager.h
* @brief Manager for loadable modules (plugins)
*
* Copyright (c) 2011 Enar Vaikene
@@ -24,6 +24,9 @@
#include
#include
+#include
+
+namespace eVaf {
/**
* Library for managing loadable modules (plugins).
@@ -44,6 +47,25 @@ namespace Internal {
class PluginManagerPrivate;
}
+/**
+ * Expands plugin names for the selected platform.
+ * @param name Name of the plugin
+ * @return Expanded plugin name
+ *
+ * This function expands the plugin name so that it becomes valid for the selected platform.
+ * For example, on Linux it adds the prefix "lib" to the beginning and extension ".so" to the end.
+ */
+inline QString expandPluginName(QString const & name)
+{
+#ifdef Q_OS_WIN32
+ return name + ".dll";
+#elif defined Q_OS_LINUX
+ return "lib" + name + ".so";
+#else
+ return name;
+#endif
+}
+
/**
* Plugin manager for eVaf applications.
*/
@@ -101,11 +123,11 @@ signals:
private:
- Internal::PluginManagerPrivate * dl;
+ Internal::PluginManagerPrivate * d;
};
-} // namespace Plugins
-
+} // namespace eVaf::Plugins
+} // namespace eVaf
#endif // pluginmanager.h