blob: 87d9ba0c9edff3bb556b759a6c55dcfb2ce1ab14 [file] [log] [blame]
// Copyright 2021 The Chromium OS 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 RMAD_UTILS_IIO_SENSOR_PROBE_UTILS_IMPL_H_
#define RMAD_UTILS_IIO_SENSOR_PROBE_UTILS_IMPL_H_
#include "rmad/utils/iio_sensor_probe_utils.h"
#include <memory>
#include <set>
#include <libmems/iio_context.h>
#include "rmad/constants.h"
namespace rmad {
class IioSensorProbeUtilsImpl : public IioSensorProbeUtils {
public:
IioSensorProbeUtilsImpl();
// Used to inject mock |iio_context_| for testing.
explicit IioSensorProbeUtilsImpl(
std::unique_ptr<libmems::IioContext> iio_context);
~IioSensorProbeUtilsImpl() override = default;
std::set<RmadComponent> Probe() override;
private:
std::unique_ptr<libmems::IioContext> iio_context_;
};
} // namespace rmad
#endif // RMAD_UTILS_IIO_SENSOR_PROBE_UTILS_IMPL_H_