2012-10-24 00:55:44 +04:00
|
|
|
#ifndef remote_hh_INCLUDED
|
|
|
|
#define remote_hh_INCLUDED
|
|
|
|
|
|
|
|
#include "user_interface.hh"
|
|
|
|
#include "display_buffer.hh"
|
2013-01-10 21:54:40 +04:00
|
|
|
#include "event_manager.hh"
|
2012-10-24 00:55:44 +04:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2012-10-30 17:00:44 +04:00
|
|
|
struct peer_disconnected {};
|
2012-10-26 15:45:32 +04:00
|
|
|
|
2013-01-10 21:54:40 +04:00
|
|
|
void handle_remote(FDWatcher& event);
|
2012-10-24 00:55:44 +04:00
|
|
|
|
|
|
|
class RemoteClient
|
|
|
|
{
|
|
|
|
public:
|
2012-12-19 00:20:36 +04:00
|
|
|
RemoteClient(int socket, UserInterface* ui,
|
|
|
|
const String& init_command);
|
2012-10-24 00:55:44 +04:00
|
|
|
|
|
|
|
void process_next_message();
|
|
|
|
void write_next_key();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_socket;
|
|
|
|
std::unique_ptr<UserInterface> m_ui;
|
2012-10-26 18:14:51 +04:00
|
|
|
DisplayCoord m_dimensions;
|
2012-10-24 00:55:44 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // remote_hh_INCLUDED
|
|
|
|
|