summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/plugin-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/plugin-support.h')
-rw-r--r--facetracknoir/plugin-support.h37
1 files changed, 11 insertions, 26 deletions
diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h
index 7f8e3c28..83856922 100644
--- a/facetracknoir/plugin-support.h
+++ b/facetracknoir/plugin-support.h
@@ -11,31 +11,14 @@
#include <memory>
template<typename t> using ptr = std::shared_ptr<t>;
-class IDynamicLibraryProvider;
-
-struct SelectedLibraries {
-public:
- ITracker* pTracker;
- IFilter* pFilter;
- IProtocol* pProtocol;
- SelectedLibraries(IDynamicLibraryProvider* main = NULL);
- ~SelectedLibraries();
- bool correct;
-};
-
-extern SelectedLibraries* Libraries;
-
-struct Metadata;
-
extern "C" typedef void* (*CTOR_FUNPTR)(void);
extern "C" typedef Metadata* (*METADATA_FUNPTR)(void);
-extern "C" typedef void* (*DIALOG_FUNPTR)(void);
class DynamicLibrary {
public:
DynamicLibrary(const QString& filename);
~DynamicLibrary();
- DIALOG_FUNPTR Dialog;
+ CTOR_FUNPTR Dialog;
CTOR_FUNPTR Constructor;
METADATA_FUNPTR Metadata;
QString filename;
@@ -47,12 +30,14 @@ private:
#endif
};
+struct SelectedLibraries {
+ using dylib = ptr<DynamicLibrary>;
-// XXX TODO it can die if running tracker state separated into class -sh 20141004
-class IDynamicLibraryProvider {
-public:
- virtual ptr<DynamicLibrary> current_tracker1() = 0;
- virtual ptr<DynamicLibrary> current_protocol() = 0;
- virtual ptr<DynamicLibrary> current_filter() = 0;
- virtual QFrame* get_video_widget() = 0;
-};
+ ptr<ITracker> pTracker;
+ ptr<IFilter> pFilter;
+ ptr<IProtocol> pProtocol;
+ SelectedLibraries(QFrame* frame, dylib t, dylib p, dylib f);
+ SelectedLibraries() : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) {}
+ ~SelectedLibraries();
+ bool correct;
+}; \ No newline at end of file