Stellarium  0.90.0
Classes | Typedefs | Enumerations | Functions | Variables
SyncProtocol Namespace Reference

Contains sync protocol data definitions shared between client and server. More...

Classes

class  Alive
 
class  ClientChallengeResponse
 
class  ErrorMessage
 
class  Fov
 
class  Location
 
class  Selection
 
class  ServerChallenge
 
class  ServerChallengeResponseValid
 This is just a notify message with no data, so no serialize/deserialize. More...
 
class  StelPropertyUpdate
 
struct  SyncHeader
 All messages are preceded by this. More...
 
class  SyncMessage
 Base interface for the messages themselves, allowing to serialize/deserialize them. More...
 
class  Time
 
class  View
 

Typedefs

typedef quint16 tPayloadSize
 

Enumerations

enum  SyncMessageType {
  ERROR, SERVER_CHALLENGE, CLIENT_CHALLENGE_RESPONSE, SERVER_CHALLENGERESPONSEVALID,
  ALIVE, TIME, LOCATION, SELECTION,
  STELPROPERTY, VIEW, FOV, MSGTYPE_MAX = FOV,
  MSGTYPE_SIZE = MSGTYPE_MAX+1
}
 Contains the possible message types. More...
 

Functions

QDataStream & operator<< (QDataStream &out, const SyncHeader &header)
 Write a SyncHeader to a DataStream. More...
 
QDataStream & operator>> (QDataStream &in, SyncHeader &header)
 Read a SyncHeader from a DataStream. More...
 
QDebug & operator<< (QDebug &deb, SyncMessageType msg)
 

Variables

const quint8 SYNC_PROTOCOL_VERSION = 2
 Should be changed with every breaking change. More...
 
const QDataStream::Version SYNC_DATASTREAM_VERSION = QDataStream::Qt_5_0
 
const QByteArray SYNC_MAGIC_VALUE = "StellariumSyncPluginProtocol"
 Magic value for protocol used during connection. Should NEVER change. More...
 
const qint64 SYNC_HEADER_SIZE = sizeof(quint8) + sizeof(tPayloadSize)
 
const qint64 SYNC_MAX_PAYLOAD_SIZE = (2<<15) - 1
 
const qint64 SYNC_MAX_MESSAGE_SIZE = SYNC_HEADER_SIZE + SYNC_MAX_PAYLOAD_SIZE
 

Detailed Description

Contains sync protocol data definitions shared between client and server.

Enumeration Type Documentation

Contains the possible message types.

The enum value is used as an ID to identify the message type over the network. The classes handling these messages are defined in SyncMessages.hpp

Definition at line 60 of file SyncProtocol.hpp.

Function Documentation

QDataStream& SyncProtocol::operator<< ( QDataStream &  out,
const SyncHeader header 
)

Write a SyncHeader to a DataStream.

QDataStream& SyncProtocol::operator>> ( QDataStream &  in,
SyncHeader header 
)

Read a SyncHeader from a DataStream.

Variable Documentation

const QByteArray SyncProtocol::SYNC_MAGIC_VALUE = "StellariumSyncPluginProtocol"

Magic value for protocol used during connection. Should NEVER change.

Definition at line 38 of file SyncProtocol.hpp.

const quint8 SyncProtocol::SYNC_PROTOCOL_VERSION = 2

Should be changed with every breaking change.

Definition at line 35 of file SyncProtocol.hpp.