summaryrefslogtreecommitdiffhomepage
path: root/logic/selected-libraries.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-12 18:00:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-12 18:00:49 +0200
commit9040b187a1c4fa380f8a12207b9dd6d04b3a10ac (patch)
tree115e1351571d690c1261a9d512e6d44e717f3051 /logic/selected-libraries.cpp
parent13a18b149764509a3f460be86590250cdcf690fb (diff)
all: rename modules s#^opentrack-##. and opentrack -> api
Adjust usages.
Diffstat (limited to 'logic/selected-libraries.cpp')
-rw-r--r--logic/selected-libraries.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/logic/selected-libraries.cpp b/logic/selected-libraries.cpp
new file mode 100644
index 00000000..4a1a9f09
--- /dev/null
+++ b/logic/selected-libraries.cpp
@@ -0,0 +1,37 @@
+#include "selected-libraries.hpp"
+#include <QDebug>
+
+SelectedLibraries::SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f) :
+ pTracker(nullptr),
+ pFilter(nullptr),
+ pProtocol(nullptr),
+ correct(false)
+{
+ pProtocol = make_dylib_instance<IProtocol>(p);
+
+ if (!pProtocol)
+ {
+ qDebug() << "protocol dylib load failure";
+ return;
+ }
+
+ if(!pProtocol->correct())
+ {
+ qDebug() << "protocol load failure";
+ pProtocol = nullptr;
+ return;
+ }
+
+ pTracker = make_dylib_instance<ITracker>(t);
+ pFilter = make_dylib_instance<IFilter>(f);
+
+ if (!pTracker)
+ {
+ qDebug() << "tracker dylib load failure";
+ return;
+ }
+
+ pTracker->start_tracker(frame);
+
+ correct = true;
+}