Index: content_decryption_module_broker.h |
diff --git a/content_decryption_module_broker.h b/content_decryption_module_broker.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..aa6365749e879fad082c857b9730ed6bb0d83cf2 |
--- /dev/null |
+++ b/content_decryption_module_broker.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ |
+#define CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ |
+ |
+#if defined(_MSC_VER) |
+typedef unsigned char uint8_t; |
+typedef unsigned int uint32_t; |
+#else |
+#include <stdint.h> |
+#endif |
+ |
+#include "media/cdm/api/content_decryption_module_export.h" |
+ |
+extern "C" { |
+// Returns the |response| to ProcessHostChallenge(). If the challenge fails, |
+// |response| = nullptr and |response_size| = 0. |user_data| must be the value |
+// passed in to ProcessHostChallenge(). |
+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.
|
+ uint32_t response_size, |
+ 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.
|
+ |
+// This method receives the |challenge| from the CDM as well as a list of |
+// additional binary file paths created by the host and a callback function. |
+// |response_callback| is called when the challenge has been processed, passing |
+// |user_data| along with the desired response data. |
+CDM_API void ProcessHostChallenge(const uint8_t* challenge, |
+ uint32_t challenge_size, |
+ 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.
|
+ uint32_t num_binary_file_paths, |
+ 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
|
+ void* user_data); |
+} |
+ |
+#endif // CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_ |