about summary refs log tree commit diff
path: root/src/libstore/download.hh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-08-11T15·34-0400
committerShea Levy <shea@shealevy.com>2016-08-11T15·34-0400
commit59124228b3ac6120e73bc6a88b2c633a70bdf0fc (patch)
tree7c1c780875b29a86acbf667513376751655af46b /src/libstore/download.hh
parenta6eed133c5a3602037bc48675ca783185cca5454 (diff)
nix-channel: implement in c++
Diffstat (limited to 'src/libstore/download.hh')
-rw-r--r--src/libstore/download.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/download.hh b/src/libstore/download.hh
index efddc55281fe..d17e14400f1a 100644
--- a/src/libstore/download.hh
+++ b/src/libstore/download.hh
@@ -19,6 +19,7 @@ struct DownloadResult
 {
     bool cached;
     string etag;
+    string effectiveUrl;
     std::shared_ptr<std::string> data;
 };
 
@@ -31,6 +32,11 @@ struct Downloader
     Path downloadCached(ref<Store> store, const string & url, bool unpack,
         const Hash & expectedHash = Hash());
 
+    /* Need to overload because can't have an rvalue default value for non-const reference */
+
+    Path downloadCached(ref<Store> store, const string & url, bool unpack,
+        string & effectiveUrl, const Hash & expectedHash = Hash());
+
     enum Error { NotFound, Forbidden, Misc };
 };