/**
 * Copyright (c) Qualcomm Technologies, Inc.
 * All Rights Reserved.
 * Confidential and Proprietary - Qualcomm Technologies, Inc.
 */
 
 /** @cond */
interface IValidatePimemARC {
/** @endcond */

  /**
    @addtogroup IValidatePimemARC
    @{
   */
  
  /*
   * Error codes
   */
  /** @cond */
  error ERROR_RPMB_NOT_PROVISIONED;
  error ERROR_COUNTER_NOT_INITIALIZED;
  error ERROR_COUNTER_OVERFLOW;
  error ERROR_COUNTER_VALUE_MISMATCH;
  /** @endcond */
  
  /**
    This method is supposed to be invoked only during cold boot from HLOS user space(qseecomd)
    It will Initialize counter value, this value will be saved in some global variable(residing in TZ memory)
    and same value will be updated in RPMB also.

    @return
    Object_OK - Successful. \n
    Object_ERROR - return 'ERROR_RPMB_NOT_PROVISIONED', \n
                   if RPMB is not provisioned otherwise Object_ERROR if any other failure \n
   */
  method initializeCounterValue();

  /**
    This method is supposed to be invoked on every quick boot from HLOS user space(qseecomd)
    It will do verification against anti replay by comparing counter value of global variable and RPMB,
    on successful verification, counter value will be incremented by 1 and updated in RPMB also.
    On failure case, error fatal will be done with counter check fail error.

    @return
    Object_OK - Successful. \n
    Object_ERROR - return 'ERROR_RPMB_NOT_PROVISIONED' \n
                   if RPMB is not provisioned otherwise do error fatal for any failure \n
   */
  method verifyAndUpdateCounterValue();
  
  /** @} */ /* end_addtogroup IValidatePimemARC */
};
