Source release v3.0.4
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Copyright 2015 Google Inc. All Rights Reserved.
|
||||
// Based on the EME draft spec from 2015 June 01.
|
||||
// https://rawgit.com/w3c/encrypted-media/1cbedad/index.html
|
||||
// TODO: Verify behavior and update to June 12 draft.
|
||||
// Based on the EME draft spec from 2015 November 20.
|
||||
// https://rawgit.com/w3c/encrypted-media/1dab9e5/index.html
|
||||
#ifndef WVCDM_CDM_CDM_H_
|
||||
#define WVCDM_CDM_CDM_H_
|
||||
|
||||
@@ -49,7 +48,9 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
// Session types defined by EME.
|
||||
typedef enum {
|
||||
kTemporary = 0,
|
||||
kPersistent = 1,
|
||||
kPersistentLicense = 1,
|
||||
kPersistent = kPersistentLicense, // deprecated name from June 1 draft
|
||||
kPersistentUsageRecord = 2,
|
||||
} SessionType;
|
||||
|
||||
// Message types defined by EME.
|
||||
@@ -67,11 +68,15 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
kSessionNotFound = 2,
|
||||
kDecryptError = 3,
|
||||
kNoKey = 4,
|
||||
|
||||
// These are analogous to the errors used by EME:
|
||||
kInvalidAccess = 5,
|
||||
kTypeError = 5,
|
||||
kInvalidAccess = kTypeError, // deprecated name from June 1 draft
|
||||
kNotSupported = 6,
|
||||
kInvalidState = 7,
|
||||
kQuotaExceeded = 8,
|
||||
kRangeError = 9,
|
||||
|
||||
// This covers errors that we do not expect (see logs for details):
|
||||
kUnexpectedError = 99999,
|
||||
} Status;
|
||||
@@ -87,9 +92,11 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
typedef enum {
|
||||
kUsable = 0,
|
||||
kExpired = 1,
|
||||
kOutputNotAllowed = 2,
|
||||
kOutputRestricted = 2,
|
||||
kOutputNotAllowed = kOutputRestricted, // deprecated name from June 1 draft
|
||||
kStatusPending = 3,
|
||||
kInternalError = 4,
|
||||
kReleased = 5,
|
||||
} KeyStatus;
|
||||
|
||||
// These are defined by Widevine. The CDM can be configured to decrypt in
|
||||
@@ -316,7 +323,7 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
// license server.
|
||||
// If |privacy_mode| was true in create() and setServerCertificate() is not
|
||||
// called, the CDM will attempt to provision a server certificate through
|
||||
// IEventListener::onMessage() with messageType == kIndividualizationRequest.
|
||||
// IEventListener::onMessage() with messageType == kLicenseRequest.
|
||||
// May not be called if |privacy_mode| was false.
|
||||
virtual Status setServerCertificate(const std::string& certificate) = 0;
|
||||
|
||||
@@ -453,13 +460,13 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
const std::string& value) = 0;
|
||||
|
||||
// Gets the current value in the custom app settings. If the key is
|
||||
// not present, then kInvalidAccess is returned. The |key| cannot be
|
||||
// not present, then kTypeError is returned. The |key| cannot be
|
||||
// empty. |result| cannot be null. See setAppParameter().
|
||||
virtual Status getAppParameter(const std::string& key,
|
||||
std::string* result) = 0;
|
||||
|
||||
// Removes the value in the custom app settings. If the key is not
|
||||
// present, then kInvalidAccess is returned. The |key| cannot be empty.
|
||||
// present, then kTypeError is returned. The |key| cannot be empty.
|
||||
// See setAppParameter().
|
||||
virtual Status removeAppParameter(const std::string& key) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user