swift
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
swift::simplugin::fs9::CDirectPlayPeer Class Reference

DirectPlay peer implementation More information can be found in the DirectX9 SDK documentation http://doc.51windows.net/Directx9_SDK/?url=/Directx9_SDK/play/dplay.htm. More...

Inheritance diagram for swift::simplugin::fs9::CDirectPlayPeer:
[legend]

Public Slots

HRESULT sendMessage (const QByteArray &data)
 Send a custom DirectPlay message. More...
 
void reset ()
 Reset peer.
 

Signals

void customPacketReceived (const QByteArray &data)
 Received custom FS9 packet.
 
void connectionComplete ()
 Async operatione complete.
 

Public Member Functions

 CDirectPlayPeer (const swift::misc::aviation::CCallsign &callsign, QObject *parent=nullptr)
 Constructor.
 
virtual ~CDirectPlayPeer ()
 Destructor.
 
DPNID getPlayerUserId () const
 Returns users DirectPlay ID.
 
void setPlayerUserId (DPNID id)
 Sets users DirectPlay ID.
 

Static Public Member Functions

static const QStringList & getLogCategories ()
 Log categories.
 

Protected Types

using TCallbackWrapper = CallbackWrapper< CDirectPlayPeer, HRESULT, DWORD, void * >
 DirectPlay peer message handler wrapper.
 

Protected Member Functions

HRESULT directPlayMessageHandler (DWORD messageId, void *msgBuffer)
 DirectPlay message handler.
 
HRESULT initDirectPlay ()
 Initialize DirectPlay.
 
bool isServiceProviderValid (const GUID *pGuidSP)
 Returns true of the service provider is a valid on this machine.
 
HRESULT createDeviceAddress ()
 Creates a new DirectPlay device address.
 
HRESULT createHostAddress ()
 Creates a new DirectPlay device address.
 

Protected Attributes

const swift::misc::aviation::CCallsign m_callsign
 Peer callsign.
 
IDirectPlay8Peer * m_directPlayPeer = nullptr
 DirectPlay peer address.
 
IDirectPlay8Address * m_deviceAddress = nullptr
 DirectPlay device address.
 
QList< CHostNodem_hostNodeList
 List of enumerated hosts.
 
quint32 m_packetIndex = 0
 Multiplayer packet index.
 
std::atomic< DPNID > m_playerLocal = { 0 }
 Local player Id.
 
std::atomic< DPNID > m_playerUser = { 0 }
 User player Id.
 
TCallbackWrapper m_callbackWrapper
 Callback wrapper.
 

Detailed Description

DirectPlay peer implementation More information can be found in the DirectX9 SDK documentation http://doc.51windows.net/Directx9_SDK/?url=/Directx9_SDK/play/dplay.htm.

Definition at line 31 of file directplaypeer.h.

Member Function Documentation

◆ sendMessage

HRESULT swift::simplugin::fs9::CDirectPlayPeer::sendMessage ( const QByteArray &  data)
slot

Send a custom DirectPlay message.

Fixme:
KB 201707, style? pBufferData = const_cast<BYTE *>(reinterpret_cast<const BYTE *>(message.data()));

Definition at line 283 of file directplaypeer.cpp.


The documentation for this class was generated from the following files: