OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ | |
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "device/generic_sensor/public/interfaces/sensor.mojom.h" | |
10 | |
11 namespace device { | |
12 | |
13 class SensorReader { | |
Mikhail
2016/10/11 14:46:47
how is that different to ambient_light_reader_iio.
| |
14 public: | |
15 static std::unique_ptr<SensorReader> Create(mojom::SensorType type); | |
16 | |
17 bool ReadSensorValue(double* lux); | |
18 | |
19 mojom::SensorType type() const; | |
20 | |
21 private: | |
22 SensorReader(mojom::SensorType type, | |
23 std::vector<base::FilePath> sensor_paths); | |
Mikhail
2016/10/11 14:46:47
pass vector as const ref
| |
24 | |
25 const mojom::SensorType type_; | |
26 const std::vector<base::FilePath> sensor_paths_; | |
27 | |
28 DISALLOW_COPY_AND_ASSIGN(SensorReader); | |
29 }; | |
30 | |
31 } // device | |
32 | |
33 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_ | |
OLD | NEW |