Chromium Code Reviews| Index: device/generic_sensor/platform_sensor_utils_iio.h |
| diff --git a/device/generic_sensor/platform_sensor_utils_iio.h b/device/generic_sensor/platform_sensor_utils_iio.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..398595a37b55c2264b88336377762907856d93cd |
| --- /dev/null |
| +++ b/device/generic_sensor/platform_sensor_utils_iio.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ |
| +#define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ |
| + |
| +#include "base/files/file_path.h" |
| +#include "device/generic_sensor/public/interfaces/sensor.mojom.h" |
| + |
| +namespace device { |
| + |
| +class SensorReader { |
|
Mikhail
2016/10/11 14:46:47
how is that different to ambient_light_reader_iio.
|
| + public: |
| + static std::unique_ptr<SensorReader> Create(mojom::SensorType type); |
| + |
| + bool ReadSensorValue(double* lux); |
| + |
| + mojom::SensorType type() const; |
| + |
| + private: |
| + SensorReader(mojom::SensorType type, |
| + std::vector<base::FilePath> sensor_paths); |
|
Mikhail
2016/10/11 14:46:47
pass vector as const ref
|
| + |
| + const mojom::SensorType type_; |
| + const std::vector<base::FilePath> sensor_paths_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SensorReader); |
| +}; |
| + |
| +} // device |
| + |
| +#endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ |