Shaka Packager SDK
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
shaka::HttpFile Class Reference

#include <http_file.h>

Inheritance diagram for shaka::HttpFile:

Public Member Functions

 HttpFile (HttpMethod method, const std::string &url)
 
 HttpFile (HttpMethod method, const std::string &url, const std::string &upload_content_type, const std::vector< std::string > &headers, int32_t timeout_in_seconds)
 
 HttpFile (const HttpFile &)=delete
 
HttpFileoperator= (const HttpFile &)=delete
 
Status CloseWithStatus ()
 
File implementation overrides.
bool Close () override
 
int64_t Read (void *buffer, uint64_t length) override
 
int64_t Write (const void *buffer, uint64_t length) override
 
void CloseForWriting () override
 
int64_t Size () override
 
bool Flush () override
 
bool Seek (uint64_t position) override
 
bool Tell (uint64_t *position) override
 
bool Open () override
 

Static Public Member Functions

static bool Delete (const std::string &url)
 

Detailed Description

HttpFile reads or writes network requests.

Note that calling Flush will indicate EOF for the upload and no more can be uploaded.

About how to use this, please visit the corresponding documentation [1].

[1] https://shaka-project.github.io/shaka-packager/html/tutorials/http_upload.html

Definition at line 39 of file http_file.h.

Constructor & Destructor Documentation

◆ HttpFile() [1/2]

shaka::HttpFile::HttpFile ( HttpMethod  method,
const std::string &  url 
)

Definition at line 170 of file http_file.cc.

◆ HttpFile() [2/2]

shaka::HttpFile::HttpFile ( HttpMethod  method,
const std::string &  url,
const std::string &  upload_content_type,
const std::vector< std::string > &  headers,
int32_t  timeout_in_seconds 
)

Definition at line 173 of file http_file.cc.

◆ ~HttpFile()

shaka::HttpFile::~HttpFile ( )
overrideprotected

Definition at line 222 of file http_file.cc.

Member Function Documentation

◆ Close()

bool shaka::HttpFile::Close ( )
override

Definition at line 268 of file http_file.cc.

◆ CloseForWriting()

void shaka::HttpFile::CloseForWriting ( )
override

Definition at line 283 of file http_file.cc.

◆ CloseWithStatus()

Status shaka::HttpFile::CloseWithStatus ( )

Definition at line 251 of file http_file.cc.

◆ Delete()

bool shaka::HttpFile::Delete ( const std::string &  url)
static

Definition at line 225 of file http_file.cc.

◆ Flush()

bool shaka::HttpFile::Flush ( )
override

Definition at line 293 of file http_file.cc.

◆ Open()

bool shaka::HttpFile::Open ( )
override

Definition at line 234 of file http_file.cc.

◆ Read()

int64_t shaka::HttpFile::Read ( void *  buffer,
uint64_t  length 
)
override

Definition at line 272 of file http_file.cc.

◆ Seek()

bool shaka::HttpFile::Seek ( uint64_t  position)
override

Definition at line 299 of file http_file.cc.

◆ Size()

int64_t shaka::HttpFile::Size ( )
override

Definition at line 288 of file http_file.cc.

◆ Tell()

bool shaka::HttpFile::Tell ( uint64_t *  position)
override

Definition at line 305 of file http_file.cc.

◆ Write()

int64_t shaka::HttpFile::Write ( const void *  buffer,
uint64_t  length 
)
override

Definition at line 277 of file http_file.cc.


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