diff options
Diffstat (limited to 'FTNoIR_Protocol_Base')
-rw-r--r-- | FTNoIR_Protocol_Base/ftnoir_protocol_base.h | 32 |
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
|