// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_ #define SERVICES_DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_ #include "base/files/file_path.h" #include "services/device/public/mojom/sensor.mojom.h" namespace device { class PlatformSensorConfiguration; SensorReading; // This structure represents a context that is used to identify a udev device // and create a type specific SensorInfoLinux. For example, when a // SensorDeviceManager receives a udev device, it uses this structure to // identify what type of sensor that is and creates a SensorInfoLinux structure // that holds all the necessary information to create a PlatformSensorLinux. struct SensorPathsLinux { … }; // Initializes sensor data according to |type|. bool InitSensorData(mojom::SensorType type, SensorPathsLinux* data); // This structure represents an iio device, which info is taken // from udev service. If a client requests a sensor from a provider, // the provider takes this initialized and stored structure and uses it to // create a requested PlatformSensorLinux of a certain type. struct SensorInfoLinux { … }; } // namespace device #endif // SERVICES_DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_