18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
19 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
20 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
21 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER |
21 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER |
22 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
22 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
23 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
23 EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, |
24 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
24 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
25 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
25 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
26 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
26 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING |
27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ |
29 */ |
30 |
30 |
31 #pragma once |
31 #pragma once |
99 { |
99 { |
100 public: |
100 public: |
101 RCONSession(); |
101 RCONSession(); |
102 ~RCONSession(); |
102 ~RCONSession(); |
103 |
103 |
104 const IPAddress& address() const; |
104 const IPAddress& address() const; |
105 void connect (IPAddress address); |
105 void bumpLastPing(); |
106 void disconnect(); |
106 void connect(IPAddress address); |
107 void handle_packet (Datagram& datagram); |
107 void disconnect(); |
108 void process_server_updates (Bytestream& packet); |
108 int getAdminCount() const; |
109 int num_admins() const; |
109 const String& getLevel() const; |
110 void send (const Bytestream& packet); |
110 UDPSocket* getSocket(); |
111 void send_hello(); |
111 RCONSessionState getState() const; |
112 void send_password(); |
112 void handlePacket(Datagram& datagram); |
113 void set_password (const String& password); |
113 bool isActive() const; |
114 UDPSocket* socket(); |
114 void processServerUpdates(Bytestream& packet); |
115 void tick(); |
115 void requestTabCompletion(const String& part); |
116 void bump_last_ping(); |
116 void send(const ByteArray& packet); |
117 bool send_command (const String& message); |
117 bool sendCommand(const String& commandString); |
118 RCONSessionState state() const; |
118 void sendHello(); |
119 const String& level() const; |
119 void sendPassword(); |
120 bool is_active() const; |
120 void setInterface(class Interface* interface); |
121 void request_tab_complete (const String& part); |
121 void setPassword(const String& password); |
122 void set_interface (class Interface* iface); |
122 void tick(); |
123 void request_watch (const String& cvar); |
123 void request_watch (const String& cvar); |
124 void request_watch (const StringList& cvars); |
124 void request_watch (const StringList& cvars); |
125 |
125 |
126 private: |
126 private: |
127 RCONSessionState m_state; |
127 RCONSessionState m_state; |