| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_C_PPB_URL_REQUEST_INFO_H_ | 5 #ifndef PPAPI_C_PPB_URL_REQUEST_INFO_H_ |
| 6 #define PPAPI_C_PPB_URL_REQUEST_INFO_H_ | 6 #define PPAPI_C_PPB_URL_REQUEST_INFO_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_macros.h" |
| 9 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
| 10 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
| 12 #include "ppapi/c/pp_time.h" | 13 #include "ppapi/c/pp_time.h" |
| 13 | 14 |
| 14 struct PP_Var; | 15 struct PP_Var; |
| 15 | 16 |
| 16 typedef enum { | 17 typedef enum { |
| 17 PP_URLREQUESTPROPERTY_URL, // string | 18 PP_URLREQUESTPROPERTY_URL, // string |
| 18 PP_URLREQUESTPROPERTY_METHOD, // string | 19 PP_URLREQUESTPROPERTY_METHOD, // string |
| 19 PP_URLREQUESTPROPERTY_HEADERS, // string, \n-delim | 20 PP_URLREQUESTPROPERTY_HEADERS, // string, \n-delim |
| 20 PP_URLREQUESTPROPERTY_STREAMTOFILE, // PP_Bool (default=PP_FALSE) | 21 PP_URLREQUESTPROPERTY_STREAMTOFILE, // PP_Bool (default=PP_FALSE) |
| 21 PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS, // PP_Bool (default=PP_TRUE) | 22 PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS, // PP_Bool (default=PP_TRUE) |
| 22 | 23 |
| 23 // Set to true if you want to be able to poll the download progress via the | 24 // Set to true if you want to be able to poll the download progress via the |
| 24 // URLLoader.GetDownloadProgress function. | 25 // URLLoader.GetDownloadProgress function. |
| 25 // | 26 // |
| 26 // Boolean (default = PP_FALSE). | 27 // Boolean (default = PP_FALSE). |
| 27 PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, | 28 PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS, |
| 28 | 29 |
| 29 // Set to true if you want to be able to pull the upload progress via the | 30 // Set to true if you want to be able to pull the upload progress via the |
| 30 // URLLoader.GetUploadProgress function. | 31 // URLLoader.GetUploadProgress function. |
| 31 // | 32 // |
| 32 // Boolean (default = PP_FALSE). | 33 // Boolean (default = PP_FALSE). |
| 33 PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS | 34 PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS |
| 34 } PP_URLRequestProperty; | 35 } PP_URLRequestProperty; |
| 36 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4); |
| 35 | 37 |
| 36 #define PPB_URLREQUESTINFO_INTERFACE "PPB_URLRequestInfo;1" | 38 #define PPB_URLREQUESTINFO_INTERFACE "PPB_URLRequestInfo;1.1" |
| 37 | 39 |
| 38 struct PPB_URLRequestInfo { | 40 struct PPB_URLRequestInfo { |
| 39 // Create a new URLRequestInfo object. Returns 0 if the module is invalid. | 41 // Create a new URLRequestInfo object. Returns 0 if the module is invalid. |
| 40 PP_Resource (*Create)(PP_Module module); | 42 PP_Resource (*Create)(PP_Module module); |
| 41 | 43 |
| 42 // Returns PP_TRUE if the given resource is an URLRequestInfo. Returns | 44 // Returns PP_TRUE if the given resource is an URLRequestInfo. Returns |
| 43 // PP_FALSE if the resource is invalid or some type other than an | 45 // PP_FALSE if the resource is invalid or some type other than an |
| 44 // URLRequestInfo. | 46 // URLRequestInfo. |
| 45 PP_Bool (*IsURLRequestInfo)(PP_Resource resource); | 47 PP_Bool (*IsURLRequestInfo)(PP_Resource resource); |
| 46 | 48 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 // | 78 // |
| 77 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. | 79 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. |
| 78 PP_Bool (*AppendFileToBody)(PP_Resource request, | 80 PP_Bool (*AppendFileToBody)(PP_Resource request, |
| 79 PP_Resource file_ref, | 81 PP_Resource file_ref, |
| 80 int64_t start_offset, | 82 int64_t start_offset, |
| 81 int64_t number_of_bytes, | 83 int64_t number_of_bytes, |
| 82 PP_Time expected_last_modified_time); | 84 PP_Time expected_last_modified_time); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 #endif // PPAPI_C_PPB_URL_REQUEST_INFO_H_ | 87 #endif // PPAPI_C_PPB_URL_REQUEST_INFO_H_ |
| OLD | NEW |