- Provide the Input interface, which provides a generic Read function.
- Switch to non-virtual interfaces to allow for potential future
pre/post operations (e.g. error handling, debug logging).
Change-Id: If7e95c3c47a090c7dc0a72426e6224c9ed04b62a
- Provide StatusWithSize constants that can be used similarly to
Status::Codes. For example, StatusWithSize::DATA_LOSS constructs a
StatusWithSize with status DATA_LOSS and size 0.
- Remove the default constructor argument for the size. Use the
constants instead.
- Update uses of StatusWithSize(Status::X) to use StatusWithSize::X.
Change-Id: I901b7bb0bbbb4fde52f6b3acc3047f366b250515
- Add the FlashPartition and address to the Entry class.
- Move functions for reading or writing the entry header, key, and value
to the Entry class.
Change-Id: I0af3c140a519c8b050fcef81eca4f3b45560f75c
- Disallow implicit conversions between Status and StatusWithSize, which
can be problematic.
- Add TRY_WITH_SIZE to pw_kvs to handle returning StatusWithSize from
functions.
- Make zero the default size argument for StatusWithSize.
- Expand tests for StatusWithSize.
Change-Id: Ia1c36e5a39402a50138d93e89afbaa5e772adb8a
- Define the Output interface.
- Create AlignedWriter class, which handles writing aligned and padded
data to a buffer.
- Define AlignedWriterBuffer, which provides a buffer to an
AlignedWriter.
Change-Id: I791c5fc2d47617b0866fa779a506cb977905f245
- Rename multi-span Write to WriteAligned to reflect that the number of
bytes written may be larger than the input due to padding.
- Make alignment_bytes_ a member of FlashPartition instead of a virtual
function.
- Enable tests that now pass.
Change-Id: Iad985988ef97607b38fb0c84589cabe752de71a2
- Implement Delete function.
- Add new tests and enable a few that pass now.
- Have out-of-bounds flash reads return OUT_OF_RANGE to differentiate
from INVALID_ARGUMENT.
Change-Id: I5d65ad36913b30f2554bd12eaba26127ae0ec8f2
Builds, but lots more work needed.
Fun fact: this code was written collaboratively in a Google Doc.
Change-Id: I8a89c5d0fdc71ec28cf432350e65d17e24a6f25c