summaryrefslogtreecommitdiffhomepage
path: root/opentrack/selected-libraries.cpp
blob: e3bac0c56e138def83092bee5b3447e78d5862bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "opentrack/selected-libraries.hpp"
#include <QDebug>

SelectedLibraries::SelectedLibraries(QFrame* frame, mem<ITracker> t, dylibptr p, mem<IFilter> f) :
    pTracker(nullptr),
    pFilter(nullptr),
    pProtocol(nullptr),
    correct(false)
{
    pTracker = t;
    pProtocol = make_dylib_instance<IProtocol>(p);
    pFilter = f;

    if (!pTracker || !pProtocol)
    {
        qDebug() << "dylib load failure";
        return;
    }

    if(!pProtocol->correct())
    {
        qDebug() << "protocol load failure";
        return;
    }

    pTracker->start_tracker(frame);

    correct = true;
}