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

include "IMemRegion.idl"

/**
 * Interface implemented by callback object listeners.
 */
 /** @cond */
interface IListenerCBO {
/** @endcond */

  /**
   * @addtogroup IListenerCBO
   * @{
   */

   /**
     Used to invoke the callback object of a CBO-style listener,
     instructing it to inspect its associated shared memory object
     and perform the specified service.

     When used with a QComCompat TA, the listener can include
     embedded pointers in its response, which are represented
     by the accompanying shared memory objects.

     @param[out]  embeddedBufOffsets  An array containing offsets into the request buffer
                                      at which address information for each memory object
                                      is to be written.
     @param[out]  is64     Flag describing if the addresses are to be treated as 64-bit
                           addressable or 32-bit addressable
     @param[out]  smo1     Shared memory object 1
     @param[out]  smo2     Shared memory object 2
     @param[out]  smo3     Shared memory object 3
     @param[out]  smo4     Shared memory object 4


     @return
     Object_OK on success.
    */
   method request (out uint32[] embeddedBufOffsets,
                   out uint32 is64,
                   out IMemRegion smo1,
                   out IMemRegion smo2,
                   out IMemRegion smo3,
                   out IMemRegion smo4);
				   
   /**
     When a TA/QTEE is already accessing a listener/ CBO, the current
     TA/QTEE will wait till the previous TA/QTEE is done accessing the 
     listener. This function will help the current TA/QTEE to wait in the 
     HLOS till the previous TA/QTEE is done accesing the listener/ CBO.
  
     @param[in] None
                                          
     @return
     Object_OK on success.
    */
   method wait();

   /* @} */ /* end_addtogroup IListenerCBO */
};

