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

/** @cond */
interface IPVCLicense {
/** @endcond */

  /**
   * @addtogroup IPVCLicense
   * @{
   */

  /** @cond */
  /**
   *  IPVCLicense Error codes
   */
  error ERROR_HAVEN_LICENSE_SERVICE_NOT_AVAILABLE; /**< Haven License Service not available */
  error ERROR_HAVEN_LICENSE_SERVICE_AUTH_INVALID; /**< Unauthenticated Haven License Service */
  /** @endcond */

  /**
    Set and validate Haven license certificate for the PVC feature.

    @param[in]     LicenseCert  Buffer containing the certificate in DER format.
    @param[out]    havenError   Result of license validation.

    @detdesc
    This method needs to be called at least once after the device was rebooted to enable the
    PVC feature.  Access to the PVC feature without calling this method first, or if
    the provided certificate is not valid, will fail.
    @par
    In order for PVC to be enabled, the function needs to return Object_OK, and
    havenError needs to be Object_OK.
    This function will return Object_OK if it succeeded in contacting the Haven
    License service, in which case the result of the certificate validation
    is returned in havenError.

    @return
    Object_OK if the license was evaluated by the Haven License service.
  */
  method setHavenLicense(in buffer LicenseCert, out int32 havenError);

  /** @} */ /* end_addtogroup IPVCLicense */
};
