-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ICD Storage #30808
Improve ICD Storage #30808
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ class ICDClientStorage | |
* Called during ICD device registration in commissioning, commissioner/controller | ||
* provides raw key data, the shared key handle in clientInfo is updated based upon raw key data | ||
* | ||
* @param[inout] aICDClientInfo the ICD Client information to be updated with keyData and be saved | ||
* @param[inout] clientInfo the ICD Client information to be updated with keyData and be saved | ||
* @param[in] aKeyData raw key data provided by application | ||
*/ | ||
virtual CHIP_ERROR SetKey(ICDClientInfo & clientInfo, const ByteSpan keyData) = 0; | ||
|
@@ -61,16 +61,31 @@ class ICDClientStorage | |
* Store updated ICD ClientInfo to storage when ICD registration completes or check-in message | ||
* comes. | ||
* | ||
* @param[in] aICDClientInfo the updated ICD Client Info. | ||
* @param[in] clientInfo the updated ICD Client Info. | ||
*/ | ||
virtual CHIP_ERROR StoreEntry(const ICDClientInfo & clientInfo) = 0; | ||
|
||
/** | ||
* Remove ICD key from clientInfo when ICD registration fails | ||
* | ||
* @param[inout] clientInfo the updated ICD Client Info. | ||
*/ | ||
virtual void RemoveKey(ICDClientInfo & clientInfo) = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should this do if there is no key for that clientinfo to start with? |
||
|
||
/** | ||
* Get ICD ClientInfo from storage | ||
* One user case is to retrieve UserActiveModeTriggerHint and inform how user how to wake up sleepy device. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/user/use/ And s/inform how user how to wake up sleepy/inform the user how to wake up a sleepy/ (note: multiple grammar fixes here). |
||
* @param[in] peerNode scoped node with peer node id and fabric index | ||
* @param[out] clientInfo the ICD Client Info. | ||
*/ | ||
virtual CHIP_ERROR GetEntry(const ScopedNodeId & peerNode, ICDClientInfo & clientInfo) = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there is no info for this node id, what's the expected way for the callee to communicate that? Needs to be documented. |
||
|
||
/** | ||
* Delete ICD Client persistent information associated with the specified scoped node Id. | ||
* when ICD device is unpaired/removed, the corresponding entry in ICD storage is removed. | ||
* @param aPeerNodeId scoped node with peer node id and fabric index | ||
* @param peerNode scoped node with peer node id and fabric index | ||
*/ | ||
virtual CHIP_ERROR DeleteEntry(const ScopedNodeId & peerNodeId) = 0; | ||
virtual CHIP_ERROR DeleteEntry(const ScopedNodeId & peerNode) = 0; | ||
|
||
/** | ||
* Remove all ICDClient persistent information associated with the specified | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in what way? The one implementation here is not updating anything about the clientinfo, as far as I can tell.