4 #ifndef SWIFT_SIMPLUGIN_FS9_DIRECTPLAY_PEER_H
5 #define SWIFT_SIMPLUGIN_FS9_DIRECTPLAY_PEER_H
14 #include <QScopedPointer>
16 #include "callbackwrapper.h"
23 namespace swift::simplugin::fs9
25 HRESULT
inline s_success_pending() {
return DPNSUCCESS_PENDING; }
26 bool inline isPending(HRESULT hr) {
return hr == s_success_pending(); }
99 bool m_coInitializeSucceeded =
false;
Value object encapsulating information of a callsign.
DirectPlay peer implementation More information can be found in the DirectX9 SDK documentation http:/...
HRESULT directPlayMessageHandler(DWORD messageId, void *msgBuffer)
DirectPlay message handler.
std::atomic< DPNID > m_playerLocal
Local player Id.
bool isServiceProviderValid(const GUID *pGuidSP)
Returns true of the service provider is a valid on this machine.
HRESULT createHostAddress()
Creates a new DirectPlay device address.
QList< CHostNode > m_hostNodeList
List of enumerated hosts.
std::atomic< DPNID > m_playerUser
User player Id.
static const QStringList & getLogCategories()
Log categories.
IDirectPlay8Peer * m_directPlayPeer
DirectPlay peer address.
HRESULT initDirectPlay()
Initialize DirectPlay.
virtual ~CDirectPlayPeer()
Destructor.
IDirectPlay8Address * m_deviceAddress
DirectPlay device address.
void connectionComplete()
Async operatione complete.
CDirectPlayPeer(const swift::misc::aviation::CCallsign &callsign, QObject *parent=nullptr)
Constructor.
HRESULT sendMessage(const QByteArray &data)
Send a custom DirectPlay message.
DPNID getPlayerUserId() const
Returns users DirectPlay ID.
quint32 m_packetIndex
Multiplayer packet index.
TCallbackWrapper m_callbackWrapper
Callback wrapper.
const swift::misc::aviation::CCallsign m_callsign
Peer callsign.
void customPacketReceived(const QByteArray &data)
Received custom FS9 packet.
void setPlayerUserId(DPNID id)
Sets users DirectPlay ID.
HRESULT createDeviceAddress()
Creates a new DirectPlay device address.
unsigned long DWORD
Fake Windows DWORD.