#include "services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h"
#include <utility>
#include "base/memory/ptr_util.h"
#include "device/base/synchronization/shared_memory_seqlock_buffer.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer.h"
namespace {
constexpr int kMaxReadAttemptsCount = …;
}
namespace device {
SensorReadingSharedBufferReader::SensorReadingSharedBufferReader(
base::ReadOnlySharedMemoryMapping mapping)
: … { … }
SensorReadingSharedBufferReader::~SensorReadingSharedBufferReader() = default;
std::unique_ptr<SensorReadingSharedBufferReader>
SensorReadingSharedBufferReader::Create(base::ReadOnlySharedMemoryRegion region,
uint64_t reading_buffer_offset) { … }
bool SensorReadingSharedBufferReader::GetReading(SensorReading* result) { … }
bool SensorReadingSharedBufferReader::GetReading(
const SensorReadingSharedBuffer* buffer,
SensorReading* result) { … }
}