File wsh_shell_session.c
FileList > src > wsh_shell_session.c
Go to the source code of this file
#include "wsh_shell_session.h"
Public Functions
| Type | Name |
|---|---|
| void | WshShellSession_Clear (WshShellSessionIO_t * pSessIO) Drop any persisted session. |
| void | WshShellSession_Init (WshShellSessionIO_t * pSessIO, WshShellSession_ReadHandler_t readFn, WshShellSession_WriteHandler_t writeFn) Initialise the session system with custom I/O handlers. |
| WshShell_Bool_t | WshShellSession_IsValid (const WshShellSession_t * pcSession) Check whether a descriptor is a valid, active keep request. |
| WshShellSession_t | WshShellSession_Read (WshShellSessionIO_t * pSessIO) Read the persisted descriptor. |
| void | WshShellSession_Store (WshShellSessionIO_t * pSessIO, WshShellSession_t session) Persist a descriptor, computing its integrity hash first. |
Public Functions Documentation
function WshShellSession_Clear
Drop any persisted session.
Parameters:
pSessIOPointer to the I/O structure.
function WshShellSession_Init
Initialise the session system with custom I/O handlers.
Installs the handlers and normalises the backing store: any invalid descriptor (e.g. random RAM after a cold boot) is cleared so it will not be restored.
Parameters:
pSessIOPointer to the I/O structure.readFnCallback to read the saved descriptor.writeFnCallback to persist the descriptor.
function WshShellSession_IsValid
Check whether a descriptor is a valid, active keep request.
Parameters:
pcSessionDescriptor to validate.
Return value:
trueHash matches and RebootsLeft > 0.falseCorrupt/uninitialised, or budget exhausted.
function WshShellSession_Read
Read the persisted descriptor.
Parameters:
pSessIOPointer to the I/O structure.
Returns:
The stored descriptor (may be invalid — check with WshShellSession_IsValid()).
function WshShellSession_Store
Persist a descriptor, computing its integrity hash first.
Parameters:
pSessIOPointer to the I/O structure.sessionDescriptor to store (its Hash field is filled in).
The documentation for this class was generated from the following file src/wsh_shell_session.c