7 #include "ppapi/c/ppb_url_loader.h"
8 #include "ppapi/c/pp_errors.h"
21 template <>
const char* interface_name<PPB_URLLoader_1_0>() {
22 return PPB_URLLOADER_INTERFACE_1_0;
31 if (!has_interface<PPB_URLLoader_1_0>())
42 if (!has_interface<PPB_URLLoader_1_0>())
43 return cc.
MayForce(PP_ERROR_NOINTERFACE);
50 if (!has_interface<PPB_URLLoader_1_0>())
51 return cc.
MayForce(PP_ERROR_NOINTERFACE);
57 int64_t* total_bytes_to_be_sent)
const {
58 if (!has_interface<PPB_URLLoader_1_0>())
61 pp_resource(), bytes_sent, total_bytes_to_be_sent));
65 int64_t* bytes_received,
66 int64_t* total_bytes_to_be_received)
const {
67 if (!has_interface<PPB_URLLoader_1_0>())
70 pp_resource(), bytes_received, total_bytes_to_be_received));
74 if (!has_interface<PPB_URLLoader_1_0>())
84 if (!has_interface<PPB_URLLoader_1_0>())
85 return cc.
MayForce(PP_ERROR_NOINTERFACE);
91 if (!has_interface<PPB_URLLoader_1_0>())
92 return cc.
MayForce(PP_ERROR_NOINTERFACE);
98 if (!has_interface<PPB_URLLoader_1_0>())
void PassRefFromConstructor(PP_Resource resource)
bool GetDownloadProgress(int64_t *bytes_received, int64_t *total_bytes_to_be_received) const
int32_t MayForce(int32_t result) const
const PP_CompletionCallback & pp_completion_callback() const
URLResponseInfo provides an API for examining URL responses.
int32_t FinishStreamingToFile(const CompletionCallback &cc)
URLRequestInfo provides an API for creating and manipulating URL requests.
PP_Resource pp_resource() const
int32_t ReadResponseBody(void *buffer, int32_t bytes_to_read, const CompletionCallback &cc)
bool GetUploadProgress(int64_t *bytes_sent, int64_t *total_bytes_to_be_sent) const
int32_t Open(const URLRequestInfo &request_info, const CompletionCallback &cc)
PP_Instance pp_instance() const
A reference counted module resource.
URLResponseInfo GetResponseInfo() const
int32_t FollowRedirect(const CompletionCallback &cc)