/**
 * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
 * All rights reserved.
 * Confidential and Proprietary - Qualcomm Technologies, Inc.
 * */

include "ICredentials.idl"
include "INotificationHandler.idl"

/**
 * @brief Provides Maintains System Entity Credentials.
 */

/** @cond */
interface ISystemManager
{
/** @endcond */

  /**
   * @addtogroup ISystemManager
   * @{
   */
  error ERROR_INVALID_SYSTEM_ID;    /** The given SYSTEM_ID does not correspond to a valid System.*/
  error ERROR_INVALID_STATE;        /** The given system is not ready for update. */

  /**
   * Constants for different systems
   */

  const uint32 QTEE_ID  = 0; /** Constant representing QTEE */
  const uint32 EL2SYSTEM_ID = 1; /** Constant representing the system currently operating in EL2. (UEFI, DLME, HYP) */
  const uint32 MODEM_ID = 2; /** Constant representing Modem */
  const uint32 NUM_IDs = 3; /** Number of Systems managed by this System Manager. */
  /**
    Returns the ICredentials object associated with the System.

    @param[in] systemId system ID of the system against which the credentials are requested.
    @param[out] credentials The Credentials Object against the system ID.

    @return
    Object_OK on Success.
    ERROR_INVALID_SYSTEM_ID when the provided systemId is invalud.
  */
  method getCredentials(in uint32 systemId, out ICredentials credentials);

  /**
   Register a TA handler that will be executed when a new EL2 entity will be set.

   @param[in] credentials The SystemCredentials we want to be notified on.
   @param[in] handler     The INotificationHandler that the client will register.

   @return
   Object_OK on success.
   Object_ERROR when there is an error upon registration.
   */
  method registerHandler(in ICredentials credentials, in INotificationHandler handler);

  /* @} */ /* ISystemManager */
};
