aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/filetransfer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/filetransfer.hh')
-rw-r--r--src/libstore/filetransfer.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/filetransfer.hh b/src/libstore/filetransfer.hh
index 45d9ccf89..ca61e3937 100644
--- a/src/libstore/filetransfer.hh
+++ b/src/libstore/filetransfer.hh
@@ -59,7 +59,7 @@ struct FileTransferRequest
unsigned int baseRetryTimeMs = 250;
ActivityId parentAct;
bool decompress = true;
- std::shared_ptr<std::string> data;
+ std::optional<std::string> data;
std::string mimeType;
std::function<void(std::string_view data)> dataCallback;
@@ -77,7 +77,7 @@ struct FileTransferResult
bool cached = false;
std::string etag;
std::string effectiveUri;
- std::shared_ptr<std::string> data;
+ std::string data;
uint64_t bodySize = 0;
};
@@ -119,17 +119,17 @@ class FileTransferError : public Error
{
public:
FileTransfer::Error error;
- std::shared_ptr<string> response; // intentionally optional
+ std::optional<std::string> response; // intentionally optional
template<typename... Args>
- FileTransferError(FileTransfer::Error error, std::shared_ptr<string> response, const Args & ... args);
+ FileTransferError(FileTransfer::Error error, std::optional<std::string> response, const Args & ... args);
virtual const char* sname() const override { return "FileTransferError"; }
};
-bool isUri(const string & s);
+bool isUri(std::string_view s);
/* Resolve deprecated 'channel:<foo>' URLs. */
-std::string resolveUri(const std::string & uri);
+std::string resolveUri(std::string_view uri);
}