#ifndef _TLC_TIMA_TUI_H_
#define _TLC_TIMA_TUI_H_

#define PIN_BUFFER_SIZE		4096
#define ERROR_MSG_BUFFER_SIZE 	256

#define QSEE_TUI_ROOT "/firmware/image"
#define QSEE_TUI_PROCESS "tima_tui"

#define TBASE_TUI_ROOT "0"
#define TBASE_TUI_PROCESS "ffffffff000000000000000000000029"

#define PIN_SO_FILE "/data/system/mop_data"

typedef struct {
	uint32_t ret;		// return code
	char error_msg[ERROR_MSG_BUFFER_SIZE];	// detailed error msg
	uint32_t buffer_len;	// The length of buffer
	uint8_t buffer[PIN_BUFFER_SIZE];	// Buffer contains the PIN secure object
} timaTuiResult_t;

typedef struct {
	uint32_t ret;
	char error_msg[ERROR_MSG_BUFFER_SIZE];
	uint32_t width;
	uint32_t height;
} timaTuiDimension_t;

uint32_t spayTuiSetupPin(
);

uint32_t spayTuiAuthPin(
	uint8_t retry,
	uint8_t * app_name,
	uint32_t app_name_length,
	uint8_t * nonce,
	uint32_t nonce_len,
	uint8_t * result_buf,
	uint32_t * result_len,
	uint8_t * image,
	uint32_t image_len
);

uint32_t spayTuiVerify(
);

uint32_t spayTuiTestResume(
);

#endif
