diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/derivations.cc | 4 | ||||
-rw-r--r-- | src/libstore/derivations.hh | 6 | ||||
-rw-r--r-- | src/libstore/download.cc | 2 | ||||
-rw-r--r-- | src/libstore/download.hh | 4 | ||||
-rw-r--r-- | src/libstore/gc.cc | 2 | ||||
-rw-r--r-- | src/libstore/local-store.hh | 2 | ||||
-rw-r--r-- | src/libstore/misc.cc | 8 | ||||
-rw-r--r-- | src/libstore/profiles.cc | 2 | ||||
-rw-r--r-- | src/libstore/profiles.hh | 4 | ||||
-rw-r--r-- | src/libstore/remote-store.hh | 2 | ||||
-rw-r--r-- | src/libstore/store-api.cc | 10 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 8 |
12 files changed, 27 insertions, 27 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index da1747da0..d9b009d40 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -68,7 +68,7 @@ bool BasicDerivation::canBuildLocally() const } -Path writeDerivation(ref<StoreAPI> store, +Path writeDerivation(ref<Store> store, const Derivation & drv, const string & name, bool repair) { PathSet references; @@ -274,7 +274,7 @@ DrvHashes drvHashes; paths have been replaced by the result of a recursive call to this function, and that for fixed-output derivations we return a hash of its output path. */ -Hash hashDerivationModulo(StoreAPI & store, Derivation drv) +Hash hashDerivationModulo(Store & store, Derivation drv) { /* Return a fixed hash for fixed-output derivations. */ if (drv.isFixedOutput()) { diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 4dda10b45..6f98869b0 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -80,11 +80,11 @@ struct Derivation : BasicDerivation }; -class StoreAPI; +class Store; /* Write a derivation to the Nix store, and return its path. */ -Path writeDerivation(ref<StoreAPI> store, +Path writeDerivation(ref<Store> store, const Derivation & drv, const string & name, bool repair = false); /* Read a derivation from a file. */ @@ -94,7 +94,7 @@ Derivation readDerivation(const Path & drvPath); derivations. */ bool isDerivation(const string & fileName); -Hash hashDerivationModulo(StoreAPI & store, Derivation drv); +Hash hashDerivationModulo(Store & store, Derivation drv); /* Memoisation of hashDerivationModulo(). */ typedef std::map<Path, Hash> DrvHashes; diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 5e50c1480..01ce1ea2f 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -188,7 +188,7 @@ DownloadResult downloadFile(string url, const DownloadOptions & options) } -Path downloadFileCached(ref<StoreAPI> store, const string & url, bool unpack) +Path downloadFileCached(ref<Store> store, const string & url, bool unpack) { Path cacheDir = getEnv("XDG_CACHE_HOME", getEnv("HOME", "") + "/.cache") + "/nix/tarballs"; createDirs(cacheDir); diff --git a/src/libstore/download.hh b/src/libstore/download.hh index a727936d1..7aec8de73 100644 --- a/src/libstore/download.hh +++ b/src/libstore/download.hh @@ -19,11 +19,11 @@ struct DownloadResult string data, etag; }; -class StoreAPI; +class Store; DownloadResult downloadFile(string url, const DownloadOptions & options); -Path downloadFileCached(ref<StoreAPI> store, const string & url, bool unpack); +Path downloadFileCached(ref<Store> store, const string & url, bool unpack); MakeError(DownloadError, Error) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 9c158c3ee..48fb2167a 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -83,7 +83,7 @@ void LocalStore::addIndirectRoot(const Path & path) } -Path addPermRoot(ref<StoreAPI> store, const Path & _storePath, +Path addPermRoot(ref<Store> store, const Path & _storePath, const Path & _gcRoot, bool indirect, bool allowOutsideRootsDir) { Path storePath(canonPath(_storePath)); diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 3ef042b61..b6d39d345 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -80,7 +80,7 @@ struct SQLiteStmt }; -class LocalStore : public StoreAPI +class LocalStore : public Store { private: typedef std::map<Path, RunningSubstituter> RunningSubstituters; diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 032dfe658..12472f017 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -7,7 +7,7 @@ namespace nix { -Derivation StoreAPI::derivationFromPath(const Path & drvPath) +Derivation Store::derivationFromPath(const Path & drvPath) { assertStorePath(drvPath); ensurePath(drvPath); @@ -15,7 +15,7 @@ Derivation StoreAPI::derivationFromPath(const Path & drvPath) } -void StoreAPI::computeFSClosure(const Path & path, +void Store::computeFSClosure(const Path & path, PathSet & paths, bool flipDirection, bool includeOutputs, bool includeDerivers) { if (paths.find(path) != paths.end()) return; @@ -59,7 +59,7 @@ void StoreAPI::computeFSClosure(const Path & path, } -void StoreAPI::queryMissing(const PathSet & targets, +void Store::queryMissing(const PathSet & targets, PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown, unsigned long long & downloadSize, unsigned long long & narSize) { @@ -173,7 +173,7 @@ void StoreAPI::queryMissing(const PathSet & targets, } -Paths StoreAPI::topoSortPaths(const PathSet & paths) +Paths Store::topoSortPaths(const PathSet & paths) { Paths sorted; PathSet visited, parents; diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 4903b12f6..8ab23cd31 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -74,7 +74,7 @@ static void makeName(const Path & profile, unsigned int num, } -Path createGeneration(ref<StoreAPI> store, Path profile, Path outPath) +Path createGeneration(ref<Store> store, Path profile, Path outPath) { /* The new generation number should be higher than old the previous ones. */ diff --git a/src/libstore/profiles.hh b/src/libstore/profiles.hh index 37d8ec999..d758d94b6 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/profiles.hh @@ -31,9 +31,9 @@ typedef list<Generation> Generations; profile, sorted by generation number. */ Generations findGenerations(Path profile, int & curGen); -class StoreAPI; +class Store; -Path createGeneration(ref<StoreAPI> store, Path profile, Path outPath); +Path createGeneration(ref<Store> store, Path profile, Path outPath); void deleteGeneration(const Path & profile, unsigned int gen); diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh index b0787c072..f15182285 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/remote-store.hh @@ -14,7 +14,7 @@ struct FdSink; struct FdSource; -class RemoteStore : public StoreAPI +class RemoteStore : public Store { public: diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 98399cc48..e205fd0e8 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -220,7 +220,7 @@ Path computeStorePathForText(const string & name, const string & s, /* Return a string accepted by decodeValidPathInfo() that registers the specified paths as valid. Note: it's the responsibility of the caller to provide a closure. */ -string StoreAPI::makeValidityRegistration(const PathSet & paths, +string Store::makeValidityRegistration(const PathSet & paths, bool showDerivers, bool showHash) { string s = ""; @@ -284,7 +284,7 @@ string showPaths(const PathSet & paths) } -void StoreAPI::exportPaths(const Paths & paths, +void Store::exportPaths(const Paths & paths, bool sign, Sink & sink) { for (auto & i : paths) { @@ -306,7 +306,7 @@ void StoreAPI::exportPaths(const Paths & paths, namespace nix { -ref<StoreAPI> openStore(bool reserveSpace) +ref<Store> openStore(bool reserveSpace) { enum { mDaemon, mLocal, mAuto } mode; @@ -322,8 +322,8 @@ ref<StoreAPI> openStore(bool reserveSpace) } return mode == mDaemon - ? make_ref<StoreAPI, RemoteStore>() - : make_ref<StoreAPI, LocalStore>(reserveSpace); + ? make_ref<Store, RemoteStore>() + : make_ref<Store, LocalStore>(reserveSpace); } diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index ce085ff55..1e4306439 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -135,11 +135,11 @@ struct BasicDerivation; struct Derivation; -class StoreAPI +class Store { public: - virtual ~StoreAPI() { } + virtual ~Store() { } /* Check whether a path is valid. */ virtual bool isValidPath(const Path & path) = 0; @@ -407,13 +407,13 @@ void removeTempRoots(); /* Register a permanent GC root. */ -Path addPermRoot(ref<StoreAPI> store, const Path & storePath, +Path addPermRoot(ref<Store> store, const Path & storePath, const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false); /* Factory method: open the Nix database, either through the local or remote implementation. */ -ref<StoreAPI> openStore(bool reserveSpace = true); +ref<Store> openStore(bool reserveSpace = true); /* Display a set of paths in human-readable form (i.e., between quotes |