16#include "rpc_app_error_codes.h"
void rpc_system_app_set_error_code(RpcAppSystem *rpc_app, uint32_t error_code)
Set the error code stored in an RpcAppSystem instance.
Definition rpc_app.c:398
void rpc_system_app_set_callback(RpcAppSystem *rpc_app, RpcAppSystemCallback callback, void *context)
Set the callback function for use by an RpcAppSystem instance.
Definition rpc_app.c:391
RpcAppSystemEventDataType
Enumeration of possible event data types.
Definition rpc_app.h:25
@ RpcAppSystemEventDataTypeString
Event data contains a zero-terminated string.
Definition rpc_app.h:27
@ RpcAppSystemEventDataTypeNone
No data is provided by the event.
Definition rpc_app.h:26
@ RpcAppSystemEventDataTypeBytes
Event data contains zero or more bytes.
Definition rpc_app.h:29
@ RpcAppSystemEventDataTypeInt32
Event data contains a signed 32-bit integer.
Definition rpc_app.h:28
void rpc_system_app_send_started(RpcAppSystem *rpc_app)
Send a notification that an RpcAppSystem instance has been started and is ready.
Definition rpc_app.c:351
void rpc_system_app_send_exited(RpcAppSystem *rpc_app)
Send a notification that the application using an RpcAppSystem instance is about to exit.
Definition rpc_app.c:356
RpcAppSystemEventType
Enumeration of possible event types.
Definition rpc_app.h:53
@ RpcAppEventTypeDataExchange
The client has sent a byte array of arbitrary size.
Definition rpc_app.h:106
@ RpcAppEventTypeInvalid
Denotes an invalid state.
Definition rpc_app.h:59
@ RpcAppEventTypeAppExit
The client has requested the application to exit.
Definition rpc_app.h:71
@ RpcAppEventTypeButtonPress
The client has informed the application that a button has been pressed.
Definition rpc_app.h:85
@ RpcAppEventTypeSessionClose
The client side has closed the session.
Definition rpc_app.h:65
@ RpcAppEventTypeLoadFile
The client has requested the application to load a file.
Definition rpc_app.h:78
@ RpcAppEventTypeButtonRelease
The client has informed the application that a button has been released.
Definition rpc_app.h:92
@ RpcAppEventTypeButtonPressRelease
The client has informed the application that a button has been pressed and released.
Definition rpc_app.h:99
void rpc_system_app_set_error_text(RpcAppSystem *rpc_app, const char *error_text)
Set the error text stored in an RpcAppSystem instance.
Definition rpc_app.c:403
void rpc_system_app_confirm(RpcAppSystem *rpc_app, bool result)
Send a confirmation that the application using an RpcAppSystem instance has handled the event.
Definition rpc_app.c:361
void rpc_system_app_error_reset(RpcAppSystem *rpc_app)
Reset the error code and text stored in an RpcAppSystem instance.
Definition rpc_app.c:413
void rpc_system_app_exchange_data(RpcAppSystem *rpc_app, const uint8_t *data, size_t data_size)
Send a byte array of arbitrary data to the client using an RpcAppSystem instance.
Definition rpc_app.c:420
void(* RpcAppSystemCallback)(const RpcAppSystemEvent *event, void *context)
Callback function type.
Definition rpc_app.h:127
Event data structure, containing the type and associated data.
Definition rpc_app.h:37
RpcAppSystemEventDataType type
Type of the data.
Definition rpc_app.h:39
size_t size
Size of the byte array, in bytes.
Definition rpc_app.h:45
const char * string
Pointer to a zero-terminated character string.
Definition rpc_app.h:41
const uint8_t * ptr
Pointer to the byte array data.
Definition rpc_app.h:44
int32_t i32
Signed 32-bit integer value.
Definition rpc_app.h:42
RPC application subsystem event structure.
Definition rpc_app.h:112
RpcAppSystemEventType type
Type of the event.
Definition rpc_app.h:113
RpcAppSystemEventData data
Data associated with the event.
Definition rpc_app.h:114