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

/** @cond */
interface ITALog {
/** @endcond */

  /**
   * @addtogroup ITALog
   * @{
   */

  /**
   * Register a log sink to the TA.
   * If a log sink has been already registered, the new one will replace it.
   * Only a single log sink can be registered by a TA.
   *
   * @param[in] ILogSink        A log sink object that will implement the custom
   *                            logging function. When passing an Object_NULL
   *                            sink, the current log sink will be deregistered.
   */
  method registerSink(in interface ILogSink);

  /** @} */ /* end_addtogroup ITrustedAppLog */
};

/** @cond */
interface ILogSink {
/** @endcond */

  /**
   * @addtogroup ILogSink
   * @{
   */

  /**
   * Method signature for log sinks to implement.
   * Developers should avoid manipulating the logging mask (qsee_log_set_mask())
   * to avoid infinite recursion when qsee_log() is called.
   *
   * @param[in] pri             Priority of the message.
   * @param[in] msg             Message to be handled by the logger.
   */
  method onLog(in uint8 pri, in buffer msg);

  /** @} */ /* end_addtogroup ILogSink */
};
