Merge "Replace generic OnEvent with actual event callbacks"

This commit is contained in:
KongQun Yang
2015-03-30 17:35:23 +00:00
committed by Android (Google) Code Review
15 changed files with 371 additions and 463 deletions

View File

@@ -114,7 +114,7 @@ class MockCryptoSession : public CryptoSession {
class MockPolicyEngine : public PolicyEngine {
public:
MockPolicyEngine() : PolicyEngine(NULL) {}
MockPolicyEngine() : PolicyEngine("mock_session_id", NULL, NULL) {}
// Leaving a place-holder for when PolicyEngine methods need to be mocked
};

View File

@@ -105,7 +105,8 @@ class MockCryptoSession : public CryptoSession {
class MockPolicyEngine : public PolicyEngine {
public:
MockPolicyEngine(CryptoSession* crypto) : PolicyEngine(crypto) {}
MockPolicyEngine(CryptoSession* crypto)
: PolicyEngine("mock_session_id", NULL, crypto) {}
};
class MockClock : public Clock {

File diff suppressed because it is too large Load Diff

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";

View File

@@ -10,7 +10,6 @@
namespace wvcdm {
void PrintTo(const enum CdmResponseType& value, ::std::ostream* os);
void PrintTo(const enum CdmEventType& value, ::std::ostream* os);
void PrintTo(const enum CdmLicenseType& value, ::std::ostream* os);
void PrintTo(const enum CdmSecurityLevel& value, ::std::ostream* os);
void PrintTo(const enum CdmCertificateType& value, ::std::ostream* os);