roar
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Roar::Curl::StringSource Class Reference

#include <string_source.hpp>

Collaboration diagram for Roar::Curl::StringSource:

Public Member Functions

 StringSource (std::string str)
 
std::size_t fetch (char *buffer, std::size_t amount) override
 
std::size_t size () override
 
- Public Member Functions inherited from Roar::Curl::Source
virtual std::size_t fetch (char *buffer, std::size_t amount)=0
 
virtual std::size_t size ()=0
 
virtual bool isChunked () const
 
 Source ()=default
 
virtual ~Source ()=default
 
 Source (Source const &)=default
 
 Source (Source &&)=default
 
Sourceoperator= (Source const &)=default
 
Sourceoperator= (Source &&)=default
 

Private Attributes

std::string data_
 
std::size_t offset_
 

Constructor & Destructor Documentation

◆ StringSource()

Roar::Curl::StringSource::StringSource ( std::string  str)
explicit

Member Function Documentation

◆ fetch()

std::size_t Roar::Curl::StringSource::fetch ( char buffer,
std::size_t  amount 
)
overridevirtual

This function gets called when the upload requests more data.

Implements Roar::Curl::Source.

◆ size()

std::size_t Roar::Curl::StringSource::size ( )
overridevirtual

Returns the total size to upload. This function is unused if chunked encoding is used.

Implements Roar::Curl::Source.

Member Data Documentation

◆ data_

std::string Roar::Curl::StringSource::data_
private

◆ offset_

std::size_t Roar::Curl::StringSource::offset_
private

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