From b3d3a1f1d4f9739a506990edefcd2d81502368d4 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Fri, 16 Nov 2012 12:00:53 +0000 Subject: Added registerProtocol and unRegisterProtocol to the Protocol classes. Now the Protocol Dialog can get data from the protocol, when the Tracker is running. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@192 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp') diff --git a/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp b/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp index 0eba8333..d5ba964d 100644 --- a/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp +++ b/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp @@ -39,13 +39,13 @@ //#define LOG_OUTPUT /** constructor **/ -FTNoIR_Protocol_FG::FTNoIR_Protocol_FG() +FTNoIR_Protocol::FTNoIR_Protocol() { loadSettings(); } /** destructor **/ -FTNoIR_Protocol_FG::~FTNoIR_Protocol_FG() +FTNoIR_Protocol::~FTNoIR_Protocol() { if (inSocket != 0) { inSocket->close(); @@ -59,12 +59,12 @@ FTNoIR_Protocol_FG::~FTNoIR_Protocol_FG() } /** helper to Auto-destruct **/ -void FTNoIR_Protocol_FG::Release() +void FTNoIR_Protocol::Release() { delete this; } -void FTNoIR_Protocol_FG::Initialize() +void FTNoIR_Protocol::Initialize() { return; } @@ -72,7 +72,7 @@ void FTNoIR_Protocol_FG::Initialize() // // Load the current Settings from the currently 'active' INI-file. // -void FTNoIR_Protocol_FG::loadSettings() { +void FTNoIR_Protocol::loadSettings() { QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER) QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); @@ -97,7 +97,7 @@ void FTNoIR_Protocol_FG::loadSettings() { // // Update Headpose in Game. // -void FTNoIR_Protocol_FG::sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) { +void FTNoIR_Protocol::sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) { int no_bytes; QHostAddress sender; quint16 senderPort; @@ -183,7 +183,7 @@ char data[100]; // Check if the Client DLL exists and load it (to test it), if so. // Returns 'true' if all seems OK. // -bool FTNoIR_Protocol_FG::checkServerInstallationOK( HANDLE handle ) +bool FTNoIR_Protocol::checkServerInstallationOK( HANDLE handle ) { // Init. the data FlightData.x = 0.0f; @@ -224,7 +224,7 @@ bool FTNoIR_Protocol_FG::checkServerInstallationOK( HANDLE handle ) // // Return a name, if present the name from the Game, that is connected... // -void FTNoIR_Protocol_FG::getNameFromGame( char *dest ) +void FTNoIR_Protocol::getNameFromGame( char *dest ) { sprintf_s(dest, 99, "FlightGear"); return; @@ -241,5 +241,5 @@ void FTNoIR_Protocol_FG::getNameFromGame( char *dest ) FTNOIR_PROTOCOL_BASE_EXPORT IProtocolPtr __stdcall GetProtocol() { - return new FTNoIR_Protocol_FG; + return new FTNoIR_Protocol; } -- cgit v1.2.3