summaryrefslogtreecommitdiffhomepage
path: root/opentrack/plugin-support.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-07 07:24:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-07 08:09:31 +0200
commit71856701c8bedad3d992cb63620e695df8727812 (patch)
treefd84ea540955df1510aa0cfd24b599008ad13219 /opentrack/plugin-support.h
parentaa2de50523257778474c9c2ec8da8edbcb31cd8b (diff)
plugin-support: make header-only, expose as public API
Issue: #151 Some global namespace macros are now prefixed with "OPENTRACK_" to avoid namespace clashes. This header is now safe to include in third-party projects.
Diffstat (limited to 'opentrack/plugin-support.h')
-rw-r--r--opentrack/plugin-support.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/opentrack/plugin-support.h b/opentrack/plugin-support.h
deleted file mode 100644
index a2b6d403..00000000
--- a/opentrack/plugin-support.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#pragma once
-
-#include "plugin-api.hpp"
-#include "options.hpp"
-
-#include <QWidget>
-#include <QDebug>
-#include <QString>
-#include <QLibrary>
-#include <QFrame>
-#include <QList>
-
-
-extern "C" typedef void* (*CTOR_FUNPTR)(void);
-extern "C" typedef Metadata* (*METADATA_FUNPTR)(void);
-
-struct dylib {
- enum Type { Filter, Tracker, Protocol };
-
- dylib(const QString& filename, Type t);
- ~dylib();
- static QList<mem<dylib>> enum_libraries();
-
- Type type;
- QString filename;
-
- QIcon icon;
- QString name;
-
- CTOR_FUNPTR Dialog;
- CTOR_FUNPTR Constructor;
- METADATA_FUNPTR Meta;
-private:
-#if defined(_WIN32)
- QLibrary* handle;
-#else
- void* handle;
-#endif
-};
-
-struct SelectedLibraries {
- using dylibptr = mem<dylib>;
- mem<ITracker> pTracker;
- mem<IFilter> pFilter;
- mem<IProtocol> pProtocol;
- SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f);
- SelectedLibraries() : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) {}
- ~SelectedLibraries();
- bool correct;
-};