BOLOS TEE
Macros | Functions
bolos_ui.h File Reference

User Interface functions for Bolos TEE. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BLS_UI_CAPS_AVAILABLE   (1 << 0)
 
#define BLS_UI_CAPS_MULTILINE   (1 << 1)
 
#define BLS_UI_CAPS_TOUCH   (1 << 2)
 
#define BLS_UI_CAPS_COLOR   (1 << 3)
 
#define BLS_UI_CAPS_USER_ENTRY   (1 << 4)
 
#define BLS_UI_CAPS_INAPP   (1 << 5)
 
#define BLS_UI_CAPS_QR   (1 << 6)
 

Functions

int bls_ui_get_capabilities (void)
 Return the UI capabilities as a bitmask. More...
 
int bls_ui_display_message (const char WIDE *text)
 Display a simple information message. More...
 
int bls_ui_display_warning (const char WIDE *text)
 Display a simple warning message. More...
 
int bls_ui_display_error (const char WIDE *text)
 Display a simple error. More...
 
int bls_ui_display_choice (const char WIDE *message)
 Display a OK/CANCEL choice message. More...
 
int bls_ui_display_qr (const char WIDE *message, const char WIDE *data, size_t dataSize)
 Display a QR code. More...
 
int bls_ui_get_user_entry (const char WIDE *message, char WIDE *out, size_t outLength)
 Retrieve user input. More...
 

Detailed Description

User Interface functions for Bolos TEE.

Author
Ledger Firmware Team hello.nosp@m.@led.nosp@m.ger.f.nosp@m.r
Version
1.0
Date
29th of February 2016

The User Interface API let the executed code run simple primitives on the Trusted UI.

This API is specific to the TEE implementation due to memory limitations

Macro Definition Documentation

#define BLS_UI_CAPS_AVAILABLE   (1 << 0)

UI is available

#define BLS_UI_CAPS_COLOR   (1 << 3)

UI supports color

#define BLS_UI_CAPS_INAPP   (1 << 5)

UI executes in the application thread

#define BLS_UI_CAPS_MULTILINE   (1 << 1)

UI supports text displayed on several lines

#define BLS_UI_CAPS_QR   (1 << 6)

UI can display a QR code

#define BLS_UI_CAPS_TOUCH   (1 << 2)

UI supports a touch screen

#define BLS_UI_CAPS_USER_ENTRY   (1 << 4)

UI supports user text input

Function Documentation

int bls_ui_display_choice ( const char WIDE *  message)

Display a OK/CANCEL choice message.

Parameters
[in]messageText message to display
Returns
1 if OK was selected, 0 if CANCEL was selected or an error occurred
int bls_ui_display_error ( const char WIDE *  text)

Display a simple error.

Parameters
[in]textText message to display
Returns
1 if success, 0 if error
int bls_ui_display_message ( const char WIDE *  text)

Display a simple information message.

Parameters
[in]textText message to display
Returns
1 if success, 0 if error
int bls_ui_display_qr ( const char WIDE *  message,
const char WIDE *  data,
size_t  dataSize 
)

Display a QR code.

Parameters
[in]messageText message to display
[in]dataBuffer to the data to display as a QR code
[in]dataSizeSize of the data to display as a QR code
Returns
1 if success, 0 if error
int bls_ui_display_warning ( const char WIDE *  text)

Display a simple warning message.

Parameters
[in]textText message to display
Returns
1 if success, 0 if error
int bls_ui_get_capabilities ( void  )

Return the UI capabilities as a bitmask.

Returns
UI capabilities
int bls_ui_get_user_entry ( const char WIDE *  message,
char WIDE *  out,
size_t  outLength 
)

Retrieve user input.

Parameters
[in]messageText message to display
[out]outBuffer to contain the user data
[in]outLengthSize of the buffer to contain the user data
Returns
size of the user data collected or 0 if an error occurrred