[FL-2242] RPC: Wait for session termination in unit tests (#1005)
* rpc: session termination callback * grammar fixes Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
12
applications/rpc/rpc.h
Executable file → Normal file
12
applications/rpc/rpc.h
Executable file → Normal file
@@ -21,6 +21,9 @@ typedef void (*RpcBufferIsEmptyCallback)(void* context);
|
||||
* is received. Any other actions lays on transport layer.
|
||||
* No destruction or session close preformed. */
|
||||
typedef void (*RpcSessionClosedCallback)(void* context);
|
||||
/** Callback to notify transport layer that session was closed
|
||||
* and all operations were finished */
|
||||
typedef void (*RpcSessionTerminatedCallback)(void* context);
|
||||
|
||||
/** Open RPC session
|
||||
*
|
||||
@@ -82,6 +85,15 @@ void rpc_session_set_buffer_is_empty_callback(
|
||||
*/
|
||||
void rpc_session_set_close_callback(RpcSession* session, RpcSessionClosedCallback callback);
|
||||
|
||||
/** Set callback to be called when RPC session is closed
|
||||
*
|
||||
* @param session pointer to RpcSession descriptor
|
||||
* @param callback callback to inform about RPC session state
|
||||
*/
|
||||
void rpc_session_set_terminated_callback(
|
||||
RpcSession* session,
|
||||
RpcSessionTerminatedCallback callback);
|
||||
|
||||
/** Give bytes to RPC service to decode them and perform command
|
||||
*
|
||||
* @param session pointer to RpcSession descriptor
|
||||
|
Reference in New Issue
Block a user