aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-09-12 08:03:29 -0400
committerShea Levy <shea@shealevy.com>2016-09-12 08:03:29 -0400
commitab31f9986c68f575d902582ed3e176b777cb49e1 (patch)
treea82953257ecca95de16417bbd736054e03caf9ea /src
parent584f8a62de117ade154ec8208d939dc194782936 (diff)
Inline ssh-store.hh into ssh-store.cc
Diffstat (limited to 'src')
-rw-r--r--src/libstore/ssh-store.cc35
-rw-r--r--src/libstore/ssh-store.hh40
2 files changed, 34 insertions, 41 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc
index e1eb76659..05992bb49 100644
--- a/src/libstore/ssh-store.cc
+++ b/src/libstore/ssh-store.cc
@@ -1,4 +1,5 @@
-#include "ssh-store.hh"
+#include "store-api.hh"
+#include "remote-store.hh"
#include "remote-fs-accessor.hh"
#include "archive.hh"
#include "worker-protocol.hh"
@@ -6,6 +7,38 @@
namespace nix {
+class SSHStore : public RemoteStore
+{
+public:
+
+ SSHStore(string uri, const Params & params, size_t maxConnections = std::numeric_limits<size_t>::max());
+
+ std::string getUri() override;
+
+ void narFromPath(const Path & path, Sink & sink) override;
+
+ ref<FSAccessor> getFSAccessor() override;
+
+private:
+
+ struct Connection : RemoteStore::Connection
+ {
+ Pid sshPid;
+ AutoCloseFD out;
+ AutoCloseFD in;
+ };
+
+ ref<RemoteStore::Connection> openConnection() override;
+
+ AutoDelete tmpDir;
+
+ Path socketPath;
+
+ Pid sshMaster;
+
+ string uri;
+};
+
SSHStore::SSHStore(string uri, const Params & params, size_t maxConnections)
: Store(params)
, RemoteStore(params, maxConnections)
diff --git a/src/libstore/ssh-store.hh b/src/libstore/ssh-store.hh
deleted file mode 100644
index 44ece5598..000000000
--- a/src/libstore/ssh-store.hh
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-
-#include "store-api.hh"
-#include "remote-store.hh"
-
-namespace nix {
-
-class SSHStore : public RemoteStore
-{
-public:
-
- SSHStore(string uri, const Params & params, size_t maxConnections = std::numeric_limits<size_t>::max());
-
- std::string getUri() override;
-
- void narFromPath(const Path & path, Sink & sink) override;
-
- ref<FSAccessor> getFSAccessor() override;
-
-private:
-
- struct Connection : RemoteStore::Connection
- {
- Pid sshPid;
- AutoCloseFD out;
- AutoCloseFD in;
- };
-
- ref<RemoteStore::Connection> openConnection() override;
-
- AutoDelete tmpDir;
-
- Path socketPath;
-
- Pid sshMaster;
-
- string uri;
-};
-
-}