diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-11-05 13:57:12 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-11-05 13:57:12 +0000 |
| commit | 80b50cd737c485545d300d90763668c2f52df3cb (patch) | |
| tree | 04efc20ed6f90a155a4f43dfb588a336482d8524 /src/remote.hh | |
| parent | a3b29b1f1184cec2f1af33415556d3f7009b4696 (diff) | |
Simplify RemoteClient creation code
Diffstat (limited to 'src/remote.hh')
| -rw-r--r-- | src/remote.hh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/remote.hh b/src/remote.hh index 2d56011c..90aa14da 100644 --- a/src/remote.hh +++ b/src/remote.hh @@ -2,7 +2,6 @@ #define remote_hh_INCLUDED #include "display_buffer.hh" -#include "event_manager.hh" #include "user_interface.hh" #include "env_vars.hh" @@ -18,12 +17,14 @@ struct connection_failed : runtime_error {} }; +class FDWatcher; + // A remote client handle communication between a client running on the server // and a user interface running on the local process. class RemoteClient { public: - RemoteClient(int socket, std::unique_ptr<UserInterface>&& ui, + RemoteClient(StringView session, std::unique_ptr<UserInterface>&& ui, const EnvVarMap& env_vars, StringView init_command); private: @@ -33,12 +34,8 @@ private: std::unique_ptr<UserInterface> m_ui; CharCoord m_dimensions; - FDWatcher m_socket_watcher; + std::unique_ptr<FDWatcher> m_socket_watcher; }; -std::unique_ptr<RemoteClient> connect_to(StringView session, - std::unique_ptr<UserInterface>&& ui, - const EnvVarMap& env_vars, - StringView init_command); void send_command(StringView session, StringView command); |
