Remove references to policy_timers_v15

[ Merge of http://go/wvgerrit/164257 ]

Support for OEMCrypto v15 is being removed from the CDM. The
policy_timers_v15 will no longer be invoked and can be removed.

Bug: 256038127
Test: WV unit/integration tests
Change-Id: Ic3a503ef2a17223dd0bc13696960dcd6822cc343
This commit is contained in:
Rahul Frias
2022-12-21 00:48:14 -08:00
parent ead412cc55
commit 539843da00
3 changed files with 0 additions and 252 deletions

View File

@@ -1,97 +0,0 @@
// Copyright 2020 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_POLICY_TIMERS_V15_H_
#define WVCDM_CORE_POLICY_TIMERS_V15_H_
#include <memory>
#include <string>
#include "disallow_copy_and_assign.h"
#include "license_protocol.pb.h"
#include "policy_timers.h"
#include "wv_cdm_types.h"
namespace wvcdm {
// OEMCrypto v16 and core messages introduced changes to how duration values
// and clocks should be evaluated. This class provides backward compatibility
// for licenses that do not include a core message. Durations are handled
// in the same way as in earlier releases.
//
// Backward compatibility may be needed if
// * OEMCrypto has not been upgraded to v16
// * Licenses were persisted before the device was upgraded to v16
// * License service does not yet support core messages
class PolicyTimersV15 : public PolicyTimers {
public:
PolicyTimersV15() : grace_period_end_time_(0) {}
~PolicyTimersV15() override {}
// UpdateLicense is used in handling a license response, a renewal response,
// or when restoring or releasing a persistent license.
// In a renewal the response may only contain policy fields that have
// changed. In this case an exact copy is not what we want to happen.
// |license_start_time_| is updated to the time mentioned in the renewal
// response.
// UpdateLicense will return false if |license_start_time| is not
// present or playback is not allowed due to policy or timer duration
// expiration.
bool UpdateLicense(int64_t current_time,
const video_widevine::License& license) override;
// Call this on first decrypt to set the start of playback.
void BeginDecryption(int64_t current_time) override;
// for offline save and restore
int64_t GetGracePeriodEndTime() override { return grace_period_end_time_; }
// for offline save and restore
void RestorePlaybackTimes(int64_t current_time, int64_t playback_start_time,
int64_t last_playback_time,
int64_t grace_period_end_time) override;
bool HasPlaybackStarted(int64_t current_time) override;
bool HasLicenseOrRentalOrPlaybackDurationExpired(
int64_t current_time) override;
bool HasPassedGracePeriod(int64_t current_time) override;
// This returns
// * for streaming licenses: the time remaining on |license_duration_seconds|
// * for persistent licenses: the time remaining on |rental_duration_seconds|
// before playback begins or the time remaining on
// |playback_duration_seconds| after.
int64_t GetLicenseOrRentalOrPlaybackDurationRemaining(
int64_t current_time) override;
// This is only used in Query. This should return the time remaining on
// |license_duration_seconds| for streaming licenses and
// |rental_duration_seconds| for persistent licenses.
int64_t GetLicenseOrRentalDurationRemaining(int64_t current_time) override;
protected:
// Gets the clock time that the license expires based on whether we have
// started playing. This takes into account GetHardLicenseExpiryTime.
int64_t GetExpiryTime(int64_t current_time,
bool ignore_soft_enforce_playback_duration) override;
int64_t GetRenewalStartTime() override { return license_start_time_; }
private:
// Gets the clock time that the license expires. This is the hard limit that
// all license types must obey at all times.
int64_t GetHardLicenseExpiryTime();
// Gets the clock time that the rental duration will expire, using the license
// duration if one is not present.
int64_t GetRentalExpiryTime();
int64_t grace_period_end_time_;
CORE_DISALLOW_COPY_AND_ASSIGN(PolicyTimersV15);
};
} // namespace wvcdm
#endif // WVCDM_CORE_POLICY_TIMERS_V15_H_