4 #ifndef DIRECTPLAY_CLIENT_H
5 #define DIRECTPLAY_CLIENT_H
7 #include <QReadWriteLock>
8 #include <QScopedPointer>
10 #include "directplaypeer.h"
23 namespace swift::simplugin::fs9
78 virtual void timerEvent(QTimerEvent *event)
override;
82 HRESULT enumDirectPlayHosts();
85 HRESULT createHostAddress();
91 HRESULT closeConnection();
95 void sendMultiplayerPositionAndPartsFromInterpolation();
96 void sendMultiplayerChangePlayerPlane();
99 void handleConnectionCompleted();
102 const swift::coree::ISimulator *simulator()
const;
110 IDirectPlay8Address *m_hostAddress =
nullptr;
114 DPN_PLAYER_INFO m_player;
Interface to a simulator.
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of aircraft's parts.
Value object encapsulating information of an aircraft's situation.
Value object encapsulating information of a callsign.
InterpolatorMode
Interpolator type.
Record internal state of interpolator for debugging.
Multiplexed interpolator which allows switching between modes at runtime.
Comprehensive information of an aircraft.
DirectPlay peer implementation More information can be found in the DirectX9 SDK documentation http:/...
Class faking a FS9 multiplayer client connection.
const swift::misc::simulation::CInterpolatorMulti * getInterpolator() const
Get interpolator.
CFs9Client(const swift::misc::simulation::CSimulatedAircraft &remoteAircraft, const swift::misc::physical_quantities::CTime &updateInterval, swift::misc::simulation::CInterpolationLogger *logger, swift::core::ISimulator *simulator)
Constructor.
void setHostAddress(const QString &hostAddress)
Set DirectPlay host address.
virtual ~CFs9Client()
Destructor.
void sendMultiplayerParts(const swift::misc::aviation::CAircraftParts &parts)
Send parts (lights, gear ...)
swift::misc::simulation::CInterpolatorMulti * getInterpolator()
Get interpolator.
void sendMultiplayerPosition(const swift::misc::aviation::CAircraftSituation &situation)
Send a situation (position)
void sendTextMessage(const QString &textMessage)
Send new text message.
void start()
Starts the FS9 client messaging.
swift::misc::CStatusMessageList getInterpolationMessages(swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
Interpolation messages.
void statusChanged(const swift::misc::simulation::CSimulatedAircraft &remoteAircraft, swift::simplugin::fs9::CFs9Client::ClientStatus)
Client status changed.
virtual void timerEvent(QTimerEvent *event)
ClientStatus
Connection status.
Backend services of the swift project, like dealing with the network or the simulators.