mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 10:15:43 +08:00
refs #334 FS9 DirectPlay peer classes using CContinuousWorker.
This commit is contained in:
committed by
Roland Winklmeier
parent
2a1541786a
commit
195c909ca0
@@ -13,6 +13,7 @@
|
||||
#include "fs9.h"
|
||||
#include "host_node.h"
|
||||
#include "callback_wrapper.h"
|
||||
#include "blackmisc/worker.h"
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
@@ -26,14 +27,13 @@ namespace BlackSimPlugin
|
||||
namespace Fs9
|
||||
{
|
||||
//! DirectPlay peer implementation
|
||||
class CDirectPlayPeer : public QObject
|
||||
class CDirectPlayPeer : public BlackMisc::CContinuousWorker
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDirectPlayPeer(const QString &callsign, QObject *parent = nullptr);
|
||||
CDirectPlayPeer(QObject *owner, const QString &callsign);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CDirectPlayPeer();
|
||||
@@ -45,20 +45,14 @@ namespace BlackSimPlugin
|
||||
void setPlayerUserId(DPNID id) { m_playerUser = id; }
|
||||
|
||||
public slots:
|
||||
|
||||
//! Initialize DirectPlay host
|
||||
virtual void init() = 0;
|
||||
|
||||
//! Send a custom DirectPlay message
|
||||
HRESULT sendMessage(const QByteArray &data);
|
||||
|
||||
signals:
|
||||
|
||||
//! Received custom FS9 packet
|
||||
void customPacketReceived(const QByteArray &data);
|
||||
|
||||
protected:
|
||||
|
||||
//! DirectPlay message handler
|
||||
HRESULT directPlayMessageHandler(DWORD messageId, void *msgBuffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user