Shaka Player Embedded
Classes | Public Member Functions | Public Attributes | Friends | List of all members
shaka::Response Class Referencefinal

#include <net.h>

Classes

class  Impl
 

Public Member Functions

 ~Response ()
 
 Response (const Response &)=delete
 
Responseoperator= (const Response &)=delete
 
 Response (Response &&)=delete
 
Responseoperator= (Response &&)=delete
 
const uint8_t * data () const
 
size_t data_size () const
 
void SetDataCopy (const uint8_t *data, size_t size)
 

Public Attributes

std::string uri
 
std::string originalUri
 
std::unordered_map< std::string, std::string > headers
 
optional< double > timeMs
 
optional< bool > fromCache
 

Friends

class JsManager
 
class Player
 

Detailed Description

Defines a response object. This includes the response data and header info. This is given back from the scheme plugin. This is passed to a response filter before being returned from the request call.

Definition at line 104 of file net.h.

Constructor & Destructor Documentation

§ ~Response()

shaka::Response::~Response ( )

Definition at line 73 of file net_public.cc.

§ Response() [1/2]

shaka::Response::Response ( const Response )
delete

§ Response() [2/2]

shaka::Response::Response ( Response &&  )
delete

Member Function Documentation

§ data()

const uint8_t * shaka::Response::data ( ) const
Returns
The data of the response.

Definition at line 75 of file net_public.cc.

§ data_size()

size_t shaka::Response::data_size ( ) const
Returns
The number of bytes in data.

Definition at line 79 of file net_public.cc.

§ operator=() [1/2]

Response& shaka::Response::operator= ( Response &&  )
delete

§ operator=() [2/2]

Response& shaka::Response::operator= ( const Response )
delete

§ SetDataCopy()

void shaka::Response::SetDataCopy ( const uint8_t *  data,
size_t  size 
)

Sets the body of the response to a copy of the given data.

Definition at line 83 of file net_public.cc.

Friends And Related Function Documentation

§ JsManager

friend class JsManager
friend

Definition at line 152 of file net.h.

§ Player

friend class Player
friend

Definition at line 153 of file net.h.

Member Data Documentation

§ fromCache

optional<bool> shaka::Response::fromCache

Optional. If true, this response was from a cache and should be ignored for bandwidth estimation.

Definition at line 139 of file net.h.

§ headers

std::unordered_map<std::string, std::string> shaka::Response::headers

A map of response headers, if supported by the underlying protocol. All keys should be lowercased. For HTTP/HTTPS, may not be available cross-origin.

Definition at line 127 of file net.h.

§ originalUri

std::string shaka::Response::originalUri

The original URI passed to the browser for networking. This is before any redirects, but after request filters are executed.

Definition at line 120 of file net.h.

§ timeMs

optional<double> shaka::Response::timeMs

Optional. The time it took to get the response, in miliseconds. If not given, NetworkingEngine will calculate it using Date.now.

Definition at line 133 of file net.h.

§ uri

std::string shaka::Response::uri

The URI which was loaded. Request filters and server redirects can cause this to be different from the original request URIs.

Definition at line 114 of file net.h.


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