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 /** | 6 /** |
7 * This file defines the <code>PPP_ContentDecryptor_Private</code> | 7 * This file defines the <code>PPP_ContentDecryptor_Private</code> |
8 * interface. Note: This is a special interface, only to be used for Content | 8 * interface. Note: This is a special interface, only to be used for Content |
9 * Decryption Modules, not normal plugins. | 9 * Decryption Modules, not normal plugins. |
10 */ | 10 */ |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * Initialize for the specified key system. | 24 * Initialize for the specified key system. |
25 * | 25 * |
26 * @param[in] key_system A <code>PP_Var</code> of type | 26 * @param[in] key_system A <code>PP_Var</code> of type |
27 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | 27 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. |
28 */ | 28 */ |
29 void Initialize( | 29 void Initialize( |
30 [in] PP_Instance instance, | 30 [in] PP_Instance instance, |
31 [in] PP_Var key_system); | 31 [in] PP_Var key_system); |
32 | 32 |
33 /** | 33 /** |
34 * Provides a server certificate to be used to encrypt messages to the | |
35 * license server. | |
36 * | |
37 * @param[in] promise_id A reference for the promise that gets resolved or | |
38 * rejected depending upon the success or failure of setting the certificate. | |
39 * | |
40 * @param[in] server_certificate A <code>PP_Var</code> of type | |
41 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used. | |
palmer
2014/08/26 19:09:21
What format is the certificate in?
jrummell
2014/08/29 22:35:35
The EME spec states "The contents of serverCertifi
| |
42 */ | |
43 void SetServerCertificate( | |
44 [in] PP_Instance instance, | |
45 [in] uint32_t promise_id, | |
46 [in] PP_Var server_certificate); | |
47 | |
48 /** | |
34 * Creates a session. <code>init_data_type</code> contains the MIME type of | 49 * Creates a session. <code>init_data_type</code> contains the MIME type of |
35 * <code>init_data</code>. <code>init_data</code> is a data buffer | 50 * <code>init_data</code>. <code>init_data</code> is a data buffer |
36 * containing data for use in generating the request. | 51 * containing data for use in generating the request. |
37 * | 52 * |
38 * Note: <code>CreateSession()</code> must create a web session ID and provide | 53 * Note: <code>CreateSession()</code> must create a web session ID and provide |
39 * it to the browser via <code>SessionCreated()</code> on the | 54 * it to the browser via <code>SessionCreated()</code> on the |
40 * <code>PPB_ContentDecryptor_Private</code> interface. | 55 * <code>PPB_ContentDecryptor_Private</code> interface. |
41 * | 56 * |
42 * @param[in] promise_id A reference for the promise that gets resolved or | 57 * @param[in] promise_id A reference for the promise that gets resolved or |
43 * rejected depending upon the success or failure when creating the session. | 58 * rejected depending upon the success or failure when creating the session. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other | 116 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other |
102 * message for the given session ID. | 117 * message for the given session ID. |
103 */ | 118 */ |
104 void UpdateSession( | 119 void UpdateSession( |
105 [in] PP_Instance instance, | 120 [in] PP_Instance instance, |
106 [in] uint32_t promise_id, | 121 [in] uint32_t promise_id, |
107 [in] PP_Var web_session_id, | 122 [in] PP_Var web_session_id, |
108 [in] PP_Var response); | 123 [in] PP_Var response); |
109 | 124 |
110 /** | 125 /** |
111 * Release the specified session and related resources. | 126 * Close the specified session and related resources. |
112 * | 127 * |
113 * @param[in] promise_id A reference for the promise that gets resolved or | 128 * @param[in] promise_id A reference for the promise that gets resolved or |
114 * rejected depending upon the success or failure of releasing the session. | 129 * rejected depending upon the success or failure of closing the session. |
115 * | 130 * |
116 * @param[in] web_session_id A <code>PP_Var</code> of type | 131 * @param[in] web_session_id A <code>PP_Var</code> of type |
117 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | 132 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
118 * to be released. | 133 * to be closed. |
119 * | 134 * |
120 */ | 135 */ |
121 void ReleaseSession( | 136 void CloseSession( |
122 [in] PP_Instance instance, | 137 [in] PP_Instance instance, |
123 [in] uint32_t promise_id, | 138 [in] uint32_t promise_id, |
124 [in] PP_Var web_session_id); | 139 [in] PP_Var web_session_id); |
140 | |
141 /** | |
142 * Remove stored data associated with this session. | |
143 * | |
144 * @param[in] promise_id A reference for the promise that gets resolved or | |
145 * rejected depending upon the success or failure of removing the session | |
146 * data. | |
147 * | |
148 * @param[in] web_session_id A <code>PP_Var</code> of type | |
149 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | |
150 * to be removed. | |
151 * | |
152 */ | |
153 void RemoveSession( | |
154 [in] PP_Instance instance, | |
155 [in] uint32_t promise_id, | |
156 [in] PP_Var web_session_id); | |
157 | |
158 /** | |
159 * Get the key IDs for keys in the session that the CDM knows are currently | |
160 * usable to decrypt media data. | |
161 * | |
162 * @param[in] promise_id A reference for the promise that gets resolved or | |
163 * rejected depending upon the success or failure of obtaining the key IDs. | |
164 * | |
165 * @param[in] web_session_id A <code>PP_Var</code> of type | |
166 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | |
167 * to be queried. | |
168 * | |
169 */ | |
170 void GetUsableKeyIds( | |
171 [in] PP_Instance instance, | |
172 [in] uint32_t promise_id, | |
173 [in] PP_Var web_session_id); | |
125 | 174 |
126 /** | 175 /** |
127 * Decrypts the block and returns the unencrypted block via | 176 * Decrypts the block and returns the unencrypted block via |
128 * <code>DeliverBlock()</code> on the | 177 * <code>DeliverBlock()</code> on the |
129 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 178 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
130 * contains encoded data. | 179 * contains encoded data. |
131 * | 180 * |
132 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 181 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
133 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 182 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
134 * block. | 183 * block. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 297 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
249 * contains all auxiliary information needed for decryption of the | 298 * contains all auxiliary information needed for decryption of the |
250 * <code>encrypted_block</code>. | 299 * <code>encrypted_block</code>. |
251 */ | 300 */ |
252 void DecryptAndDecode( | 301 void DecryptAndDecode( |
253 [in] PP_Instance instance, | 302 [in] PP_Instance instance, |
254 [in] PP_DecryptorStreamType decoder_type, | 303 [in] PP_DecryptorStreamType decoder_type, |
255 [in] PP_Resource encrypted_buffer, | 304 [in] PP_Resource encrypted_buffer, |
256 [in] PP_EncryptedBlockInfo encrypted_block_info); | 305 [in] PP_EncryptedBlockInfo encrypted_block_info); |
257 }; | 306 }; |
OLD | NEW |