Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse Class Referencefinal
Inheritance diagram for audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse:
[legend]
Collaboration diagram for audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse:
[legend]

Public Member Functions

 StubResponse (const Request &request)
 
bool isFinished () const noexcept override
 
unsigned getHTTPCode () const noexcept override
 
NetworkError getError () const noexcept override
 
std::string getErrorString () const override
 
bool headersReceived () const noexcept override
 
bool hasHeader (const std::string &headerName) const noexcept override
 
std::string getHeader (const std::string &headerName) const override
 
const HeadersListgetHeaders () const noexcept override
 
const CookiesListgetCookies () const noexcept override
 
const RequestgetRequest () const noexcept override
 
std::string getURL () const override
 
void abort () noexcept override
 
void setOnDataReceivedCallback (RequestCallback) override
 
void setRequestFinishedCallback (RequestCallback callback) override
 
void setDownloadProgressCallback (ProgressCallback) override
 Set the download progress callback. More...
 
void setUploadProgressCallback (ProgressCallback) override
 Set the upload progress callback. More...
 
uint64_t getBytesAvailable () const noexcept override
 
uint64_t readData (void *, uint64_t) override
 
- Public Member Functions inherited from audacity::network_manager::IResponse
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 HeadersListgetHeaders () const noexcept=0
 
virtual const CookiesListgetCookies () const noexcept=0
 
virtual const RequestgetRequest () 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
 

Private Attributes

Request mRequest
 

Additional Inherited Members

- Public Types inherited from audacity::network_manager::IResponse
using RequestCallback = std::function< void(IResponse *)>
 
using ProgressCallback = std::function< void(int64_t current, int64_t expected)>
 

Detailed Description

Definition at line 24 of file CurlResponseFactory.cpp.

Constructor & Destructor Documentation

◆ StubResponse()

audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::StubResponse ( const Request request)
inlineexplicit

Member Function Documentation

◆ abort()

void audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::abort ( )
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 89 of file CurlResponseFactory.cpp.

90 {
91 }

◆ getBytesAvailable()

uint64_t audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getBytesAvailable ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 111 of file CurlResponseFactory.cpp.

112 {
113 return 0;
114 }

◆ getCookies()

const CookiesList & audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getCookies ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 73 of file CurlResponseFactory.cpp.

74 {
75 static CookiesList empty;
76 return empty;
77 }
A class, representing a list of HTTP cookies.

◆ getError()

NetworkError audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getError ( ) const
inlineoverridevirtualnoexcept

◆ getErrorString()

std::string audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getErrorString ( ) const
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 47 of file CurlResponseFactory.cpp.

48 {
49 return {};
50 }

◆ getHeader()

std::string audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getHeader ( const std::string &  headerName) const
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 62 of file CurlResponseFactory.cpp.

63 {
64 return {};
65 }

◆ getHeaders()

const HeadersList & audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getHeaders ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 67 of file CurlResponseFactory.cpp.

68 {
69 static HeadersList empty;
70 return empty;
71 }
A class, representing a list of HTTP headers.

◆ getHTTPCode()

unsigned audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getHTTPCode ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 37 of file CurlResponseFactory.cpp.

38 {
39 return 0;
40 }

◆ getRequest()

const Request & audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getRequest ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 79 of file CurlResponseFactory.cpp.

80 {
81 return mRequest;
82 }

◆ getURL()

std::string audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::getURL ( ) const
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 84 of file CurlResponseFactory.cpp.

85 {
86 return {};
87 }

◆ hasHeader()

bool audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::hasHeader ( const std::string &  headerName) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 57 of file CurlResponseFactory.cpp.

58 {
59 return false;
60 }

◆ headersReceived()

bool audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::headersReceived ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 52 of file CurlResponseFactory.cpp.

53 {
54 return false;
55 }

◆ isFinished()

bool audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::isFinished ( ) const
inlineoverridevirtualnoexcept

Implements audacity::network_manager::IResponse.

Definition at line 32 of file CurlResponseFactory.cpp.

33 {
34 return true;
35 }

◆ readData()

uint64_t audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::readData ( void *  ,
uint64_t   
)
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 116 of file CurlResponseFactory.cpp.

117 {
118 return 0;
119 }

◆ setDownloadProgressCallback()

void audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::setDownloadProgressCallback ( ProgressCallback  callback)
inlineoverridevirtual

Set the download progress callback.

Implements audacity::network_manager::IResponse.

Definition at line 103 of file CurlResponseFactory.cpp.

104 {
105 }

◆ setOnDataReceivedCallback()

void audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::setOnDataReceivedCallback ( RequestCallback  )
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 93 of file CurlResponseFactory.cpp.

94 {
95 }

◆ setRequestFinishedCallback()

void audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::setRequestFinishedCallback ( RequestCallback  callback)
inlineoverridevirtual

Implements audacity::network_manager::IResponse.

Definition at line 97 of file CurlResponseFactory.cpp.

98 {
99 if (callback)
100 callback(this);
101 }

◆ setUploadProgressCallback()

void audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::setUploadProgressCallback ( ProgressCallback  callback)
inlineoverridevirtual

Set the upload progress callback.

Implements audacity::network_manager::IResponse.

Definition at line 107 of file CurlResponseFactory.cpp.

108 {
109 }

Member Data Documentation

◆ mRequest

Request audacity::network_manager::anonymous_namespace{CurlResponseFactory.cpp}::StubResponse::mRequest
private

Definition at line 122 of file CurlResponseFactory.cpp.


The documentation for this class was generated from the following file: