API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IPERSISTENTSTORAGE_GETVALUE()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IPERSISTENTSTORAGE_CountKeys
Description
Retrieve a value specified by the supplied offset.
Params
storage
[]:
Pointer to the IPersistentStorage interface object.
valueOffset
[]:
The location of the desired key, counted from 0.
data
[]:
[out] A pointer to a data buffer which will be set and cannot be modified. Note that this pointer is only guaranteed to be valid until the *next* call to IPERSISTENTSTORAGE. If you need to preserve the data beyond that point, copy the string out.
dataLength
[]:
[out] A pointer to the length of data which will be set on successful retrieval of the data.
Interface
  • IPERSISTENTSTORAGE
Prototype
  •    int IPERSISTENTSTORAGE_GetValue(IPersistentStorage* storage, uint32 valueOffset,
                                       const uint8* * data, uint32* dataLength);
    
Return
  • AEE_SUCCESS: The key was successfully retrieved. AEE_EFAILED: The requested key does not exist or another error occurred.
Side Effect
  • None
Comments
To retrieve a key, the keyOffset needs to be in the range 0..[numberOfKeys - 1], where numberOfKeys is calculated by IPERSISTENTSTORAGE_CountKeys().