| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 private/ppp_content_decryptor_private.idl, | 6 /* From private/ppp_content_decryptor_private.idl, |
| 7 * modified Thu May 1 10:36:31 2014. | 7 * modified Tue Aug 19 14:34:01 2014. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ |
| 11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ |
| 12 | 12 |
| 13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
| 14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 44 */ | 44 */ |
| 45 struct PPP_ContentDecryptor_Private_0_12 { | 45 struct PPP_ContentDecryptor_Private_0_12 { |
| 46 /** | 46 /** |
| 47 * Initialize for the specified key system. | 47 * Initialize for the specified key system. |
| 48 * | 48 * |
| 49 * @param[in] key_system A <code>PP_Var</code> of type | 49 * @param[in] key_system A <code>PP_Var</code> of type |
| 50 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | 50 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. |
| 51 */ | 51 */ |
| 52 void (*Initialize)(PP_Instance instance, struct PP_Var key_system); | 52 void (*Initialize)(PP_Instance instance, struct PP_Var key_system); |
| 53 /** | 53 /** |
| 54 * Provides a server certificate to be used to encrypt messages to the |
| 55 * license server. |
| 56 * |
| 57 * @param[in] promise_id A reference for the promise that gets resolved or |
| 58 * rejected depending upon the success or failure of setti ng the certificate. |
| 59 * |
| 60 * @param[in] server_certificate A <code>PP_Var</code> of type |
| 61 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used. |
| 62 */ |
| 63 void (*SetServerCertificate)(PP_Instance instance, |
| 64 uint32_t promise_id, |
| 65 struct PP_Var server_certificate); |
| 66 /** |
| 54 * Creates a session. <code>init_data_type</code> contains the MIME type of | 67 * Creates a session. <code>init_data_type</code> contains the MIME type of |
| 55 * <code>init_data</code>. <code>init_data</code> is a data buffer | 68 * <code>init_data</code>. <code>init_data</code> is a data buffer |
| 56 * containing data for use in generating the request. | 69 * containing data for use in generating the request. |
| 57 * | 70 * |
| 58 * Note: <code>CreateSession()</code> must create a web session ID and provide | 71 * Note: <code>CreateSession()</code> must create a web session ID and provide |
| 59 * it to the browser via <code>SessionCreated()</code> on the | 72 * it to the browser via <code>SessionCreated()</code> on the |
| 60 * <code>PPB_ContentDecryptor_Private</code> interface. | 73 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 61 * | 74 * |
| 62 * @param[in] promise_id A reference for the promise that gets resolved or | 75 * @param[in] promise_id A reference for the promise that gets resolved or |
| 63 * rejected depending upon the success or failure when creating the session. | 76 * rejected depending upon the success or failure when creating the session. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 * | 128 * |
| 116 * @param[in] response A <code>PP_Var</code> of type | 129 * @param[in] response A <code>PP_Var</code> of type |
| 117 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other | 130 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other |
| 118 * message for the given session ID. | 131 * message for the given session ID. |
| 119 */ | 132 */ |
| 120 void (*UpdateSession)(PP_Instance instance, | 133 void (*UpdateSession)(PP_Instance instance, |
| 121 uint32_t promise_id, | 134 uint32_t promise_id, |
| 122 struct PP_Var web_session_id, | 135 struct PP_Var web_session_id, |
| 123 struct PP_Var response); | 136 struct PP_Var response); |
| 124 /** | 137 /** |
| 125 * Release the specified session and related resources. | 138 * Get the key IDs for keys in the session that the CDM knows are currently |
| 139 * usable to decrypt media data. |
| 126 * | 140 * |
| 127 * @param[in] promise_id A reference for the promise that gets resolved or | 141 * @param[in] promise_id A reference for the promise that gets resolved or |
| 128 * rejected depending upon the success or failure of releasing the session. | 142 * rejected depending upon the success or failure of obtaining the key IDs. |
| 129 * | 143 * |
| 130 * @param[in] web_session_id A <code>PP_Var</code> of type | 144 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 131 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | 145 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 132 * to be released. | 146 * to be queried. |
| 133 * | 147 * |
| 134 */ | 148 */ |
| 135 void (*ReleaseSession)(PP_Instance instance, | 149 void (*GetUsableKeyIds)(PP_Instance instance, |
| 136 uint32_t promise_id, | 150 uint32_t promise_id, |
| 137 struct PP_Var web_session_id); | 151 struct PP_Var web_session_id); |
| 152 /** |
| 153 * Close the specified session and related resources. |
| 154 * |
| 155 * @param[in] promise_id A reference for the promise that gets resolved or |
| 156 * rejected depending upon the success or failure of closing the session. |
| 157 * |
| 158 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 159 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 160 * to be closed. |
| 161 * |
| 162 */ |
| 163 void (*CloseSession)(PP_Instance instance, |
| 164 uint32_t promise_id, |
| 165 struct PP_Var web_session_id); |
| 166 /** |
| 167 * Remove stored data associated with this session. |
| 168 * |
| 169 * @param[in] promise_id A reference for the promise that gets resolved or |
| 170 * rejected depending upon the success or failure of removing the session |
| 171 * data. |
| 172 * |
| 173 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 174 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 175 * to be removed. |
| 176 * |
| 177 */ |
| 178 void (*RemoveSession)(PP_Instance instance, |
| 179 uint32_t promise_id, |
| 180 struct PP_Var web_session_id); |
| 138 /** | 181 /** |
| 139 * Decrypts the block and returns the unencrypted block via | 182 * Decrypts the block and returns the unencrypted block via |
| 140 * <code>DeliverBlock()</code> on the | 183 * <code>DeliverBlock()</code> on the |
| 141 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 184 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
| 142 * contains encoded data. | 185 * contains encoded data. |
| 143 * | 186 * |
| 144 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 187 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
| 145 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 188 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
| 146 * block. | 189 * block. |
| 147 * | 190 * |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 const struct PP_EncryptedBlockInfo* encrypted_block_info); | 304 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
| 262 }; | 305 }; |
| 263 | 306 |
| 264 typedef struct PPP_ContentDecryptor_Private_0_12 PPP_ContentDecryptor_Private; | 307 typedef struct PPP_ContentDecryptor_Private_0_12 PPP_ContentDecryptor_Private; |
| 265 /** | 308 /** |
| 266 * @} | 309 * @} |
| 267 */ | 310 */ |
| 268 | 311 |
| 269 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 312 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
| 270 | 313 |
| OLD | NEW |