-
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
Convert persistent storage to sync calls and binary data to align with KVS style storage #6286
Convert persistent storage to sync calls and binary data to align with KVS style storage #6286
Conversation
… and kvs replacement will be sync
…ng for what previously was assumed to be null terminated strings
no need to base-64 the serialized values AGAINconnectedhomeip/src/controller/CHIPDeviceController.cpp Lines 381 to 386 in 839f6c4
This comment was generated by todo based on a
|
no need to base64 again the valueconnectedhomeip/src/controller/CHIPDeviceController.cpp Lines 955 to 965 in 839f6c4
This comment was generated by todo based on a
|
ideally the error from the dispatch should be returnedconnectedhomeip/src/darwin/Framework/CHIP/CHIPPersistentStorageDelegateBridge.mm Lines 134 to 144 in 839f6c4
This comment was generated by todo based on a
|
ideally the error from the dispatch should be returnedconnectedhomeip/src/darwin/Framework/CHIP/CHIPPersistentStorageDelegateBridge.mm Lines 157 to 162 in 839f6c4
This comment was generated by todo based on a
|
Replied there and also followed up offline. Generally:
This PR is starting to consolidate the APIs up to a point of at least having a uniform API surface for storage Future PRs expected with: |
removed the completion-handle key value getter. |
@@ -47,13 +37,13 @@ typedef void (^CHIPSendDeleteStatus)(NSString * key, NSError * status); | |||
* Set the value of the key to the given value | |||
* | |||
*/ | |||
- (void)CHIPSetKeyValue:(NSString *)key value:(NSString *)value handler:(CHIPSendSetStatus)completionHandler; |
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.
this needs to be a a dispatch async callback on Darwin, doesn't match Darwin style otherwise
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.
After some further review, this seems like a good step forward. We can fix async later :)
Size increase report for "esp32-example-build" from a8226ab
Full report output
|
Size increase report for "nrfconnect-example-build" from a8226ab
Full report output
|
Problem
Persistent storage logic is split - sync and async callbacks, the actual async callback is mostly unused. Binary data cannot be stored and all strings are assumed ascii (or at least null terminated).
Summary of Changes