Files
wvpl_license_sdk/centos/cc_header/session_usage_report.h

51 lines
1.6 KiB
C++

// Copyright 2017 Google LLC. All rights reserved.
#ifndef VIDEO_WIDEVINE_EXPORT_SDK_INTERNAL_SESSION_USAGE_REPORT_H_
#define VIDEO_WIDEVINE_EXPORT_SDK_INTERNAL_SESSION_USAGE_REPORT_H_
#include <cstdint>
#include <cstdint>
#include "absl/base/attributes.h"
namespace video_widevine {
const uint32_t kMaxProviderSessionTokenSizeBytes = 128;
enum SessionUsageStatus {
SessionUsageStatus_Unused = 0,
// License still active on the device, has not been released yet.
SessionUsageStatus_Active = 1,
// Deprecated in OEMCrypto V13, replaced with Inactive_Used and
// Inactive_Unused. All Inactive status values indicate the license was
// relased.
SessionUsageStatus_Inactive_Deprecated = 2,
// Keys released after use.
SessionUsageStatus_Inactive_Used = 3,
// Keys released before use.
SessionUsageStatus_Inactive_Unused = 4,
};
// Data sent in the license release request from the client to indicate the
// license usage.
struct InternalSessionUsageReport {
// HMAC SHA1 of the rest of the report.
uint8_t signature[20];
// Current status of status report: 0=unused, 1=active, 2=inactive.
uint8_t status;
// The clock security level are: 0=insecure clock, 1=secure timer,
// 2=secure clock.
uint8_t clock_security_level;
uint8_t pst_length;
// Make int64_t's word aligned.
uint8_t padding;
int64_t seconds_since_license_received;
int64_t seconds_since_first_decrypt;
int64_t seconds_since_last_decrypt;
uint8_t pst[kMaxProviderSessionTokenSizeBytes];
} ABSL_ATTRIBUTE_PACKED;
} // namespace video_widevine
#endif // VIDEO_WIDEVINE_EXPORT_SDK_INTERNAL_SESSION_USAGE_REPORT_H_