SuperTuxKart
Loading...
Searching...
No Matches
Classes | Enumerations
protocol.hpp File Reference

Generic protocols declarations. More...

#include "utils/no_copy.hpp"
#include "utils/types.hpp"
#include <memory>
#include <stddef.h>
Include dependency graph for protocol.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CallbackObject
 Class that must be inherited to pass objects to protocols. More...
 
class  Protocol
 Abstract class used to define the global protocol functions. More...
 

Enumerations

enum  ProtocolType {
  PROTOCOL_NONE = 0x00 , PROTOCOL_CONNECTION = 0x01 , PROTOCOL_LOBBY_ROOM = 0x02 , PROTOCOL_GAME_EVENTS = 0x03 ,
  PROTOCOL_CONTROLLER_EVENTS = 0x04 , PROTOCOL_SILENT = 0x05 , PROTOCOL_MAX , PROTOCOL_SYNCHRONOUS = 0x80
}
 The types that protocols can have. More...
 
enum  ProtocolState { PROTOCOL_STATE_INITIALISING , PROTOCOL_STATE_RUNNING , PROTOCOL_STATE_PAUSED , PROTOCOL_STATE_TERMINATED }
 Defines the three states that a protocol can have. More...
 

Detailed Description

Generic protocols declarations.

Enumeration Type Documentation

◆ ProtocolState

Defines the three states that a protocol can have.

Enumerator
PROTOCOL_STATE_INITIALISING 

The protocol is waiting to be started.

PROTOCOL_STATE_RUNNING 

The protocol is being updated everytime.

PROTOCOL_STATE_PAUSED 

The protocol is paused.

PROTOCOL_STATE_TERMINATED 

The protocol is terminated/does not exist.

◆ ProtocolType

The types that protocols can have.

This is used to select which protocol receives which event.

Enumerator
PROTOCOL_NONE 

No protocol type assigned.

PROTOCOL_CONNECTION 

Protocol that deals with client-server connection.

PROTOCOL_LOBBY_ROOM 

Protocol that is used during the lobby room phase.

PROTOCOL_GAME_EVENTS 

Protocol to communicate the game events.

PROTOCOL_CONTROLLER_EVENTS 

Protocol to transfer controller modifications.

PROTOCOL_SILENT 

Used for protocols that do not subscribe to any network event.

PROTOCOL_MAX 

Maximum number of different protocol types.

PROTOCOL_SYNCHRONOUS 

Flag, indicates synchronous delivery.