Generalize the EndpointServer to require less boilerplate.
Classes can now inherit from the EndpointServer and just implement the HandleRequest function.
This commit is contained in:
parent
847d37addc
commit
caccb08e16
14 changed files with 215 additions and 147 deletions
|
|
@ -6,13 +6,14 @@
|
|||
|
||||
glcr::ErrorOr<MappedMemoryRegion> DenaliClient::ReadSectors(
|
||||
uint64_t device_id, uint64_t lba, uint64_t num_sectors) {
|
||||
DenaliRead read{
|
||||
DenaliReadRequest read{
|
||||
.device_id = device_id,
|
||||
.lba = lba,
|
||||
.size = num_sectors,
|
||||
};
|
||||
auto pair_or =
|
||||
endpoint_->CallEndpointGetCap<DenaliRead, DenaliReadResponse>(read);
|
||||
endpoint_->CallEndpointGetCap<DenaliReadRequest, DenaliReadResponse>(
|
||||
read);
|
||||
if (!pair_or) {
|
||||
return pair_or.error();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue