|
Nix 2.34.7
Nix, the purely functional package manager; unstable internal interfaces
|
Public Member Functions | |
| long | getHTTPStatus () |
| void | appendHeaders (const std::string &header) |
| TransferItem (curlFileTransfer &fileTransfer, const FileTransferRequest &request, Callback< FileTransferResult > &&callback) | |
| void | failEx (std::exception_ptr ex) noexcept |
| template<class T> | |
| void | fail (T &&e) noexcept |
| size_t | writeCallback (void *contents, size_t size, size_t nmemb) noexcept |
| void | appendCurrentUrl () |
| size_t | headerCallback (void *contents, size_t size, size_t nmemb) noexcept |
| Activity & | act () |
| int | progressCallback (curl_off_t dltotal, curl_off_t dlnow) noexcept |
| size_t | readCallback (char *buffer, size_t size, size_t nitems) noexcept |
| size_t | seekCallback (curl_off_t offset, int origin) noexcept |
| void | unpause () |
| void | init () |
| void | finish (CURLcode code) |
Public Attributes | |
| curlFileTransfer & | fileTransfer |
| FileTransferRequest | request |
| FileTransferResult | result |
| std::unique_ptr< Activity > | _act |
| Callback< FileTransferResult > | callback |
| CURL * | req = 0 |
| char | errbuf [CURL_ERROR_SIZE] |
| std::string | statusMsg |
| unsigned int | attempt = 0 |
| std::chrono::steady_clock::time_point | embargo |
| curlSList | requestHeaders |
| bool | done:1 = false |
| bool | active:1 = false |
| bool | paused:1 = false |
| bool | enqueued:1 = false |
| bool | acceptRanges:1 = false |
| bool | hasContentEncoding:1 = false |
| curl_off_t | writtenToSink = 0 |
| std::chrono::steady_clock::time_point | startTime = std::chrono::steady_clock::now() |
| LambdaSink | finalSink |
| std::optional< StringSink > | errorSink |
| std::exception_ptr | callbackException |
Static Public Attributes | |
| static const std::set< long > | successfulStatuses {200, 201, 204, 206, 304, 0 } |
|
inline |
Lazily start an Activity. We don't do this in the TransferItem constructor to avoid showing downloads that are only enqueued but not actually started.
| bool nix::curlFileTransfer::TransferItem::acceptRanges |
Whether we can use range downloads for retries.
| bool nix::curlFileTransfer::TransferItem::active |
Whether the handle has been added to the multi object.
| bool nix::curlFileTransfer::TransferItem::done |
Whether either the success or failure function has been called.
| bool nix::curlFileTransfer::TransferItem::enqueued |
Whether the request has been added the incoming queue.
| bool nix::curlFileTransfer::TransferItem::hasContentEncoding |
Whether the response has a non-trivial (not "identity") Content-Encoding.
| bool nix::curlFileTransfer::TransferItem::paused |
Whether the request has been paused previously.