5 #ifndef PPAPI_CPP_URL_REQUEST_INFO_H_
6 #define PPAPI_CPP_URL_REQUEST_INFO_H_
8 #include "ppapi/c/ppb_url_request_info.h"
9 #include "ppapi/cpp/resource.h"
10 #include "ppapi/cpp/var.h"
48 bool SetProperty(PP_URLRequestProperty property,
const Var& value);
77 PP_Time expected_last_modified_time = 0);
100 int64_t start_offset,
102 PP_Time expected_last_modified_time = 0);
111 return SetProperty(PP_URLREQUESTPROPERTY_URL, url_string);
125 return SetProperty(PP_URLREQUESTPROPERTY_METHOD, method_string);
140 return SetProperty(PP_URLREQUESTPROPERTY_HEADERS, headers_string);
154 return SetProperty(PP_URLREQUESTPROPERTY_STREAMTOFILE, enable);
168 return SetProperty(PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS, enable);
182 return SetProperty(PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, enable);
195 return SetProperty(PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS, enable);
213 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, url);
230 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, enable);
245 return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, enable);
265 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING,
266 content_transfer_encoding);
286 return SetProperty(PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD,
308 return SetProperty(PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD,
328 return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT, user_agent);
334 #endif // PPAPI_CPP_URL_REQUEST_INFO_H_
bool SetStreamToFile(bool enable)
bool SetAllowCredentials(bool enable)
bool SetPrefetchBufferLowerThreshold(int32_t size)
bool SetFollowRedirects(bool enable)
bool AppendFileRangeToBody(const FileRef &file_ref, int64_t start_offset, int64_t length, PP_Time expected_last_modified_time=0)
bool SetHeaders(const Var &headers_string)
bool SetCustomReferrerURL(const Var &url)
bool SetAllowCrossOriginRequests(bool enable)
bool AppendFileToBody(const FileRef &file_ref, PP_Time expected_last_modified_time=0)
bool SetCustomContentTransferEncoding(const Var &content_transfer_encoding)
bool SetCustomUserAgent(const Var &user_agent)
bool SetRecordUploadProgress(bool enable)
bool SetPrefetchBufferUpperThreshold(int32_t size)
bool SetRecordDownloadProgress(bool enable)
URLRequestInfo provides an API for creating and manipulating URL requests.
bool SetMethod(const Var &method_string)
bool AppendDataToBody(const void *data, uint32_t len)
A generic type used for passing data types between the module and the page.
bool SetProperty(PP_URLRequestProperty property, const Var &value)
A reference counted module resource.
bool SetURL(const Var &url_string)