Stellarium  0.17.0
Data Structures | Typedefs | Enumerations | Functions | Variables
SyncProtocol Namespace Reference

Contains sync protocol data definitions shared between client and server.

Data Structures

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.
 
QDataStream & operator>> (QDataStream &in, SyncHeader &header)
 Read a SyncHeader from a DataStream.
 
QDebug & operator<< (QDebug &deb, SyncMessageType msg)
 

Variables

const quint8 SYNC_PROTOCOL_VERSION = 2
 Should be changed with every breaking change.
 
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.
 
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
 

Data Structure Documentation

struct SyncProtocol::SyncHeader
Data Fields
tPayloadSize dataSize
quint8 msgType

Enumeration Type Documentation

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