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