// This file is part of Timmi. // // Timmi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. #ifndef READLINECLIENT_HH #define READLINECLIENT_HH #include class ReadlineClient: public TimmiClient { public: ReadlineClient(std::string name); void mainloop(); std::vector completion_hook(std::string command, int pos) const; void show_help(); void show_message(std::string message); void handle_event(const Event &event); void handle_chat(int player, std::string message); void handle_error(std::string errorcode); void handle_winners(std::vector winners); void show_status(); // Readline is set to call this when idle int idle_hook(); private: bool prompt_visible_; char first_char_; // Temporarily stored first char of line buffer bool force_status_; // Force status update }; #endif