Source release 19.3.0
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#ifndef WVCDM_CORE_LICENSE_KEY_STATUS_H_
|
||||
#define WVCDM_CORE_LICENSE_KEY_STATUS_H_
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "crypto_session.h"
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "license_protocol.pb.h"
|
||||
#include "wv_cdm_types.h"
|
||||
#include "wv_class_utils.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
@@ -21,7 +21,10 @@ using video_widevine::WidevinePsshData_EntitledKey;
|
||||
// Holds all content and operator session keys for a session.
|
||||
class LicenseKeys {
|
||||
public:
|
||||
LicenseKeys(CdmSecurityLevel security_level)
|
||||
LicenseKeys() = delete;
|
||||
WVCDM_DISALLOW_COPY_AND_MOVE(LicenseKeys);
|
||||
|
||||
explicit LicenseKeys(CdmSecurityLevel security_level)
|
||||
: security_level_(security_level) {}
|
||||
virtual ~LicenseKeys() { Clear(); }
|
||||
|
||||
@@ -83,7 +86,6 @@ class LicenseKeys {
|
||||
|
||||
void Clear();
|
||||
|
||||
bool is_initialized_;
|
||||
// |key_statuses_| can hold either content key statuses, or entitlement key
|
||||
// statuses.
|
||||
std::map<KeyId, LicenseKeyStatus*> key_statuses_;
|
||||
@@ -93,15 +95,17 @@ class LicenseKeys {
|
||||
std::map<KeyId, KeyId> content_keyid_to_entitlement_key_id_;
|
||||
|
||||
CdmSecurityLevel security_level_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(LicenseKeys);
|
||||
};
|
||||
}; // class LicenseKeys
|
||||
|
||||
// Holds the current license status of a key.
|
||||
class LicenseKeyStatus {
|
||||
public:
|
||||
friend class LicenseKeys;
|
||||
|
||||
public:
|
||||
LicenseKeyStatus() = delete;
|
||||
WVCDM_DISALLOW_COPY_AND_MOVE(LicenseKeyStatus);
|
||||
virtual ~LicenseKeyStatus() {}
|
||||
|
||||
// Returns true if the key is a content key (not an operator session key)
|
||||
virtual bool IsContentKey() { return is_content_key_; }
|
||||
|
||||
@@ -145,8 +149,6 @@ class LicenseKeyStatus {
|
||||
|
||||
LicenseKeyStatus(const KeyContainer& key, CdmSecurityLevel level);
|
||||
|
||||
virtual ~LicenseKeyStatus() {}
|
||||
|
||||
private:
|
||||
void ParseContentKey(const KeyContainer& key, CdmSecurityLevel level);
|
||||
void ParseOperatorSessionKey(const KeyContainer& key);
|
||||
@@ -164,10 +166,6 @@ class LicenseKeyStatus {
|
||||
CryptoSession::HdcpCapability last_reported_device_hdcp_level_ = HDCP_NONE;
|
||||
CryptoSession::HdcpCapability last_reported_license_hdcp_level_ = HDCP_NONE;
|
||||
ConstraintList constraints_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(LicenseKeyStatus);
|
||||
};
|
||||
|
||||
}; // class LicenseKeyStatus
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_LICENSE_KEY_STATUS_H_
|
||||
|
||||
Reference in New Issue
Block a user