20 #ifndef AAMP_OPENCDM_MOCKS
21 #define AAMP_OPENCDM_MOCKS
24 #include "open_cdm_adapter.h"
26 #include <gmock/gmock.h>
31 MOCK_METHOD(
struct OpenCDMSystem *, opencdm_create_system, (
const char keySystem[]));
32 MOCK_METHOD(OpenCDMError, opencdm_construct_session, (
struct OpenCDMSystem* system,
33 const LicenseType licenseType,
34 const char initDataType[],
35 const uint8_t initData[],
36 const uint16_t initDataLength,
37 const uint8_t CDMData[],
38 const uint16_t CDMDataLength,
39 OpenCDMSessionCallbacks* callbacks,
41 struct OpenCDMSession** session));
42 MOCK_METHOD(OpenCDMError, opencdm_destruct_system, (
struct OpenCDMSystem* system));
43 MOCK_METHOD(KeyStatus, opencdm_session_status, (
const struct OpenCDMSession* session,
44 const uint8_t keyId[],
45 const uint8_t length));
46 MOCK_METHOD(OpenCDMError, opencdm_session_update, (
struct OpenCDMSession* session,
47 const uint8_t keyMessage[],
48 const uint16_t keyLength));
49 MOCK_METHOD(OpenCDMError, opencdm_gstreamer_session_decrypt, (
struct OpenCDMSession* session,
52 const uint32_t subSampleCount,
55 uint32_t initWithLast15));
56 MOCK_METHOD(OpenCDMError, opencdm_session_decrypt, (
struct OpenCDMSession* session,
58 const uint32_t encryptedLength,
62 const uint16_t keyIdLength,
63 uint32_t initWithLast15,
65 uint16_t streamInfoLength));
66 MOCK_METHOD(OpenCDMError, opencdm_session_close, (
struct OpenCDMSession* session));
67 MOCK_METHOD(OpenCDMError, opencdm_destruct_session, (
struct OpenCDMSession* session));