Secure stop API related changes
[ Merge of http://go/wvgerrit/44921 ] * Added the ability to remove a single usage information record. * Added a method to retrieve all secure stop Ids. Bug: 69674645 Test: WV unit, integration tests Change-Id: I04ac8224b4bdda69541e61ff1103af3836138228
This commit is contained in:
@@ -305,6 +305,16 @@ CdmResponseType WvContentDecryptionModule::RemoveAllUsageInfo(
|
||||
return sts;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::RemoveUsageInfo(
|
||||
const std::string& app_id,
|
||||
const CdmIdentifier& identifier,
|
||||
const CdmSecureStopId& secure_stop_id) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts = cdm_engine->RemoveUsageInfo(app_id, secure_stop_id);
|
||||
cdm_engine->GetMetrics()->cdm_engine_remove_usage_info_.Increment(sts);
|
||||
return sts;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::ReleaseUsageInfo(
|
||||
const CdmUsageInfoReleaseMessage& message,
|
||||
const CdmIdentifier& identifier) {
|
||||
@@ -314,6 +324,27 @@ CdmResponseType WvContentDecryptionModule::ReleaseUsageInfo(
|
||||
return sts;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::GetSecureStopIds(
|
||||
const std::string& app_id,
|
||||
const CdmIdentifier& identifier,
|
||||
std::vector<CdmSecureStopId>* ssids) {
|
||||
if (ssids == NULL) {
|
||||
LOGE("WvContentDecryptionModule::Decrypt: ssid destination not provided");
|
||||
return PARAMETER_NULL;
|
||||
}
|
||||
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts = cdm_engine->ListUsageIds(app_id, kSecurityLevelL1,
|
||||
NULL, ssids);
|
||||
std::vector<CdmSecureStopId> secure_stop_ids;
|
||||
CdmResponseType sts_l3 = cdm_engine->ListUsageIds(app_id, kSecurityLevelL3,
|
||||
NULL, &secure_stop_ids);
|
||||
ssids->insert(ssids->end(), secure_stop_ids.begin(), secure_stop_ids.end());
|
||||
if (sts_l3 != NO_ERROR) sts = sts_l3;
|
||||
cdm_engine->GetMetrics()->cdm_engine_get_secure_stop_ids_.Increment(sts);
|
||||
return sts;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::Decrypt(
|
||||
const CdmSessionId& session_id,
|
||||
bool validate_key_id,
|
||||
|
||||
Reference in New Issue
Block a user