Audacity 3.2.0
Functions | Variables
audacity::network_manager::anonymous_namespace{CurlResponse.cpp} Namespace Reference

Functions

size_t DataStreamRead (char *ptr, size_t size, size_t nmemb, RequestPayloadStream *stream)
 
int DataStreamSeek (RequestPayloadStream *stream, curl_off_t offs, int origin)
 
size_t MimePartRead (char *ptr, size_t size, size_t nmemb, MultipartData::Part *stream)
 
int MimePartSeek (MultipartData::Part *stream, curl_off_t offs, int origin) noexcept
 

Variables

static const std::map< CURLcode, NetworkErrorerrorsMap
 

Function Documentation

◆ DataStreamRead()

size_t audacity::network_manager::anonymous_namespace{CurlResponse.cpp}::DataStreamRead ( char *  ptr,
size_t  size,
size_t  nmemb,
RequestPayloadStream stream 
)

Definition at line 66 of file CurlResponse.cpp.

67{
68 return stream->Read (ptr, size * nmemb);
69}
virtual int64_t Read(void *buffer, int64_t size)=0
returns number of bytes read

References nmemb, audacity::network_manager::RequestPayloadStream::Read(), and size.

Referenced by audacity::network_manager::CurlResponse::perform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DataStreamSeek()

int audacity::network_manager::anonymous_namespace{CurlResponse.cpp}::DataStreamSeek ( RequestPayloadStream stream,
curl_off_t  offs,
int  origin 
)

Definition at line 71 of file CurlResponse.cpp.

72{
73 const auto direction =
74 origin == SEEK_SET ? RequestPayloadStream::SeekDirection::Start :
75 origin == SEEK_CUR ? RequestPayloadStream::SeekDirection::Current :
76 RequestPayloadStream::SeekDirection::End;
77
78 return stream->Seek(offs, direction) ? CURL_SEEKFUNC_OK :
79 CURL_SEEKFUNC_FAIL;
80}
virtual bool Seek(int64_t offset, SeekDirection direction)=0
returns true on success

References audacity::network_manager::RequestPayloadStream::Current, audacity::network_manager::RequestPayloadStream::End, audacity::network_manager::RequestPayloadStream::Seek(), and audacity::network_manager::RequestPayloadStream::Start.

Referenced by audacity::network_manager::CurlResponse::perform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MimePartRead()

size_t audacity::network_manager::anonymous_namespace{CurlResponse.cpp}::MimePartRead ( char *  ptr,
size_t  size,
size_t  nmemb,
MultipartData::Part stream 
)

Definition at line 82 of file CurlResponse.cpp.

83{
84 return stream->Read(ptr, size * nmemb);
85}
virtual size_t Read(void *buffer, size_t maxBytes)=0

References nmemb, audacity::network_manager::MultipartData::Part::Read(), and size.

Referenced by audacity::network_manager::CurlResponse::perform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MimePartSeek()

int audacity::network_manager::anonymous_namespace{CurlResponse.cpp}::MimePartSeek ( MultipartData::Part stream,
curl_off_t  offs,
int  origin 
)
noexcept

Definition at line 87 of file CurlResponse.cpp.

88{
89 return stream->Seek(offs, origin) ? CURL_SEEKFUNC_OK : CURL_SEEKFUNC_FAIL;
90}
virtual bool Seek(int64_t offset, int origin=SEEK_SET)=0

Referenced by audacity::network_manager::CurlResponse::perform().

Here is the caller graph for this function:

Variable Documentation

◆ errorsMap

const std::map<CURLcode, NetworkError> audacity::network_manager::anonymous_namespace{CurlResponse.cpp}::errorsMap
static

Definition at line 29 of file CurlResponse.cpp.

Referenced by audacity::network_manager::CurlResponse::perform().