| OLD | NEW | 
|---|
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 | 5 | 
| 6 /* From ppb_var.idl modified Tue Dec  6 11:26:58 2011. */ | 6 /* From ppb_var.idl modified Wed Dec 14 18:08:00 2011. */ | 
| 7 | 7 | 
| 8 #ifndef PPAPI_C_PPB_VAR_H_ | 8 #ifndef PPAPI_C_PPB_VAR_H_ | 
| 9 #define PPAPI_C_PPB_VAR_H_ | 9 #define PPAPI_C_PPB_VAR_H_ | 
| 10 | 10 | 
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" | 
| 12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" | 
| 13 #include "ppapi/c/pp_module.h" | 13 #include "ppapi/c/pp_module.h" | 
| 14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" | 
| 15 #include "ppapi/c/pp_var.h" | 15 #include "ppapi/c/pp_var.h" | 
| 16 | 16 | 
| 17 #define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0" | 17 #define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0" | 
| 18 #define PPB_VAR_INTERFACE_1_1 "PPB_Var;1.1" | 18 #define PPB_VAR_INTERFACE_1_1 "PPB_Var;1.1" | 
| 19 #define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_1 | 19 #define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_1 | 
| 20 | 20 | 
| 21 /** | 21 /** | 
| 22  * @file | 22  * @file | 
| 23  * This file defines the <code>PPB_Var</code> struct. | 23  * This file defines the <code>PPB_Var</code> struct. | 
| 24  */ | 24  */ | 
| 25 | 25 | 
| 26 | 26 | 
| 27 /** | 27 /** | 
| 28  * @addtogroup Interfaces | 28  * @addtogroup Interfaces | 
| 29  * @{ | 29  * @{ | 
| 30  */ | 30  */ | 
| 31 /** | 31 /** | 
| 32  * PPB_Var API | 32  * PPB_Var API | 
| 33  */ | 33  */ | 
| 34 struct PPB_Var { | 34 struct PPB_Var_1_1 { | 
| 35   /** | 35   /** | 
| 36    * AddRef() adds a reference to the given var. If this is not a refcounted | 36    * AddRef() adds a reference to the given var. If this is not a refcounted | 
| 37    * object, this function will do nothing so you can always call it no matter | 37    * object, this function will do nothing so you can always call it no matter | 
| 38    * what the type. | 38    * what the type. | 
| 39    * | 39    * | 
| 40    * @param[in] var A <code>PP_Var</code> that will have a reference added. | 40    * @param[in] var A <code>PP_Var</code> that will have a reference added. | 
| 41    */ | 41    */ | 
| 42   void (*AddRef)(struct PP_Var var); | 42   void (*AddRef)(struct PP_Var var); | 
| 43   /** | 43   /** | 
| 44    * Release() removes a reference to given var, deleting it if the internal | 44    * Release() removes a reference to given var, deleting it if the internal | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 88    * pointer will be to arbitrary memory. | 88    * pointer will be to arbitrary memory. | 
| 89    * | 89    * | 
| 90    * @param[in] var A PP_Var struct containing a string-type var. | 90    * @param[in] var A PP_Var struct containing a string-type var. | 
| 91    * @param[in,out] len A pointer to the length of the string-type var. | 91    * @param[in,out] len A pointer to the length of the string-type var. | 
| 92    * | 92    * | 
| 93    * @return A char* encoded in UTF-8. | 93    * @return A char* encoded in UTF-8. | 
| 94    */ | 94    */ | 
| 95   const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len); | 95   const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len); | 
| 96 }; | 96 }; | 
| 97 | 97 | 
|  | 98 typedef struct PPB_Var_1_1 PPB_Var; | 
|  | 99 | 
| 98 struct PPB_Var_1_0 { | 100 struct PPB_Var_1_0 { | 
| 99   void (*AddRef)(struct PP_Var var); | 101   void (*AddRef)(struct PP_Var var); | 
| 100   void (*Release)(struct PP_Var var); | 102   void (*Release)(struct PP_Var var); | 
| 101   struct PP_Var (*VarFromUtf8)(PP_Module module, | 103   struct PP_Var (*VarFromUtf8)(PP_Module module, | 
| 102                                const char* data, | 104                                const char* data, | 
| 103                                uint32_t len); | 105                                uint32_t len); | 
| 104   const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len); | 106   const char* (*VarToUtf8)(struct PP_Var var, uint32_t* len); | 
| 105 }; | 107 }; | 
| 106 /** | 108 /** | 
| 107  * @} | 109  * @} | 
| 108  */ | 110  */ | 
| 109 | 111 | 
| 110 #endif  /* PPAPI_C_PPB_VAR_H_ */ | 112 #endif  /* PPAPI_C_PPB_VAR_H_ */ | 
| 111 | 113 | 
| OLD | NEW | 
|---|