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:
parent
a6eed133c5
commit
59124228b3
8 changed files with 304 additions and 233 deletions
|
@ -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 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue