sources/network/rconsession.h

branch
experimental
changeset 40
cf85b5f77541
parent 39
052393cf9016
child 41
9ab869656b9e
equal deleted inserted replaced
39:052393cf9016 40:cf85b5f77541
35 35
36 // ------------------------------------------------------------------------------------------------- 36 // -------------------------------------------------------------------------------------------------
37 // 37 //
38 enum 38 enum
39 { 39 {
40 RCON_PROTOCOL_VERSION = 4 40 RCON_PROTOCOL_VERSION = 3
41 }; 41 };
42 42
43 // ------------------------------------------------------------------------------------------------- 43 // -------------------------------------------------------------------------------------------------
44 // 44 //
45 enum ServerResponse 45 enum ServerResponse
49 SVRC_SALT, 49 SVRC_SALT,
50 SVRC_LOGGEDIN, 50 SVRC_LOGGEDIN,
51 SVRC_INVALIDPASSWORD, 51 SVRC_INVALIDPASSWORD,
52 SVRC_MESSAGE, 52 SVRC_MESSAGE,
53 SVRC_UPDATE, 53 SVRC_UPDATE,
54 SVRC_TABCOMPLETE,
55 SVRC_TOOMANYTABCOMPLETES,
56 }; 54 };
57 55
58 // ------------------------------------------------------------------------------------------------- 56 // -------------------------------------------------------------------------------------------------
59 // 57 //
60 enum ClientRequest 58 enum ClientRequest
62 CLRC_BEGINCONNECTION = 52, 60 CLRC_BEGINCONNECTION = 52,
63 CLRC_PASSWORD, 61 CLRC_PASSWORD,
64 CLRC_COMMAND, 62 CLRC_COMMAND,
65 CLRC_PONG, 63 CLRC_PONG,
66 CLRC_DISCONNECT, 64 CLRC_DISCONNECT,
67 CLRC_TABCOMPLETE,
68 }; 65 };
69 66
70 // ------------------------------------------------------------------------------------------------- 67 // -------------------------------------------------------------------------------------------------
71 // 68 //
72 enum RCONUpdateType 69 enum RCONUpdateType
108 METHOD bump_last_ping() -> void; 105 METHOD bump_last_ping() -> void;
109 METHOD send_command (const String& message) -> bool; 106 METHOD send_command (const String& message) -> bool;
110 METHOD state() const -> RCONSessionState; 107 METHOD state() const -> RCONSessionState;
111 METHOD level() const -> const String&; 108 METHOD level() const -> const String&;
112 METHOD is_active() const -> bool; 109 METHOD is_active() const -> bool;
113 METHOD request_tab_complete (const String& part) -> void;
114 110
115 static METHOD new_session() -> RCONSession*; 111 static METHOD new_session() -> RCONSession*;
116 static METHOD get_session() -> RCONSession*; 112 static METHOD get_session() -> RCONSession*;
117 113
118 private: 114 private:
126 String m_salt; 122 String m_salt;
127 int m_serverProtocol; 123 int m_serverProtocol;
128 String m_hostname; 124 String m_hostname;
129 int m_numAdmins; 125 int m_numAdmins;
130 String m_level; 126 String m_level;
131 String m_lastTabComplete;
132 }; 127 };

mercurial