OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ | |
6 #define CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ | |
7 | |
8 #if defined(_MSC_VER) | |
9 typedef unsigned char uint8_t; | |
10 typedef unsigned int uint32_t; | |
11 #else | |
12 #include <stdint.h> | |
13 #endif | |
14 | |
15 #include "media/cdm/api/content_decryption_module_export.h" | |
16 | |
17 extern "C" { | |
18 // Returns the |response| to ProcessHostChallenge(). If the challenge fails, | |
19 // |response| = nullptr and |response_size| = 0. |user_data| must be the value | |
20 // passed in to ProcessHostChallenge(). | |
21 typedef void (*HostResponseCallback)(const uint8_t* response, | |
xhwang
2016/10/28 18:18:14
I am prototyping this and found "Callback" to be m
jrummell
2016/10/31 21:04:37
Done.
| |
22 uint32_t response_size, | |
23 void* user_data); | |
tinskip
2016/10/27 00:32:47
s/user_data/context/ here and below? A bit cleare
jrummell
2016/10/31 21:04:37
Done.
| |
24 | |
25 // This method receives the |challenge| from the CDM as well as a list of | |
26 // additional binary file paths created by the host and a callback function. | |
27 // |response_callback| is called when the challenge has been processed, passing | |
28 // |user_data| along with the desired response data. | |
29 CDM_API void ProcessHostChallenge(const uint8_t* challenge, | |
30 uint32_t challenge_size, | |
31 const char** binary_file_paths, | |
xhwang
2016/10/28 06:34:25
In chromium the chat type for base::FilePath is ch
jrummell
2016/10/31 21:04:37
Done.
| |
32 uint32_t num_binary_file_paths, | |
33 HostResponseCallback response_callback, | |
xhwang
2016/10/28 06:34:25
Can we require this callback to be called synchron
xhwang
2016/10/28 06:53:58
Actually, if we require this callback to be called
| |
34 void* user_data); | |
35 } | |
36 | |
37 #endif // CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ | |
OLD | NEW |