about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-25T16·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-25T16·48+0100
commit24a8f9e27bfe63d83cc7ef47c6f133904567d44e (patch)
treeffaf046d18ea435899a87cdb684f26726a554238 /src/libstore/store-api.hh
parentc5bc57186192277b42746bbfba7bb799d9246da3 (diff)
parent1042c10fd0417fe33dd879317f5d7a73aa6f7fe3 (diff)
Merge branch 'master' into new-cli
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 84ede157e87a..347387f03403 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -140,9 +140,10 @@ struct BuildResult
 
 struct BasicDerivation;
 struct Derivation;
+struct FSAccessor;
 
 
-class Store
+class Store : public std::enable_shared_from_this<Store>
 {
 public:
 
@@ -314,6 +315,9 @@ public:
        remain. */
     virtual bool verifyStore(bool checkContents, bool repair) = 0;
 
+    /* Return an object to access files in the Nix store. */
+    virtual ref<FSAccessor> getFSAccessor() = 0;
+
     /* Utility functions. */
 
     /* Read a derivation, after ensuring its existence through
@@ -345,6 +349,12 @@ public:
 };
 
 
+class LocalFSStore : public Store
+{
+    ref<FSAccessor> getFSAccessor() override;
+};
+
+
 /* !!! These should be part of the store API, I guess. */
 
 /* Throw an exception if `path' is not directly in the Nix store. */