sources/network/rconsession.h

changeset 72
1b9c53e0c846
parent 71
4f7c2c944637
child 73
07dda51a7a8e
equal deleted inserted replaced
71:4f7c2c944637 72:1b9c53e0c846
89 // ------------------------------------------------------------------------------------------------- 89 // -------------------------------------------------------------------------------------------------
90 // 90 //
91 class RCONSession 91 class RCONSession
92 { 92 {
93 public: 93 public:
94 RCONSession (class Interface* iface);
94 ~RCONSession(); 95 ~RCONSession();
95 96
96 METHOD address() const -> const IPAddress&; 97 const IPAddress& address() const;
97 METHOD connect (IPAddress address) -> void; 98 void connect (IPAddress address);
98 METHOD disconnect() -> void; 99 void disconnect();
99 METHOD handle_packet (Bytestream& packet, const IPAddress& from) -> void; 100 void handle_packet (Bytestream& packet, const IPAddress& from);
100 METHOD process_server_updates (Bytestream& packet) -> void; 101 void process_server_updates (Bytestream& packet);
101 METHOD num_admins() const -> int; 102 int num_admins() const;
102 METHOD send (const Bytestream& packet) -> void; 103 void send (const Bytestream& packet);
103 METHOD send_hello() -> void; 104 void send_hello();
104 METHOD send_password() -> void; 105 void send_password();
105 METHOD set_password (const String& password) -> void; 106 void set_password (const String& password);
106 METHOD socket() -> UDPSocket*; 107 UDPSocket* socket();
107 METHOD tick() -> void; 108 void tick();
108 METHOD bump_last_ping() -> void; 109 void bump_last_ping();
109 METHOD send_command (const String& message) -> bool; 110 bool send_command (const String& message);
110 METHOD state() const -> RCONSessionState; 111 RCONSessionState state() const;
111 METHOD level() const -> const String&; 112 const String& level() const;
112 METHOD is_active() const -> bool; 113 bool is_active() const;
113 METHOD request_tab_complete (const String& part) -> void; 114 void request_tab_complete (const String& part);
114
115 static METHOD get_session() -> RCONSession*;
116 115
117 private: 116 private:
118 RCONSession(); 117 RCONSession();
119 118
120 RCONSessionState m_state; 119 RCONSessionState m_state;
126 int m_serverProtocol; 125 int m_serverProtocol;
127 String m_hostname; 126 String m_hostname;
128 int m_numAdmins; 127 int m_numAdmins;
129 String m_level; 128 String m_level;
130 String m_lastTabComplete; 129 String m_lastTabComplete;
130 class Interface* m_interface;
131 }; 131 };

mercurial