// Copyright (c) 2016 Qualcomm Technologies, Inc.  All Rights Reserved.
// Qualcomm Technologies Proprietary and Confidential.
/**
 * @brief
 * Hdcp Provision interface provides TA to HDCP TA provisioning functionality.
 *
 */
#pragma once
// AUTOGENERATED FILE: DO NOT EDIT

#include <stdint.h>
#include "object.h"

#define IHdcpProvision_HDCP_TRANSMITTER UINT32_C(0x4001)
#define IHdcpProvision_CHAMOMILE UINT32_C(0xA001)

#define IHdcpProvision_ERROR_GENERIC INT32_C(10)
#define IHdcpProvision_ERROR_BAD_PARAMETER INT32_C(11)
#define IHdcpProvision_ERROR_INVALID_DEVICE_TYPE INT32_C(12)
#define IHdcpProvision_ERROR_INVALID_KEY_FORMAT INT32_C(13)
#define IHdcpProvision_ERROR_READ_CONFIG_FAILED INT32_C(14)
#define IHdcpProvision_ERROR_KEY_NOT_PROVISIONED INT32_C(15)

#define IHdcpProvision_OP_provision 0
#define IHdcpProvision_OP_verify 1

static inline int32_t
IHdcpProvision_release(Object self)
{
  return Object_invoke(self, Object_OP_release, 0, 0);
}

static inline int32_t
IHdcpProvision_retain(Object self)
{
  return Object_invoke(self, Object_OP_retain, 0, 0);
}

static inline int32_t
IHdcpProvision_provision(Object self, uint32_t deviceType_val, uint32_t keyFormat_val, const void *key_ptr, size_t key_len, const void *dps_ptr, size_t dps_len, uint32_t reserved_val)
{
  ObjectArg a[3];
  struct {
    uint32_t m_deviceType;
    uint32_t m_keyFormat;
    uint32_t m_reserved;
  } i;
  a[0].b = (ObjectBuf) { &i, 12 };
  i.m_deviceType = deviceType_val;
  i.m_keyFormat = keyFormat_val;
  a[1].bi = (ObjectBufIn) { key_ptr, key_len * 1 };
  a[2].bi = (ObjectBufIn) { dps_ptr, dps_len * 1 };
  i.m_reserved = reserved_val;

  return Object_invoke(self, IHdcpProvision_OP_provision, a, ObjectCounts_pack(3, 0, 0, 0));
}

static inline int32_t
IHdcpProvision_verify(Object self, uint32_t deviceType_val, uint32_t reserved_val)
{
  ObjectArg a[1];
  struct {
    uint32_t m_deviceType;
    uint32_t m_reserved;
  } i;
  a[0].b = (ObjectBuf) { &i, 8 };
  i.m_deviceType = deviceType_val;
  i.m_reserved = reserved_val;

  return Object_invoke(self, IHdcpProvision_OP_verify, a, ObjectCounts_pack(1, 0, 0, 0));
}



