| 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_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" |
| 8 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
| 9 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| 10 | 11 |
| 11 typedef enum { | 12 typedef enum { |
| 12 PP_URLRESPONSEPROPERTY_URL, // string | 13 PP_URLRESPONSEPROPERTY_URL, // string |
| 13 PP_URLRESPONSEPROPERTY_REDIRECTURL, // string | 14 PP_URLRESPONSEPROPERTY_REDIRECTURL, // string |
| 14 PP_URLRESPONSEPROPERTY_REDIRECTMETHOD, // string | 15 PP_URLRESPONSEPROPERTY_REDIRECTMETHOD, // string |
| 15 PP_URLRESPONSEPROPERTY_STATUSCODE, // int32 | 16 PP_URLRESPONSEPROPERTY_STATUSCODE, // int32 |
| 16 PP_URLRESPONSEPROPERTY_STATUSLINE, // string | 17 PP_URLRESPONSEPROPERTY_STATUSLINE, // string |
| 17 PP_URLRESPONSEPROPERTY_HEADERS // string, \n-delim | 18 PP_URLRESPONSEPROPERTY_HEADERS // string, \n-delim |
| 18 } PP_URLResponseProperty_Dev; | 19 } PP_URLResponseProperty_Dev; |
| 19 | 20 |
| 20 #define PPB_URLRESPONSEINFO_DEV_INTERFACE "PPB_URLResponseInfo(Dev);0.1" | 21 #define PPB_URLRESPONSEINFO_DEV_INTERFACE "PPB_URLResponseInfo(Dev);0.2" |
| 21 | 22 |
| 22 struct PPB_URLResponseInfo_Dev { | 23 struct PPB_URLResponseInfo_Dev { |
| 23 // Returns true if the given resource is an URLResponseInfo. Returns false if | 24 // Returns PP_TRUE if the given resource is an URLResponseInfo. Returns |
| 24 // the resource is invalid or some type other than an URLResponseInfo. | 25 // PP_FALSE if the resource is invalid or some type other than an |
| 25 bool (*IsURLResponseInfo)(PP_Resource resource); | 26 // URLResponseInfo. |
| 27 PP_Bool (*IsURLResponseInfo)(PP_Resource resource); |
| 26 | 28 |
| 27 // Gets a response property. Return PP_VarType_Void if an input parameter is | 29 // Gets a response property. Return PP_VarType_Void if an input parameter is |
| 28 // invalid. | 30 // invalid. |
| 29 PP_Var (*GetProperty)(PP_Resource response, | 31 struct PP_Var (*GetProperty)(PP_Resource response, |
| 30 PP_URLResponseProperty_Dev property); | 32 PP_URLResponseProperty_Dev property); |
| 31 | 33 |
| 32 // Returns a FileRef pointing to the file containing the response body. This | 34 // Returns a FileRef pointing to the file containing the response body. This |
| 33 // is only valid if PP_URLREQUESTPROPERTY_STREAMTOFILE was set on the | 35 // is only valid if PP_URLREQUESTPROPERTY_STREAMTOFILE was set on the |
| 34 // URLRequestInfo used to produce this response. This file remains valid | 36 // URLRequestInfo used to produce this response. This file remains valid |
| 35 // until the URLLoader associated with this URLResponseInfo is closed or | 37 // until the URLLoader associated with this URLResponseInfo is closed or |
| 36 // destroyed. Returns 0 if PP_URLREQUESTPROPERTY_STREAMTOFILE was not | 38 // destroyed. Returns 0 if PP_URLREQUESTPROPERTY_STREAMTOFILE was not |
| 37 // requested or if the URLLoader has not been opened yet. | 39 // requested or if the URLLoader has not been opened yet. |
| 38 PP_Resource (*GetBody)(PP_Resource response); | 40 PP_Resource (*GetBody)(PP_Resource response); |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 #endif // PPAPI_C_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ | 43 #endif // PPAPI_C_DEV_PPB_URL_RESPONSE_INFO_DEV_H_ |
| OLD | NEW |