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-15T13·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-15T14·01+0100
commitc8f4d89a345cc06b64b0137e15567ec41c00881c (patch)
tree20e7211ba624e404fa8226be6d40b9f7f4526cf9 /src/libstore/store-api.hh
parente03d6e09983bb5ad99352933c4d2f21b139294d2 (diff)
Expose the export magic value and move LocalStore::queryReferences to Store
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index f6fb6c8347a4..54029bc13efb 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -12,6 +12,13 @@
 namespace nix {
 
 
+/* Size of the hash part of store paths, in base-32 characters. */
+const size_t storePathHashLen = 32; // i.e. 160 bits
+
+/* Magic header of exportPath() output. */
+const uint32_t exportMagic = 0x4558494e;
+
+
 typedef std::map<Path, Path> Roots;
 
 
@@ -156,10 +163,9 @@ public:
     /* Query the hash of a valid path. */
     virtual Hash queryPathHash(const Path & path) = 0;
 
-    /* Query the set of outgoing FS references for a store path.  The
+    /* Query the set of outgoing FS references for a store path. The
        result is not cleared. */
-    virtual void queryReferences(const Path & path,
-        PathSet & references) = 0;
+    virtual void queryReferences(const Path & path, PathSet & references);
 
     /* Queries the set of incoming FS references for a store path.
        The result is not cleared. */
@@ -339,9 +345,6 @@ public:
 };
 
 
-const size_t storePathHashLen = 32; // base-32 characters, i.e. 160 bits
-
-
 /* !!! These should be part of the store API, I guess. */
 
 /* Throw an exception if `path' is not directly in the Nix store. */