| 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 Wed Nov 27 15:42:55 2013. | 7 * modified Tue Dec 3 17:05:10 2013. |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 /** | 53 /** |
| 54 * Creates a session. <code>type</code> contains the MIME type of | 54 * Creates a session. <code>type</code> contains the MIME type of |
| 55 * <code>init_data</code>. <code>init_data</code> is a data buffer | 55 * <code>init_data</code>. <code>init_data</code> is a data buffer |
| 56 * containing data for use in generating the request. | 56 * containing data for use in generating the request. |
| 57 * | 57 * |
| 58 * Note: <code>CreateSession()</code> must create the session ID used in | 58 * Note: <code>CreateSession()</code> must create the session ID used in |
| 59 * other methods on this interface. The session ID must be provided to the | 59 * other methods on this interface. The session ID must be provided to the |
| 60 * browser by the CDM via <code>SessionCreated()</code> on the | 60 * browser by the CDM via <code>SessionCreated()</code> on the |
| 61 * <code>PPB_ContentDecryptor_Private</code> interface. | 61 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 62 * | 62 * |
| 63 * @param[in] reference_id A reference for the session for which a session | 63 * @param[in] session_id A reference for the session for which a session |
| 64 * should be generated. | 64 * should be generated. |
| 65 * | 65 * |
| 66 * @param[in] type A <code>PP_Var</code> of type | 66 * @param[in] type A <code>PP_Var</code> of type |
| 67 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. | 67 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. |
| 68 * | 68 * |
| 69 * @param[in] init_data A <code>PP_Var</code> of type | 69 * @param[in] init_data A <code>PP_Var</code> of type |
| 70 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific | 70 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 71 * initialization data. | 71 * initialization data. |
| 72 */ | 72 */ |
| 73 void (*CreateSession)(PP_Instance instance, | 73 void (*CreateSession)(PP_Instance instance, |
| 74 uint32_t reference_id, | 74 uint32_t session_id, |
| 75 struct PP_Var type, | 75 struct PP_Var type, |
| 76 struct PP_Var init_data); | 76 struct PP_Var init_data); |
| 77 /** | 77 /** |
| 78 * Provides a license or other message to the decryptor. | 78 * Provides a license or other message to the decryptor. |
| 79 * | 79 * |
| 80 * When the CDM needs more information, it must call | 80 * When the CDM needs more information, it must call |
| 81 * <code>SessionMessage()</code> on the | 81 * <code>SessionMessage()</code> on the |
| 82 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 82 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
| 83 * must notify the web application. When the CDM has finished processing | 83 * must notify the web application. When the CDM has finished processing |
| 84 * <code>response</code> and needs no more information, it must call | 84 * <code>response</code> and needs no more information, it must call |
| 85 * <code>SessionReady()</code> on the | 85 * <code>SessionReady()</code> on the |
| 86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
| 87 * must notify the web application. | 87 * must notify the web application. |
| 88 * | 88 * |
| 89 * @param[in] reference_id A reference for the session to update. | 89 * @param[in] session_id A reference for the session to update. |
| 90 * | 90 * |
| 91 * @param[in] response A <code>PP_Var</code> of type | 91 * @param[in] response A <code>PP_Var</code> of type |
| 92 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other | 92 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other |
| 93 * message for the given session ID. | 93 * message for the given session ID. |
| 94 */ | 94 */ |
| 95 void (*UpdateSession)(PP_Instance instance, | 95 void (*UpdateSession)(PP_Instance instance, |
| 96 uint32_t reference_id, | 96 uint32_t session_id, |
| 97 struct PP_Var response); | 97 struct PP_Var response); |
| 98 /** | 98 /** |
| 99 * Release the specified session and related resources. | 99 * Release the specified session and related resources. |
| 100 * | 100 * |
| 101 * @param[in] reference_id A reference for the session that should be | 101 * @param[in] session_id A reference for the session that should be |
| 102 * released. | 102 * released. |
| 103 */ | 103 */ |
| 104 void (*ReleaseSession)(PP_Instance instance, uint32_t reference_id); | 104 void (*ReleaseSession)(PP_Instance instance, uint32_t session_id); |
| 105 /** | 105 /** |
| 106 * Decrypts the block and returns the unencrypted block via | 106 * Decrypts the block and returns the unencrypted block via |
| 107 * <code>DeliverBlock()</code> on the | 107 * <code>DeliverBlock()</code> on the |
| 108 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 108 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
| 109 * contains encoded data. | 109 * contains encoded data. |
| 110 * | 110 * |
| 111 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 111 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
| 112 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 112 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
| 113 * block. | 113 * block. |
| 114 * | 114 * |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 const struct PP_EncryptedBlockInfo* encrypted_block_info); | 228 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 typedef struct PPP_ContentDecryptor_Private_0_9 PPP_ContentDecryptor_Private; | 231 typedef struct PPP_ContentDecryptor_Private_0_9 PPP_ContentDecryptor_Private; |
| 232 /** | 232 /** |
| 233 * @} | 233 * @} |
| 234 */ | 234 */ |
| 235 | 235 |
| 236 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 236 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
| 237 | 237 |
| OLD | NEW |