From 59124228b3ac6120e73bc6a88b2c633a70bdf0fc Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 11 Aug 2016 11:34:43 -0400 Subject: nix-channel: implement in c++ --- src/libstore/download.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstore/download.hh') 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 data; }; @@ -31,6 +32,11 @@ struct Downloader Path downloadCached(ref 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, const string & url, bool unpack, + string & effectiveUrl, const Hash & expectedHash = Hash()); + enum Error { NotFound, Forbidden, Misc }; }; -- cgit 1.4.1