aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/path-info.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/path-info.hh')
-rw-r--r--src/libstore/path-info.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/path-info.hh b/src/libstore/path-info.hh
index 9af1309a0..221523622 100644
--- a/src/libstore/path-info.hh
+++ b/src/libstore/path-info.hh
@@ -92,6 +92,13 @@ struct ValidPathInfo
void sign(const Store & store, const SecretKey & secretKey);
+ /**
+ * @return The `ContentAddressWithReferences` that determines the
+ * store path for a content-addressed store object, `std::nullopt`
+ * for an input-addressed store object.
+ */
+ std::optional<ContentAddressWithReferences> contentAddressWithReferences() const;
+
/**
* @return true iff the path is verifiably content-addressed.
*/
@@ -118,6 +125,9 @@ struct ValidPathInfo
ValidPathInfo(StorePath && path, Hash narHash) : path(std::move(path)), narHash(narHash) { };
ValidPathInfo(const StorePath & path, Hash narHash) : path(path), narHash(narHash) { };
+ ValidPathInfo(const Store & store,
+ std::string_view name, ContentAddressWithReferences && ca, Hash narHash);
+
virtual ~ValidPathInfo() { }
static ValidPathInfo read(Source & source, const Store & store, unsigned int format);