Audacity 3.2.0
|
Interface, that provides access to the data from the HTTP response. More...
#include <IResponse.h>
Public Types | |
using | RequestCallback = std::function< void(IResponse *)> |
using | ProgressCallback = std::function< void(int64_t current, int64_t expected)> |
Public Member Functions | |
virtual | ~IResponse ()=default |
virtual bool | isFinished () const noexcept=0 |
virtual unsigned | getHTTPCode () const noexcept=0 |
virtual NetworkError | getError () const noexcept=0 |
virtual std::string | getErrorString () const =0 |
virtual bool | headersReceived () const noexcept=0 |
virtual bool | hasHeader (const std::string &headerName) const noexcept=0 |
virtual std::string | getHeader (const std::string &headerName) const =0 |
virtual const HeadersList & | getHeaders () const noexcept=0 |
virtual const CookiesList & | getCookies () const noexcept=0 |
virtual const Request & | getRequest () const noexcept=0 |
virtual std::string | getURL () const =0 |
virtual void | abort () noexcept=0 |
virtual void | setOnDataReceivedCallback (RequestCallback callback)=0 |
virtual void | setRequestFinishedCallback (RequestCallback callback)=0 |
virtual void | setDownloadProgressCallback (ProgressCallback callback)=0 |
Set the download progress callback. More... | |
virtual void | setUploadProgressCallback (ProgressCallback callback)=0 |
Set the upload progress callback. More... | |
virtual uint64_t | getBytesAvailable () const noexcept=0 |
virtual uint64_t | readData (void *buffer, uint64_t maxBytesCount)=0 |
template<typename RetVal = std::vector<uint8_t>> | |
RetVal | readAll () |
void | Cancel () override |
Public Member Functions inherited from audacity::concurrency::ICancellable | |
virtual | ~ICancellable ()=default |
virtual void | Cancel ()=0 |
Interface, that provides access to the data from the HTTP response.
Definition at line 112 of file IResponse.h.
using audacity::network_manager::IResponse::ProgressCallback = std::function<void(int64_t current, int64_t expected)> |
Called when download or upload progress changes. Expected can be zero when transfer encoding does not allow to calculate the size
Definition at line 118 of file IResponse.h.
using audacity::network_manager::IResponse::RequestCallback = std::function<void (IResponse*)> |
Definition at line 115 of file IResponse.h.
|
virtualdefault |
|
pure virtualnoexcept |
|
inlineoverridevirtual |
Implements audacity::concurrency::ICancellable.
Definition at line 180 of file IResponse.h.
|
pure virtualnoexcept |
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.
Referenced by audacity::cloud::audiocom::sync::anonymous_namespace{RemoteProjectSnapshot.cpp}::ReadResponseData().
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.
Referenced by audacity::cloud::audiocom::sync::DeduceUploadError(), and audacity::cloud::audiocom::GetResponseResult().
|
pure virtual |
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.
Referenced by audacity::cloud::audiocom::sync::DeduceUploadError(), and audacity::cloud::audiocom::GetResponseResult().
|
pure virtual |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.
Referenced by audacity::cloud::audiocom::sync::DeduceUploadError(), and audacity::cloud::audiocom::GetResponseResult().
|
pure virtualnoexcept |
|
pure virtual |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
inline |
Definition at line 157 of file IResponse.h.
References details::begin(), and details::end().
Referenced by audacity::cloud::audiocom::sync::DeduceUploadError(), audacity::cloud::audiocom::GetResponseResult(), and audacity::cloud::audiocom::sync::anonymous_namespace{RemoteProjectSnapshot.cpp}::ReadResponseData().
|
pure virtual |
Implemented in audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse, and audacity::network_manager::CurlResponse.
Referenced by audacity::cloud::audiocom::sync::anonymous_namespace{RemoteProjectSnapshot.cpp}::ReadResponseData().
|
pure virtual |
Set the download progress callback.
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Set the upload progress callback.
Implemented in audacity::network_manager::CurlResponse, and audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse.