summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_wine
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:50 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:50 +0200
commita8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch)
treecd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_protocol_wine
parent0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff)
update modules to refactored API
Diffstat (limited to 'ftnoir_protocol_wine')
-rw-r--r--ftnoir_protocol_wine/ftnoir_protocol_wine.cpp4
-rw-r--r--ftnoir_protocol_wine/ftnoir_protocol_wine.h22
-rw-r--r--ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp2
-rw-r--r--ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp8
4 files changed, 11 insertions, 25 deletions
diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp
index 29a2a70c..db030554 100644
--- a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp
+++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp
@@ -29,7 +29,7 @@ FTNoIR_Protocol::~FTNoIR_Protocol()
//shm_unlink("/" WINE_SHM_NAME);
}
-void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) {
+void FTNoIR_Protocol::pose( const double *headpose ) {
if (shm)
{
lck_shm.lock();
@@ -51,7 +51,7 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) {
}
}
-bool FTNoIR_Protocol::checkServerInstallationOK()
+bool FTNoIR_Protocol::correct()
{
return lck_shm.success();
}
diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.h b/ftnoir_protocol_wine/ftnoir_protocol_wine.h
index 9a7fb7d5..685c3010 100644
--- a/ftnoir_protocol_wine/ftnoir_protocol_wine.h
+++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.h
@@ -18,9 +18,9 @@ public:
FTNoIR_Protocol();
~FTNoIR_Protocol() override;
- bool checkServerInstallationOK();
- void sendHeadposeToGame(const double* headpose);
- QString getGameName() {
+ bool correct();
+ void pose(const double* headpose);
+ QString game_name() {
QMutexLocker foo(&game_name_mutex);
return connected_game;
}
@@ -33,13 +33,13 @@ private:
QMutex game_name_mutex;
};
-class FTControls: public QWidget, public IProtocolDialog
+class FTControls: public IProtocolDialog
{
Q_OBJECT
public:
FTControls();
- void registerProtocol(IProtocol *) {}
- void unRegisterProtocol() {}
+ void register_protocol(IProtocol *) {}
+ void unregister_protocol() {}
private:
Ui::UICFTControls ui;
@@ -52,12 +52,6 @@ private slots:
class FTNoIR_ProtocolDll : public Metadata
{
public:
- FTNoIR_ProtocolDll();
- ~FTNoIR_ProtocolDll();
-
- void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("Wine"); }
- void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("Wine"); }
- void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("Wine glue wrapper"); }
-
- void getIcon(QIcon *icon) { *icon = QIcon(":/images/wine.png"); }
+ QString name() { return QString("Wine -- Windows layer for Unix"); }
+ QIcon icon() { return QIcon(":/images/wine.png"); }
};
diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp
index c092de42..4e3d72ac 100644
--- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp
+++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dialog.cpp
@@ -2,7 +2,7 @@
#include <QDebug>
#include "facetracknoir/plugin-support.h"
-FTControls::FTControls() : QWidget()
+FTControls::FTControls()
{
ui.setupUi( this );
connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp
index c6e3d433..df26e49f 100644
--- a/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp
+++ b/ftnoir_protocol_wine/ftnoir_protocol_wine_dll.cpp
@@ -1,14 +1,6 @@
#include "ftnoir_protocol_wine.h"
#include "facetracknoir/plugin-support.h"
-FTNoIR_ProtocolDll::FTNoIR_ProtocolDll()
-{
-}
-
-FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll()
-{
-}
-
extern "C" OPENTRACK_EXPORT Metadata* GetMetadata()
{
return new FTNoIR_ProtocolDll;