Source release 14.1.0
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine Master
|
||||
// License Agreement.
|
||||
|
||||
#ifndef WVCDM_CORE_CDM_ENGINE_H_
|
||||
#define WVCDM_CORE_CDM_ENGINE_H_
|
||||
@@ -11,6 +13,7 @@
|
||||
#include "certificate_provisioning.h"
|
||||
#include "clock.h"
|
||||
#include "crypto_session.h"
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "file_store.h"
|
||||
#include "initialization_data.h"
|
||||
#include "lock.h"
|
||||
@@ -18,7 +21,6 @@
|
||||
#include "oemcrypto_adapter.h"
|
||||
#include "scoped_ptr.h"
|
||||
#include "service_certificate.h"
|
||||
#include "timer_metric.h"
|
||||
#include "wv_cdm_constants.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
@@ -39,15 +41,6 @@ class CdmEngine {
|
||||
CdmEngine(FileSystem* file_system, const std::string& spoid = EMPTY_SPOID);
|
||||
virtual ~CdmEngine();
|
||||
|
||||
// Set service certificate used when provisioning under this CDM/CdmEngine.
|
||||
// If no valid service certificate is set, a default one associated with
|
||||
// the WV production provisioning server will be used.
|
||||
virtual CdmResponseType SetProvisioningServiceCertificate(
|
||||
const std::string& certificate);
|
||||
|
||||
// Report whether the service certificate has been set.
|
||||
virtual bool HasProvisioningServiceCertificate();
|
||||
|
||||
// Session related methods
|
||||
virtual CdmResponseType OpenSession(
|
||||
const CdmKeySystem& key_system, CdmClientPropertySet* property_set,
|
||||
@@ -120,8 +113,18 @@ class CdmEngine {
|
||||
virtual CdmResponseType RestoreKey(const CdmSessionId& session_id,
|
||||
const CdmKeySetId& key_set_id);
|
||||
|
||||
// This method releases the crypto resources and policy resources associated
|
||||
// with the given session. This renders the session largely useless. It is
|
||||
// preferable to close the session outright. This method does not delete any
|
||||
// stored offline data associated with the session.
|
||||
virtual CdmResponseType RemoveKeys(const CdmSessionId& session_id);
|
||||
|
||||
// This method removes all offline data associated with the session, such as
|
||||
// offline keys and usage info. It should be used with care, as it deletes the
|
||||
// info immediately and without using a release message, so the server is not
|
||||
// able to receive usage info or track releases for offline licenses.
|
||||
virtual CdmResponseType RemoveLicense(const CdmSessionId& session_id);
|
||||
|
||||
// Construct valid renewal request for the current session keys.
|
||||
virtual CdmResponseType GenerateRenewalRequest(
|
||||
const CdmSessionId& session_id, CdmKeyRequest* key_request);
|
||||
@@ -165,6 +168,7 @@ class CdmEngine {
|
||||
// Generate and return a valid provisioning request.
|
||||
virtual CdmResponseType GetProvisioningRequest(
|
||||
CdmCertificateType cert_type, const std::string& cert_authority,
|
||||
const std::string& service_certificate,
|
||||
CdmProvisioningRequest* request, std::string* default_url);
|
||||
|
||||
// Verify and process a provisioning response.
|
||||
@@ -188,11 +192,13 @@ class CdmEngine {
|
||||
virtual CdmResponseType ListStoredLicenses(
|
||||
CdmSecurityLevel security_level, std::vector<std::string>* key_set_ids);
|
||||
|
||||
// Return the list of key_set_ids stored as usage records on the
|
||||
// current (origin-specific) file system.
|
||||
virtual CdmResponseType ListUsageRecords(
|
||||
// Return the list of IDs associated with usage records for the
|
||||
// current (origin-specific) file system. At least one parameter
|
||||
// |ksids| or |provider_session_tokens| needs to be supplied.
|
||||
virtual CdmResponseType ListUsageIds(
|
||||
const std::string& app_id, CdmSecurityLevel security_level,
|
||||
std::vector<std::string>* ksids);
|
||||
std::vector<std::string>* ksids,
|
||||
std::vector<std::string>* provider_session_tokens);
|
||||
|
||||
// Delete the usage record for the given key_set_id. This removes the
|
||||
// usage record in the file system and the OEMCrypto usage record.
|
||||
@@ -220,6 +226,10 @@ class CdmEngine {
|
||||
// security levels.
|
||||
virtual CdmResponseType RemoveAllUsageInfo(const std::string& app_id);
|
||||
|
||||
virtual CdmResponseType RemoveUsageInfo(
|
||||
const std::string& app_id,
|
||||
const CdmSecureStopId& secure_stop_id);
|
||||
|
||||
virtual CdmResponseType ReleaseUsageInfo(
|
||||
const CdmUsageInfoReleaseMessage& message);
|
||||
virtual CdmResponseType LoadUsageSession(const CdmKeySetId& key_set_id,
|
||||
@@ -281,6 +291,8 @@ class CdmEngine {
|
||||
|
||||
virtual metrics::EngineMetrics* GetMetrics() { return &metrics_; }
|
||||
|
||||
virtual CdmResponseType ValidateServiceCertificate(const std::string& cert);
|
||||
|
||||
private:
|
||||
// private methods
|
||||
CdmResponseType OpenSession(
|
||||
@@ -310,7 +322,6 @@ class CdmEngine {
|
||||
* it is published.
|
||||
*/
|
||||
metrics::EngineMetrics metrics_;
|
||||
metrics::TimerMetric life_span_;
|
||||
|
||||
CdmSessionMap session_map_;
|
||||
CdmReleaseKeySetMap release_key_sets_;
|
||||
@@ -322,9 +333,6 @@ class CdmEngine {
|
||||
|
||||
static bool seeded_;
|
||||
|
||||
// Service certificate for the provisioning server.
|
||||
ServiceCertificate provisioning_service_certificate_;
|
||||
|
||||
// usage related variables
|
||||
scoped_ptr<CdmSession> usage_session_;
|
||||
scoped_ptr<UsagePropertySet> usage_property_set_;
|
||||
|
||||
Reference in New Issue
Block a user