Clean up other core CDM logs.
[ Merge of http://go/wvgerrit/122613 ] Further log clean up in the core CDM code. - Changed several INFO logs to DEBUG and VERBOSE - Added more identifiers to the DEBUG logs to help match resource associations - Added more enum-to-string functions - Unknown enum values will be formatted to contain their numeric value Key areas improved are the UsageTableHeader and CdmSession. Bug: 183576879 Test: CE CDM unittests Change-Id: I2d11e714d419e0736d3e2f7a7668e8d36d7ef449
This commit is contained in:
@@ -66,6 +66,12 @@ class DeviceFiles {
|
||||
kLicenseNotPresent = kResponseTypeBase + 16,
|
||||
};
|
||||
|
||||
// Converts the different enum types to a human readable C-string for
|
||||
// logging.
|
||||
static const char* CertificateStateToString(CertificateState state);
|
||||
static const char* CertificateTypeToString(CertificateType type);
|
||||
static const char* ResponseTypeToString(ResponseType type);
|
||||
|
||||
// CdmLicenseData represents all of the data that is stored in CDM
|
||||
// license file. License data is uniquely keyed using |key_set_id|.
|
||||
struct CdmLicenseData {
|
||||
|
||||
@@ -798,9 +798,18 @@ class Key;
|
||||
// logging. Query strings values are used if available for the enum.
|
||||
// These functions will fail silently to avoid double logging.
|
||||
const char* CdmCertificateTypeToString(CdmCertificateType type);
|
||||
const char* CdmClientTokenTypeToString(CdmClientTokenType type);
|
||||
const char* CdmLicenseTypeToString(CdmLicenseType license_type);
|
||||
const char* CdmOfflineLicenseStateToString(
|
||||
CdmOfflineLicenseState license_state);
|
||||
const char* CdmSecurityLevelToString(CdmSecurityLevel security_level);
|
||||
const char* CdmUsageEntryStorageTypeToString(CdmUsageEntryStorageType type);
|
||||
const char* SecurityLevelToString(SecurityLevel security_level);
|
||||
// Converts a generic, unknown enum value to a string representation
|
||||
// containing its numeric value.
|
||||
// The pointer returned from this function is thread_local.
|
||||
const char* UnknownEnumValueToString(int value);
|
||||
|
||||
// Both IdToString() and IdPtrToString() functions are used to convert
|
||||
// session IDs, key set IDs or other CDM specific identifiers to a
|
||||
// loggable format.
|
||||
@@ -808,7 +817,6 @@ const char* IdToString(const std::string& id);
|
||||
// Some CDM API function allow for optional string parameters to be
|
||||
// provided as string pointers.
|
||||
const char* IdPtrToString(const std::string* id);
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_WV_CDM_TYPES_H_
|
||||
|
||||
Reference in New Issue
Block a user