diff options
author | Shea Levy <shea@shealevy.com> | 2016-08-11T15·34-0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2016-08-11T15·34-0400 |
commit | 59124228b3ac6120e73bc6a88b2c633a70bdf0fc (patch) | |
tree | 7c1c780875b29a86acbf667513376751655af46b /src/libstore/download.hh | |
parent | a6eed133c5a3602037bc48675ca783185cca5454 (diff) |
nix-channel: implement in c++
Diffstat (limited to 'src/libstore/download.hh')
-rw-r--r-- | src/libstore/download.hh | 6 |
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 }; }; |