// Copyright (c) 2016 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;

   /**
   * 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 */
};

