Replace generic OnEvent with actual event callbacks

Also pass session_id and event_listener to PolicyEngine to make it easier
to dispatch events from PolicyEngine.

Bug: 19771437

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13816/

Change-Id: I5723cb371cb3c43c945051af3402b09069ba5859
This commit is contained in:
KongQun Yang
2015-03-23 16:49:59 -07:00
parent 170485f771
commit 85e838b957
15 changed files with 371 additions and 463 deletions

View File

@@ -34,18 +34,6 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
}
}
void PrintTo(const enum CdmEventType& value, ::std::ostream* os) {
switch (value) {
case LICENSE_EXPIRED_EVENT: *os << "LICENSE_EXPIRED_EVENT";
break;
case LICENSE_RENEWAL_NEEDED_EVENT: *os << "LICENSE_RENEWAL_NEEDED_EVENT";
break;
default:
*os << "Unknown CdmEventType";
break;
}
};
void PrintTo(const enum CdmLicenseType& value, ::std::ostream* os) {
switch (value) {
case kLicenseTypeOffline: *os << "kLicenseTypeOffline";