Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: content_decryption_module_broker.h

Issue 2446413003: Add cdm::ContentDecryptionModule_9 (Closed)
Patch Set: export again Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content_decryption_module.h ('k') | content_decryption_module_export.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5793a6d121ddd5feb21ed7779c4374d4c80f060f
--- /dev/null
+++ b/content_decryption_module_broker.h
@@ -0,0 +1,48 @@
+// 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 "content_decryption_module_export.h"
+
+// Define FilePathCharType to be the type of characters passed when
+// specifying file paths to ProcessHostChallenge()
+#if defined(WIN32)
+// On Windows, for Unicode-aware applications, native pathnames are wchar_t
+// arrays.
+typedef wchar_t FilePathCharType;
+#else
+// On other platforms, native pathnames are char arrays.
+typedef char FilePathCharType;
+#endif // defined(WIN32)
+
+extern "C" {
+// Returns the |response| to ProcessHostChallenge(). If the challenge fails,
+// |response| = nullptr and |response_size| = 0. |context| must be the value
+// passed in to ProcessHostChallenge().
+typedef void (*HostResponseFunc)(const uint8_t* response,
+ uint32_t response_size,
+ void* context);
+
+// 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_func| is called when the challenge has been processed, passing
+// |context| along with the desired response data.
+CDM_API void ProcessHostChallenge(const uint8_t* challenge,
+ uint32_t challenge_size,
+ const FilePathCharType** binary_file_paths,
+ uint32_t num_binary_file_paths,
+ HostResponseFunc response_func,
+ void* context);
+}
+
+#endif // CDM_CONTENT_DECRYPTION_MODULE_BROKER_H_
« no previous file with comments | « content_decryption_module.h ('k') | content_decryption_module_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698