// Copyright (c) 2016 Qualcomm Technologies, Inc.  All Rights Reserved.
// Qualcomm Technologies Proprietary and Confidential.
/**
 * @brief
 * Hdcp2p2 Service provides interface to query info such as topology from
 * hdcp2p2 trusted app.
 *
 */
/** Topology Info **/
#pragma once
// AUTOGENERATED FILE: DO NOT EDIT

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

typedef struct {
  uint32_t depth;
  uint32_t deviceCount;
  uint32_t maxDevicesExceeded;
  uint32_t maxCascadeExceeded;
  uint32_t hdcp2LegacyDeviceDownstream;
  uint32_t hdcp1DeviceDownstream;
} IHdcp2p2Service_Topology;

#define IHdcp2p2Service_HDCP_TXMTR_HDMI UINT32_C(0x8001)
#define IHdcp2p2Service_HDCP_TXMTR_DP UINT32_C(0x8002)
#define IHdcp2p2Service_HDCP_TXMTR_ALL UINT32_C(0x800F)

#define IHdcp2p2Service_OP_getTopology 0

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

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

static inline int32_t
IHdcp2p2Service_getTopology(Object self, uint32_t deviceType_val, uint8_t *receiverIdList_ptr, size_t receiverIdList_len, size_t *receiverIdList_lenout, IHdcp2p2Service_Topology *topology_ptr)
{
  ObjectArg a[3];
  a[0].b = (ObjectBuf) { &deviceType_val, sizeof(uint32_t) };
  a[1].b = (ObjectBuf) { receiverIdList_ptr, receiverIdList_len * sizeof(uint8_t) };
  a[2].b = (ObjectBuf) { topology_ptr, sizeof(IHdcp2p2Service_Topology) };

  int32_t result = Object_invoke(self, IHdcp2p2Service_OP_getTopology, a, ObjectCounts_pack(1, 2, 0, 0));

  *receiverIdList_lenout = a[1].b.size / sizeof(uint8_t);

  return result;
}



