summaryrefslogtreecommitdiff
path: root/nix/libstore/store-api.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-30 01:20:41 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-30 01:20:41 +0100
commit20b978192e18a0ce0e34da2123a1174ebbce183c (patch)
tree766e8bfff31bffa2f6b34e89433da0682f182c57 /nix/libstore/store-api.cc
parent11afbbc6511dfb68f8902b04c7140dfe7026e22c (diff)
daemon: Remove unused 'RemoteStore' class.
* nix/libstore/remote-store.cc, nix/libstore/remote-store.hh: Remove. * nix/libstore/store-api.cc (readStorePath, readStorePaths): New functions, formerly in remote-store.cc. (openStore): Remove reference to 'RemoteStore'. * daemon.am (libstore_a_SOURCES): Remove remote-store.cc. (libstore_headers): Remote remote-store.hh.
Diffstat (limited to 'nix/libstore/store-api.cc')
-rw-r--r--nix/libstore/store-api.cc22
1 files changed, 17 insertions, 5 deletions
diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc
index 0238e5b0b6..30af5f5fed 100644
--- a/nix/libstore/store-api.cc
+++ b/nix/libstore/store-api.cc
@@ -304,13 +304,28 @@ void exportPaths(StoreAPI & store, const Paths & paths,
writeInt(0, sink);
}
+Path readStorePath(Source & from)
+{
+ Path path = readString(from);
+ assertStorePath(path);
+ return path;
+}
+
+
+template<class T> T readStorePaths(Source & from)
+{
+ T paths = readStrings<T>(from);
+ foreach (typename T::iterator, i, paths) assertStorePath(*i);
+ return paths;
+}
+
+template PathSet readStorePaths(Source & from);
}
#include "local-store.hh"
#include "serialise.hh"
-#include "remote-store.hh"
namespace nix {
@@ -321,10 +336,7 @@ std::shared_ptr<StoreAPI> store;
std::shared_ptr<StoreAPI> openStore(bool reserveSpace)
{
- if (getEnv("NIX_REMOTE") == "")
- return std::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
- else
- return std::shared_ptr<StoreAPI>(new RemoteStore());
+ return std::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
}