#ifndef MB_CB_HANDLER_H_
#define MB_CB_HANDLER_H_

#include <tee_client_api.h>
#include <protocol.h>

/**
 * @brief Handles commands obtained from SWd
 *
 * @param[in]      command_id ID of the command
 * @param[in]      owner_uuid UUID of the TA which is an owner of the persistent
 *                           object the operation is related to
 * @param[in]      po_id     Pointer to destination persistent object's ID
 * @param[in]      po_id_len Length of the persistent object's ID in bytes
 * @param[in,out]  data      A pointed to command data buffer
 * @param[in,out]  data_len  A pointer to the size of command data buffer in
 *                           bytes
 * @param[in]      teec_oper Pointer to TEEC operation
 *                          (used for request cancellation)
 *
 * @retval  The function returs TEEC_SUCCESS if the command handled successfully
 *          otherwise TEEC_ERROR_* value which depends on the exact command
 */
TEEC_Result MbHandleSWdCommand(uint32_t command_id,
                              TEEC_UUID *owner_uuid,
                              const uint8_t *po_id,
                              uint32_t po_id_len,
                              void *data,
                              uint32_t *data_len,
                              U64 *teec_oper);

#endif /* MB_CB_HANDLER_H_ */
