sources/network/rconsession.h

branch
protocol5
changeset 106
7b156b764d11
parent 104
a76af67a3a4b
parent 92
39947c46ed17
child 130
9f54db6f9922
equal deleted inserted replaced
104:a76af67a3a4b 106:7b156b764d11
30 30
31 #pragma once 31 #pragma once
32 #include "ipaddress.h" 32 #include "ipaddress.h"
33 #include "udpsocket.h" 33 #include "udpsocket.h"
34 #include "bytestream.h" 34 #include "bytestream.h"
35 BEGIN_ZFC_NAMESPACE
35 36
36 // ------------------------------------------------------------------------------------------------- 37 // -------------------------------------------------------------------------------------------------
37 // 38 //
38 enum 39 enum
39 { 40 {
95 // ------------------------------------------------------------------------------------------------- 96 // -------------------------------------------------------------------------------------------------
96 // 97 //
97 class RCONSession 98 class RCONSession
98 { 99 {
99 public: 100 public:
100 RCONSession (class Interface* iface); 101 RCONSession();
101 ~RCONSession(); 102 ~RCONSession();
102 103
103 const IPAddress& address() const; 104 const IPAddress& address() const;
104 void connect (IPAddress address); 105 void connect (IPAddress address);
105 void disconnect(); 106 void disconnect();
116 bool send_command (const String& message); 117 bool send_command (const String& message);
117 RCONSessionState state() const; 118 RCONSessionState state() const;
118 const String& level() const; 119 const String& level() const;
119 bool is_active() const; 120 bool is_active() const;
120 void request_tab_complete (const String& part); 121 void request_tab_complete (const String& part);
122 void set_interface (class Interface* iface);
121 void request_watch (const String& cvar); 123 void request_watch (const String& cvar);
122 void request_watch (const StringList& cvars); 124 void request_watch (const StringList& cvars);
123 125
124 private: 126 private:
125 RCONSession();
126
127 RCONSessionState m_state; 127 RCONSessionState m_state;
128 IPAddress m_address; 128 IPAddress m_address;
129 UDPSocket m_socket; 129 UDPSocket m_socket;
130 time_t m_lastPing; 130 time_t m_lastPing;
131 String m_password; 131 String m_password;
135 int m_numAdmins; 135 int m_numAdmins;
136 String m_level; 136 String m_level;
137 String m_lastTabComplete; 137 String m_lastTabComplete;
138 class Interface* m_interface; 138 class Interface* m_interface;
139 }; 139 };
140
141 END_ZFC_NAMESPACE

mercurial