summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Protocol_Base
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-28 13:40:18 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-28 13:40:18 +0000
commit75360443eb879b49a72c11b2a3d2d299ca61f9d7 (patch)
treefdab3ff501710e19f31f63815957a1fe86dbcb88 /FTNoIR_Protocol_Base
parentee53c49af9789553fb51987bd6003ce30344e173 (diff)
Modified sendHeadposeToGame, so it also sends raw data.
Unified the code by adding the Dll class to the protocols and moving the dialog to a separate source. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@173 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Protocol_Base')
-rw-r--r--FTNoIR_Protocol_Base/ftnoir_protocol_base.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/FTNoIR_Protocol_Base/ftnoir_protocol_base.h b/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
index 76f5ecc7..214aae7f 100644
--- a/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
+++ b/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
@@ -58,12 +58,8 @@ struct IProtocol
virtual ~IProtocol() {}
virtual void Initialize() = 0;
virtual bool checkServerInstallationOK ( HANDLE handle ) = 0;
- virtual void sendHeadposeToGame( THeadPoseData *headpose ) = 0;
+ virtual void sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) = 0;
virtual void getNameFromGame( char *dest ) = 0; // Take care dest can handle up to 100 chars...
-
- virtual void getFullName(QString *strToBeFilled) = 0;
- virtual void getShortName(QString *strToBeFilled) = 0;
- virtual void getDescription(QString *strToBeFilled) = 0;
};
typedef IProtocol* IProtocolPtr;
@@ -85,6 +81,26 @@ struct IProtocolDialog
{
virtual ~IProtocolDialog() {}
virtual void Initialize(QWidget *parent) = 0;
+};
+
+typedef IProtocolDialog* IProtocolDialogPtr;
+
+// Factory function that creates instances of the Protocol object.
+EXTERN_C
+FTNOIR_PROTOCOL_BASE_EXPORT
+IProtocolDialogPtr
+__stdcall
+GetProtocolDialog(void);
+
+////////////////////////////////////////////////////////////////////////////////
+// COM-Like abstract interface.
+// This interface doesn't require __declspec(dllexport/dllimport) specifier.
+// Method calls are dispatched via virtual table.
+// Any C++ compiler can use it.
+// Instances are obtained via factory function.
+struct IProtocolDll
+{
+ virtual ~IProtocolDll() {}
virtual void getFullName(QString *strToBeFilled) = 0;
virtual void getShortName(QString *strToBeFilled) = 0;
@@ -92,14 +108,14 @@ struct IProtocolDialog
virtual void getIcon(QIcon *icon) = 0;
};
-typedef IProtocolDialog* IProtocolDialogPtr;
+typedef IProtocolDll* IProtocolDllPtr;
// Factory function that creates instances of the Protocol object.
EXTERN_C
FTNOIR_PROTOCOL_BASE_EXPORT
-IProtocolDialogPtr
+IProtocolDllPtr
__stdcall
-GetProtocolDialog(void);
+GetProtocolDll(void);
#endif // FTNOIR_PROTOCOL_BASE_H