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_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 PP_Bool (*SetProperty)(PP_Resource request, | 80 PP_Bool (*SetProperty)(PP_Resource request, |
81 PP_URLRequestProperty property, | 81 PP_URLRequestProperty property, |
82 struct PP_Var value); | 82 struct PP_Var value); |
83 | 83 |
84 // Append data to the request body. | 84 // Append data to the request body. |
85 // | 85 // |
86 // A Content-Length request header will be automatically generated. | 86 // A Content-Length request header will be automatically generated. |
87 // | 87 // |
88 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. | 88 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. |
89 PP_Bool (*AppendDataToBody)(PP_Resource request, | 89 PP_Bool (*AppendDataToBody)(PP_Resource request, |
90 const char* data, | 90 const void* data, |
91 uint32_t len); | 91 uint32_t len); |
92 | 92 |
93 // Append a file reference to be uploaded. | 93 // Append a file reference to be uploaded. |
94 // | 94 // |
95 // A sub-range of the file starting from start_offset may be specified. If | 95 // A sub-range of the file starting from start_offset may be specified. If |
96 // number_of_bytes is -1, then the sub-range to upload extends to the end of | 96 // number_of_bytes is -1, then the sub-range to upload extends to the end of |
97 // the file. | 97 // the file. |
98 // | 98 // |
99 // An optional (non-zero) last modified time stamp may be provided, which | 99 // An optional (non-zero) last modified time stamp may be provided, which |
100 // will be used to validate that the file was not modified since the given | 100 // will be used to validate that the file was not modified since the given |
101 // time before it is uploaded. The upload will fail with an error code of | 101 // time before it is uploaded. The upload will fail with an error code of |
102 // PP_Error_FileChanged if the file has been modified since the given time. | 102 // PP_Error_FileChanged if the file has been modified since the given time. |
103 // If expected_last_modified_time is 0, then no validation is performed. | 103 // If expected_last_modified_time is 0, then no validation is performed. |
104 // | 104 // |
105 // A Content-Length request header will be automatically generated. | 105 // A Content-Length request header will be automatically generated. |
106 // | 106 // |
107 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. | 107 // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. |
108 PP_Bool (*AppendFileToBody)(PP_Resource request, | 108 PP_Bool (*AppendFileToBody)(PP_Resource request, |
109 PP_Resource file_ref, | 109 PP_Resource file_ref, |
110 int64_t start_offset, | 110 int64_t start_offset, |
111 int64_t number_of_bytes, | 111 int64_t number_of_bytes, |
112 PP_Time expected_last_modified_time); | 112 PP_Time expected_last_modified_time); |
113 }; | 113 }; |
114 /** | 114 /** |
115 * @} | 115 * @} |
116 */ | 116 */ |
117 | 117 |
118 #endif /* PPAPI_C_PPB_URL_REQUEST_INFO_H_ */ | 118 #endif /* PPAPI_C_PPB_URL_REQUEST_INFO_H_ */ |
119 | 119 |
OLD | NEW |