Replace typedef with using statement in cdm/core/ files.
[ Merge of http://go/wvgerrit/80805 ] This change was used only where `typedef` was used for type aliasing, and not for defining a new type (such as enums, structs, or function pointer types). Clang-format was used on the changed files. Test: WV unit tests Bug: 134437705 Change-Id: I730b9709a5ac773b3036daa79024caab665b3daa
This commit is contained in:
@@ -33,8 +33,8 @@ class UsagePropertySet;
|
||||
class WvCdmEventListener;
|
||||
|
||||
// Keep expiration time for each key set
|
||||
typedef std::map<CdmKeySetId, std::pair<CdmSessionId, int64_t> >
|
||||
CdmReleaseKeySetMap;
|
||||
using CdmReleaseKeySetMap =
|
||||
std::map<CdmKeySetId, std::pair<CdmSessionId, int64_t> >;
|
||||
|
||||
class CdmEngine {
|
||||
public:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
typedef std::list<std::shared_ptr<CdmSession> > CdmSessionList;
|
||||
using CdmSessionList = std::list<std::shared_ptr<CdmSession> >;
|
||||
|
||||
// TODO(rfrias): Concurrency protection for this class has moved to CdmEngine.
|
||||
// Add it back when locks to control access to session usage and destruction
|
||||
@@ -43,8 +43,8 @@ class CdmSessionMap {
|
||||
void GetSessionList(CdmSessionList& sessions);
|
||||
|
||||
private:
|
||||
typedef std::map<CdmSessionId, std::shared_ptr<CdmSession> >
|
||||
CdmIdToSessionMap;
|
||||
using CdmIdToSessionMap =
|
||||
std::map<CdmSessionId, std::shared_ptr<CdmSession> >;
|
||||
|
||||
bool FindSessionNoLock(const CdmSessionId& session_id,
|
||||
std::shared_ptr<CdmSession>* session);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace wvcdm {
|
||||
class CryptoKey;
|
||||
class UsageTableHeader;
|
||||
|
||||
typedef std::map<std::string, CryptoKey*> CryptoKeyMap;
|
||||
using CryptoKeyMap = std::map<std::string, CryptoKey*>;
|
||||
|
||||
// Crypto session utility functions used by KeySession implementations.
|
||||
void GenerateMacContext(const std::string& input_context,
|
||||
@@ -43,7 +43,7 @@ class CryptoSessionFactory;
|
||||
|
||||
class CryptoSession {
|
||||
public:
|
||||
typedef OEMCrypto_HDCP_Capability HdcpCapability;
|
||||
using HdcpCapability = OEMCrypto_HDCP_Capability;
|
||||
typedef enum {
|
||||
kUsageDurationsInvalid = 0,
|
||||
kUsageDurationPlaybackNotBegun = 1,
|
||||
|
||||
@@ -77,9 +77,9 @@ class LicenseKeys {
|
||||
}
|
||||
|
||||
private:
|
||||
typedef ::video_widevine::License::KeyContainer KeyContainer;
|
||||
typedef std::map<wvcdm::KeyId, LicenseKeyStatus*>::const_iterator
|
||||
LicenseKeyStatusIterator;
|
||||
using KeyContainer = ::video_widevine::License::KeyContainer;
|
||||
using LicenseKeyStatusIterator =
|
||||
std::map<wvcdm::KeyId, LicenseKeyStatus*>::const_iterator;
|
||||
|
||||
void Clear();
|
||||
|
||||
@@ -135,13 +135,13 @@ class LicenseKeyStatus {
|
||||
CryptoSession::HdcpCapability new_hdcp_level);
|
||||
|
||||
protected:
|
||||
typedef ::video_widevine::License::KeyContainer KeyContainer;
|
||||
typedef KeyContainer::OperatorSessionKeyPermissions
|
||||
OperatorSessionKeyPermissions;
|
||||
typedef KeyContainer::OutputProtection OutputProtection;
|
||||
typedef KeyContainer::VideoResolutionConstraint VideoResolutionConstraint;
|
||||
typedef ::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>
|
||||
ConstraintList;
|
||||
using KeyContainer = ::video_widevine::License::KeyContainer;
|
||||
using OperatorSessionKeyPermissions =
|
||||
KeyContainer::OperatorSessionKeyPermissions;
|
||||
using OutputProtection = KeyContainer::OutputProtection;
|
||||
using VideoResolutionConstraint = KeyContainer::VideoResolutionConstraint;
|
||||
using ConstraintList =
|
||||
::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>;
|
||||
|
||||
LicenseKeyStatus(const KeyContainer& key, const CdmSecurityLevel level);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
typedef std::map<CdmSessionId, CdmClientPropertySet*> CdmClientPropertySetMap;
|
||||
using CdmClientPropertySetMap = std::map<CdmSessionId, CdmClientPropertySet*>;
|
||||
|
||||
// This class saves information about features and properties enabled
|
||||
// for a given platform. At initialization it initializes properties from
|
||||
|
||||
@@ -14,25 +14,25 @@
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
typedef std::string CdmKeySystem;
|
||||
typedef std::string CdmInitData;
|
||||
typedef std::string CdmKeyMessage;
|
||||
typedef std::string CdmKeyResponse;
|
||||
typedef std::string KeyId;
|
||||
typedef std::string CdmSecureStopId;
|
||||
typedef std::string CdmSessionId;
|
||||
typedef std::string CdmKeySetId;
|
||||
typedef std::string RequestId;
|
||||
typedef uint32_t CryptoResult;
|
||||
typedef uint32_t CryptoSessionId;
|
||||
typedef std::map<std::string, std::string> CdmAppParameterMap;
|
||||
typedef std::map<std::string, std::string> CdmQueryMap;
|
||||
typedef std::vector<std::string> CdmUsageInfo;
|
||||
typedef std::string CdmUsageInfoReleaseMessage;
|
||||
typedef std::string CdmProvisioningRequest;
|
||||
typedef std::string CdmProvisioningResponse;
|
||||
typedef std::string CdmUsageTableHeader;
|
||||
typedef std::string CdmUsageEntry;
|
||||
using CdmKeySystem = std::string;
|
||||
using CdmInitData = std::string;
|
||||
using CdmKeyMessage = std::string;
|
||||
using CdmKeyResponse = std::string;
|
||||
using KeyId = std::string;
|
||||
using CdmSecureStopId = std::string;
|
||||
using CdmSessionId = std::string;
|
||||
using CdmKeySetId = std::string;
|
||||
using RequestId = std::string;
|
||||
using CryptoResult = uint32_t;
|
||||
using CryptoSessionId = uint32_t;
|
||||
using CdmAppParameterMap = std::map<std::string, std::string>;
|
||||
using CdmQueryMap = std::map<std::string, std::string>;
|
||||
using CdmUsageInfo = std::vector<std::string>;
|
||||
using CdmUsageInfoReleaseMessage = std::string;
|
||||
using CdmProvisioningRequest = std::string;
|
||||
using CdmProvisioningResponse = std::string;
|
||||
using CdmUsageTableHeader = std::string;
|
||||
using CdmUsageEntry = std::string;
|
||||
|
||||
enum CdmKeyRequestType {
|
||||
kKeyRequestTypeUnknown,
|
||||
@@ -411,7 +411,7 @@ enum CdmKeyStatus {
|
||||
kKeyStatusInternalError,
|
||||
kKeyStatusUsableInFuture,
|
||||
};
|
||||
typedef std::map<KeyId, CdmKeyStatus> CdmKeyStatusMap;
|
||||
using CdmKeyStatusMap = std::map<KeyId, CdmKeyStatus>;
|
||||
|
||||
enum CdmLicenseType {
|
||||
kLicenseTypeOffline,
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
namespace {
|
||||
// License protocol aliases
|
||||
typedef ::video_widevine::License::KeyContainer KeyContainer;
|
||||
typedef KeyContainer::OutputProtection OutputProtection;
|
||||
typedef KeyContainer::VideoResolutionConstraint VideoResolutionConstraint;
|
||||
typedef ::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>
|
||||
ConstraintList;
|
||||
using KeyContainer = ::video_widevine::License::KeyContainer;
|
||||
using OutputProtection = KeyContainer::OutputProtection;
|
||||
using VideoResolutionConstraint = KeyContainer::VideoResolutionConstraint;
|
||||
using ConstraintList =
|
||||
::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>;
|
||||
|
||||
// Map the HDCP protection associated with a key in the license to
|
||||
// an equivalent OEMCrypto HDCP protection level
|
||||
@@ -49,7 +49,7 @@ wvcdm::CryptoSession::HdcpCapability ProtobufHdcpToOemCryptoHdcp(
|
||||
// specified resolution, or null if none match
|
||||
VideoResolutionConstraint* GetConstraintForRes(
|
||||
uint32_t res, ConstraintList& constraints_from_key) {
|
||||
typedef ConstraintList::pointer_iterator Iterator;
|
||||
using Iterator = ConstraintList::pointer_iterator;
|
||||
for (Iterator i = constraints_from_key.pointer_begin();
|
||||
i != constraints_from_key.pointer_end(); ++i) {
|
||||
VideoResolutionConstraint* constraint = *i;
|
||||
|
||||
@@ -590,7 +590,7 @@ struct LevelSession {
|
||||
// 3 function pointers. The Adapter is a global singleton.
|
||||
class Adapter {
|
||||
public:
|
||||
typedef std::map<OEMCrypto_SESSION, LevelSession>::iterator map_iterator;
|
||||
using map_iterator = std::map<OEMCrypto_SESSION, LevelSession>::iterator;
|
||||
|
||||
Adapter() : level1_valid_(false), level1_library_(NULL) {}
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ using video_widevine::LicenseIdentification;
|
||||
using video_widevine::STREAMING;
|
||||
using video_widevine::OFFLINE;
|
||||
|
||||
typedef ::video_widevine::License::KeyContainer KeyContainer;
|
||||
typedef KeyContainer::VideoResolutionConstraint VideoResolutionConstraint;
|
||||
using KeyContainer = ::video_widevine::License::KeyContainer;
|
||||
using VideoResolutionConstraint = KeyContainer::VideoResolutionConstraint;
|
||||
|
||||
class LicenseKeysTest : public ::testing::Test {
|
||||
protected:
|
||||
|
||||
@@ -24,15 +24,15 @@ using video_widevine::STREAMING;
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
typedef ::video_widevine::License License;
|
||||
typedef ::video_widevine::License::KeyContainer KeyContainer;
|
||||
typedef ::video_widevine::License::KeyContainer::OutputProtection
|
||||
OutputProtection;
|
||||
typedef ::video_widevine::License::KeyContainer::
|
||||
VideoResolutionConstraint VideoResolutionConstraint;
|
||||
typedef ::google::protobuf::RepeatedPtrField<KeyContainer> KeyList;
|
||||
typedef ::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>
|
||||
ConstraintList;
|
||||
using License = ::video_widevine::License;
|
||||
using KeyContainer = ::video_widevine::License::KeyContainer;
|
||||
using OutputProtection =
|
||||
::video_widevine::License::KeyContainer::OutputProtection;
|
||||
using VideoResolutionConstraint =
|
||||
::video_widevine::License::KeyContainer::VideoResolutionConstraint;
|
||||
using KeyList = ::google::protobuf::RepeatedPtrField<KeyContainer>;
|
||||
using ConstraintList =
|
||||
::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>;
|
||||
|
||||
using namespace testing;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user