An internal module of Peer Manager. A module for managing persistent storing of GATT attributes pertaining to the GATT client role of the local device.
More...
An internal module of Peer Manager. A module for managing persistent storing of GATT attributes pertaining to the GATT client role of the local device.
typedef void(* gccm_evt_handler_t)(gccm_evt_t const *p_event) |
Event handler for events from the GATT Client Cache Manager module.
- Parameters
-
[in] | event | The event that has happened. |
[in] | peer | The id of the peer the event pertains to. |
[in] | flags | The data the event pertains to. |
Events that can come from the GATT Cache Manager module.
Enumerator |
---|
GCCM_EVT_REMOTE_DB_UPDATED |
Values for the specified data has been updated in persistent storage.
|
GCCM_EVT_REMOTE_DB_STORED |
New values for the specified data has been written in persistent storage.
|
Function for initializing the GATT Client Cache Manager module.
- Parameters
-
[in] | evt_handler | Callback for events from the GATT Client Cache Manager module. |
- Return values
-
NRF_SUCCESS | Initialization was successful. |
NRF_ERROR_NULL | evt_handler was NULL. |
Function for retrieving a persistently stored remote database.
- Parameters
-
[in] | peer_id | Peer to retrieve data for. |
[in,out] | p_remote_db | Copied database values. If NULL, nothing is copied. |
- Return values
-
NRF_SUCCESS | Data retrieved successfully. |
NRF_ERROR_NOT_FOUND | The peer ID is invalid or unallocated. |
NRF_ERROR_INVALID_STATE | Module is not initialized. |
Function for storing a discovered remote database persistently.
- Parameters
-
[in] | peer_id | Peer to store the database for. |
[in] | p_remote_db | Database values to store. If NULL, values are cleared instead. |
- Return values
-
NRF_SUCCESS | Store procedure successfully started. |
NRF_ERROR_NOT_FOUND | The peer id is invalid or unallocated. |
NRF_ERROR_INVALID_STATE | Module is not initialized. |