swift
|
Class encapsulating a FS9 host. More...
Public Types | |
enum | HostStatus { Hosting , Terminated } |
Connection status. | |
Public Slots | |
void | sendTextMessage (const QString &textMessage) |
Send new text message. | |
![]() | |
HRESULT | sendMessage (const QByteArray &data) |
Send a custom DirectPlay message. More... | |
void | reset () |
Reset peer. | |
Signals | |
void | statusChanged (swift::simplugin::fs9::CFs9Host::HostStatus) |
Hosting status changed. | |
![]() | |
void | customPacketReceived (const QByteArray &data) |
Received custom FS9 packet. | |
void | connectionComplete () |
Async operatione complete. | |
Public Member Functions | |
CFs9Host (QObject *parent=nullptr) | |
Constructor. | |
virtual | ~CFs9Host () |
Destructor. | |
bool | isConnected () const |
Returns true if the users simulator is connected. | |
QString | getHostAddress () |
Get DirectPlay host url. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
static const QStringList & | getLogCategories () |
Log categories. | |
![]() | |
using | TCallbackWrapper = CallbackWrapper< CDirectPlayPeer, HRESULT, DWORD, void * > |
DirectPlay peer message handler wrapper. | |
![]() | |
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. | |
![]() | |
const swift::misc::aviation::CCallsign | m_callsign |
Peer callsign. | |
IDirectPlay8Peer * | m_directPlayPeer = nullptr |
DirectPlay peer address. | |
IDirectPlay8Address * | m_deviceAddress = nullptr |
DirectPlay device address. | |
QList< CHostNode > | m_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. | |