#ifndef MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_
#define MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_
#include "media/cdm/ppapi/api/content_decryption_module.h"
namespace media {
bool IsSupportedCdmModuleVersion(int version) {
switch(version) {
case CDM_MODULE_VERSION:
return true;
default:
return false;
}
}
bool IsSupportedCdmInterfaceVersion(int version) {
COMPILE_ASSERT(cdm::ContentDecryptionModule::kVersion ==
cdm::ContentDecryptionModule_4::kVersion,
update_code_below);
switch(version) {
case cdm::ContentDecryptionModule_4::kVersion:
case cdm::ContentDecryptionModule_2::kVersion:
case cdm::ContentDecryptionModule_1::kVersion:
return true;
default:
return false;
}
}
bool IsSupportedCdmHostVersion(int version) {
COMPILE_ASSERT(cdm::ContentDecryptionModule::Host::kVersion ==
cdm::ContentDecryptionModule_4::Host::kVersion,
update_code_below);
switch(version) {
case cdm::Host_4::kVersion:
case cdm::Host_2::kVersion:
case cdm::Host_1::kVersion:
return true;
default:
return false;
}
}
}
#endif