Rosetta
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
GetURLHandler Class Reference

#include <geturl_handler.h>

Public Member Functions

void Start ()
 

Static Public Member Functions

static GetURLHandlerCreate (pp::Instance *instance_, const std::string &url, utility::Inline_File_Provider_Hook *file_provider_hook)
 

Private Member Functions

 GetURLHandler (pp::Instance *instance_, const std::string &url, utility::Inline_File_Provider_Hook *file_provider_hook)
 
 ~GetURLHandler ()
 
void OnOpen (int32_t result)
 
void OnRead (int32_t result)
 
void ReadBody ()
 
void AppendDataBytes (const char *buffer, int32_t num_bytes)
 
void ReportResult (const std::string &fname, const std::string &text, bool success)
 
void ReportResultAndDie (const std::string &fname, const std::string &text, bool success)
 
 GetURLHandler (const GetURLHandler &)
 
void operator= (const GetURLHandler &)
 

Private Attributes

pp::Instance * instance_
 
std::string url_
 
pp::URLRequestInfo url_request_
 
pp::URLLoader url_loader_
 
char * buffer_
 
std::string url_response_body_
 
pp::CompletionCallbackFactory< GetURLHandlercc_factory_
 
utility::Inline_File_Provider_Hookfile_provider_hook_
 

Constructor & Destructor Documentation

◆ GetURLHandler() [1/2]

GetURLHandler::GetURLHandler ( pp::Instance *  instance_,
const std::string &  url,
utility::Inline_File_Provider_Hook file_provider_hook 
)
private

References cache_trajectory::url, and url_request_.

Referenced by Create().

◆ ~GetURLHandler()

GetURLHandler::~GetURLHandler ( )
private

References buffer_.

◆ GetURLHandler() [2/2]

GetURLHandler::GetURLHandler ( const GetURLHandler )
private

Member Function Documentation

◆ AppendDataBytes()

void GetURLHandler::AppendDataBytes ( const char *  buffer,
int32_t  num_bytes 
)
private

References min(), READ_BUFFER_SIZE, and url_response_body_.

Referenced by OnRead(), and ReadBody().

◆ Create()

GetURLHandler * GetURLHandler::Create ( pp::Instance *  instance_,
const std::string &  url,
utility::Inline_File_Provider_Hook file_provider_hook 
)
static

◆ OnOpen()

void GetURLHandler::OnOpen ( int32_t  result)
private

◆ OnRead()

void GetURLHandler::OnRead ( int32_t  result)
private

◆ operator=()

void GetURLHandler::operator= ( const GetURLHandler )
private

◆ ReadBody()

void GetURLHandler::ReadBody ( )
private

◆ ReportResult()

void GetURLHandler::ReportResult ( const std::string &  fname,
const std::string &  text,
bool  success 
)
private

◆ ReportResultAndDie()

void GetURLHandler::ReportResultAndDie ( const std::string &  fname,
const std::string &  text,
bool  success 
)
private

◆ Start()

void GetURLHandler::Start ( )

Member Data Documentation

◆ buffer_

char* GetURLHandler::buffer_
private

Referenced by OnRead(), ReadBody(), and ~GetURLHandler().

◆ cc_factory_

pp::CompletionCallbackFactory<GetURLHandler> GetURLHandler::cc_factory_
private

Referenced by ReadBody(), and Start().

◆ file_provider_hook_

utility::Inline_File_Provider_Hook* GetURLHandler::file_provider_hook_
private

Referenced by ReportResult().

◆ instance_

pp::Instance* GetURLHandler::instance_
private

Referenced by ReportResult().

◆ url_

std::string GetURLHandler::url_
private

Referenced by OnOpen(), and OnRead().

◆ url_loader_

pp::URLLoader GetURLHandler::url_loader_
private

Referenced by OnOpen(), ReadBody(), and Start().

◆ url_request_

pp::URLRequestInfo GetURLHandler::url_request_
private

Referenced by GetURLHandler(), OnOpen(), and Start().

◆ url_response_body_

std::string GetURLHandler::url_response_body_
private

Referenced by AppendDataBytes(), OnOpen(), and OnRead().


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