Source release 15.0.0
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
#ifndef WVCDM_CORE_LICENSE_H_
|
||||
#define WVCDM_CORE_LICENSE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "initialization_data.h"
|
||||
#include "license_protocol.pb.h"
|
||||
#include "scoped_ptr.h"
|
||||
#include "service_certificate.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
@@ -57,14 +57,15 @@ class CdmLicense {
|
||||
virtual CdmResponseType HandleEmbeddedKeyData(
|
||||
const InitializationData& init_data);
|
||||
|
||||
virtual bool RestoreOfflineLicense(
|
||||
virtual CdmResponseType RestoreOfflineLicense(
|
||||
const CdmKeyMessage& license_request,
|
||||
const CdmKeyResponse& license_response,
|
||||
const CdmKeyResponse& license_renewal_response,
|
||||
int64_t playback_start_time, int64_t last_playback_time,
|
||||
int64_t grace_period_end_time, CdmSession* cdm_session);
|
||||
virtual bool RestoreLicenseForRelease(const CdmKeyMessage& license_request,
|
||||
const CdmKeyResponse& license_response);
|
||||
virtual CdmResponseType RestoreLicenseForRelease(
|
||||
const CdmKeyMessage& license_request,
|
||||
const CdmKeyResponse& license_response);
|
||||
virtual bool HasInitData() { return stored_init_data_.get(); }
|
||||
virtual bool IsKeyLoaded(const KeyId& key_id);
|
||||
|
||||
@@ -84,6 +85,7 @@ class CdmLicense {
|
||||
|
||||
CdmResponseType PrepareClientId(
|
||||
const CdmAppParameterMap& app_parameters,
|
||||
const std::string& provider_client_token,
|
||||
video_widevine::LicenseRequest* license_request);
|
||||
|
||||
CdmResponseType PrepareContentId(
|
||||
@@ -108,7 +110,6 @@ class CdmLicense {
|
||||
|
||||
CdmResponseType HandleNewEntitledKeys(
|
||||
const std::vector<WidevinePsshData_EntitledKey>& wrapped_keys);
|
||||
CdmResponseType HandleSubLicense(const InitializationData& init_data);
|
||||
|
||||
template <typename T>
|
||||
bool SetTypeAndId(CdmLicenseType license_type, const std::string& request_id,
|
||||
@@ -121,7 +122,7 @@ class CdmLicense {
|
||||
CdmClientTokenType client_token_type_;
|
||||
std::string device_id_;
|
||||
const CdmSessionId session_id_;
|
||||
scoped_ptr<InitializationData> stored_init_data_;
|
||||
std::unique_ptr<InitializationData> stored_init_data_;
|
||||
bool initialized_;
|
||||
std::set<KeyId> loaded_keys_;
|
||||
std::string provider_session_token_;
|
||||
@@ -135,7 +136,7 @@ class CdmLicense {
|
||||
// Used for certificate based licensing
|
||||
CdmKeyMessage key_request_;
|
||||
|
||||
scoped_ptr<Clock> clock_;
|
||||
std::unique_ptr<Clock> clock_;
|
||||
|
||||
// For testing
|
||||
// CdmLicense takes ownership of the clock.
|
||||
@@ -147,13 +148,11 @@ class CdmLicense {
|
||||
// entitelement keys. It is also used in updating the key status info.
|
||||
std::vector<WidevinePsshData_EntitledKey> wrapped_keys_;
|
||||
|
||||
// For sublicense key embedding. This key array will be initialized with any
|
||||
// sub session keys we may have received in a license response. These keys
|
||||
// may be used to support key rotation.
|
||||
std::vector<CryptoKey> entitlement_key_array_;
|
||||
|
||||
CdmLicenseKeyType license_key_type_;
|
||||
RepeatedPtrField<License_KeyContainer> entitlement_keys_;
|
||||
|
||||
std::string provider_client_token_;
|
||||
|
||||
#if defined(UNIT_TEST)
|
||||
friend class CdmLicenseTestPeer;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user