1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

nix-channel: implement in c++

This commit is contained in:
Shea Levy 2016-08-11 11:34:43 -04:00
parent a6eed133c5
commit 59124228b3
8 changed files with 304 additions and 233 deletions

View file

@ -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 };
};