// Copyright (c) 2016, 2022 Qualcomm Technologies, Inc.  All Rights Reserved.
// Qualcomm Technologies Proprietary and Confidential.

/**
 * Hdcp Encryption interface controls hardware blocks that implement HDCP
 * encryption (HDMI, DP) and keeps track of the minimum encryption level
 * per DRM policy.
 */
/** @cond */
interface IHdcpEncryption
{
/** @endcond */

  /**
   * @addtogroup IHdcpEncryption
   * @{
   */

   /** @cond */
   /**
   * Corresponds to enum qsee_hdcp_version_t
   * These constants define the HDCP version
   */
   const uint32 HDCP_VERSION_14 = 0x2001;
   const uint32 HDCP_VERSION_22 = 0x2002;

   /**
   * Corresponds to enum qsee_hdcp_device_t
   * These constants define the device types.
   */
   const uint32 HDCP_TXMTR_HDMI    = 0x8001;
   const uint32 HDCP_TXMTR_DP      = 0x8002;
   const uint32 HDCP_TXMTR_DP1     = 0x18004;
   const uint32 HDCP_TXMTR_DP2     = 0x18006;
   const uint32 HDCP_TXMTR_DP3     = 0x18008;
   const uint32 HDCP_TXMTR_DP_MST  = 0x18003;
   const uint32 HDCP_TXMTR_DP1_MST = 0x18005;
   const uint32 HDCP_TXMTR_DP2_MST = 0x18007;
   const uint32 HDCP_TXMTR_DP3_MST = 0x18009;
   const uint32 HDCP_TXMTR_DP4     = 0x18010;
   const uint32 HDCP_TXMTR_DP5     = 0x18012;
   const uint32 HDCP_TXMTR_DP6     = 0x18014;
   const uint32 HDCP_TXMTR_DP7     = 0x18016;
   const uint32 HDCP_TXMTR_DP4_MST = 0x18011;
   const uint32 HDCP_TXMTR_DP5_MST = 0x18013;
   const uint32 HDCP_TXMTR_DP6_MST = 0x18015;
   const uint32 HDCP_TXMTR_DP7_MST = 0x18017;

   /**
   * Error Codes
   */
   error ERROR_GENERIC;
   error ERROR_HW_NOT_SUPPORTED;
   error ERROR_HW_NOT_AVAILABLE;
   error ERROR_HW_CLOCK_OFF;
   error ERROR_BAD_PARAMETER;
   error ERROR_VERSION_NOT_SUPPORTED;
   /** @endcond */

  /**
    Enable HDCP encryption.

    @param[in] hdcpVersion  HDCP version.
    @param[in] deviceType   HDCP device type.
    @param[in] key          Key to write to hardware for encryption.
    @param[in] randomIV     Random IV to set to hardware for encryption.

    @return
    Object_OK on success.
   */
   method enable(in uint32 hdcpVersion, in uint32 deviceType, in buffer key, in buffer randomIV);

  /**
    Disables HDCP encryption.

    @param[in] hdcpVersion  HDCP version.
    @param[in] deviceType   HDCP device type.

    @return Object_OK if successful.
  */
  method disable(in uint32 hdcpVersion, in uint32 deviceType);

  /**
    Forces encryption for Display interface.

    @param[in] deviceType  HDCP device type.
    @param[in] enable      1 to override secure buffer to force encryption. \n
                           0 to disable override and allow secure buffer to steer encryption.

    @return
    Object_OK on success.
  */
  method enforceEncryption(in uint32 deviceType, in int32 enable);
  /** @} */ /* end_addtogroup IHdcpEncryption */
};

