// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary // source code may only be used and distributed under the Widevine Master // License Agreement. #ifndef CAS_EVENTS_H #define CAS_EVENTS_H #define PROVISIONING_EVENT_START 1000 #define LICENSING_EVENT_START 2000 #define CAS_SESSION_EVENT_START 3000 #define CAS_QUERY_EVENT_START 4000 #define CAS_ERROR_EVENT_START 5000 #define CAS_PARENTAL_CONTROL_EVENT_START 6000 #define CAS_FINGERPRINTING_EVENT_START 6100 #define CAS_SERVICE_BLOCKING_EVENT_START 6200 #define CAS_TEST_EVENT_START 10000 typedef enum { UNKNOWN = 0, INDIVIDUALIZATION_REQUEST = PROVISIONING_EVENT_START, INDIVIDUALIZATION_RESPONSE, INDIVIDUALIZATION_COMPLETE, LICENSE_REQUEST = LICENSING_EVENT_START, LICENSE_RESPONSE, CAS_ERROR_DEPRECATED, LICENSE_RENEWAL_REQUEST, LICENSE_RENEWAL_RESPONSE, LICENSE_RENEWAL_URL, LICENSE_CAS_READY, LICENSE_CAS_RENEWAL_READY, LICENSE_REMOVAL, LICENSE_REMOVED, ASSIGN_LICENSE_ID, LICENSE_ID_ASSIGNED, LICENSE_NEW_EXPIRY_TIME, MULTI_CONTENT_LICENSE_INFO, GROUP_LICENSE_INFO, LICENSE_ENTITLEMENT_PERIOD_UPDATE_REQUEST, LICENSE_ENTITLEMENT_PERIOD_UPDATE_RESPONSE, LICENSE_ENTITLEMENT_PERIOD_UPDATED, // TODO(jfore): Evaluate removing this event in favor of return status codes // from // frameworks/av/media/libstagefright/include/media/stagefright/MediaErrors.h CAS_ERROR = CAS_ERROR_EVENT_START, CAS_SESSION_ID = CAS_SESSION_EVENT_START, SET_CAS_SOC_ID, SET_CAS_SOC_DATA, UNIQUE_ID = CAS_QUERY_EVENT_START, QUERY_UNIQUE_ID, WV_CAS_PLUGIN_VERSION, QUERY_WV_CAS_PLUGIN_VERSION, SET_PARENTAL_CONTROL_AGE = CAS_PARENTAL_CONTROL_EVENT_START, DEPRECATED_PARENTAL_CONTROL_AGE_UPDATED, ACCESS_DENIED_BY_PARENTAL_CONTROL, AGE_RESTRICTION_UPDATED, // The content of FINGERPRINTING_INFO events follows TLV (Type (1 byte) - // Length (2 bytes) - Value) format. See FingerprintingFieldType for possible // types. A FINGERPRINTING_INFO event contains {one or more CHANNEL, one // CONTROL}. FINGERPRINTING_INFO = CAS_FINGERPRINTING_EVENT_START, // Fingerprinting control info for a session. The content of the event follows // TLV (Type (1 byte) - Length (2 bytes) - Value) format. See // SessionFingerprintingFieldType for possible types. It will contain {one // FINGERPRINTING_CONTROL}. SESSION_FINGERPRINTING_INFO, // The content of SERVICE_BLOCKING_INFO events follows TLV (Type (1 byte) - // Length (2 bytes) - Value) format. See ServiceBlockingFieldType for possible // types. A SERVICE_BLOCKING_INFO event contains {one or more CHANNEL, one or // more DEVICE_GROUP, zero or one START_TIME_SECONDS, one END_TIME_SECONDS}. SERVICE_BLOCKING_INFO = CAS_SERVICE_BLOCKING_EVENT_START, // Service blocking device group for a session. The content of the event // follows TLV (Type (1 byte) - Length (2 bytes) - Value) format. See // SessionServiceBlockingFieldType for possible types. It will contain {one or // more SERVICE_BLOCKING_DEVICE_GROUP}. SESSION_SERVICE_BLOCKING_INFO, TEST_FOR_ECHO = CAS_TEST_EVENT_START, // Request an ECHO response to test events passing. ECHO, // Respond to TEST_FOR_ECHO. } CasEventId; // Types used inside an FINGERPRINTING_INFO event. typedef enum { FINGERPRINTING_CHANNEL = 0, FINGERPRINTING_CONTROL, } FingerprintingFieldType; // Types used inside an SERVICE_BLOCKING_INFO event. typedef enum { SERVICE_BLOCKING_CHANNEL = 0, SERVICE_BLOCKING_DEVICE_GROUP, // Epoch time in seconds. Missing of this field or a value of 0 means // immediate start. SERVICE_BLOCKING_START_TIME_SECONDS, SERVICE_BLOCKING_END_TIME_SECONDS, // Epoch time in seconds. } ServiceBlockingFieldType; // Types used inside an SESSION_FINGERPRINTING_CONTROL event. typedef enum { SESSION_FINGERPRINTING_CONTROL = 0, } SessionFingerprintingFieldType; // Types used inside an SESSION_SERVICE_BLOCKING_GROUPS event. typedef enum { SESSION_SERVICE_BLOCKING_DEVICE_GROUP = 0, } SessionServiceBlockingFieldType; // Types used inside a MULTI_CONTENT_LICENSE_INFO event. typedef enum { MULTI_CONTENT_LICENSE_ID = 0, MULTI_CONTENT_LICENSE_CONTENT_ID, } MultiContentLicenseFieldType; // Types used inside a GROUP_LICENSE_INFO event. typedef enum { GROUP_LICENSE_ID = 0, GROUP_LICENSE_GROUP_ID, } GroupLicenseFieldType; #endif // CAS_EVENTS_H