blob: 5aa7cf0c6d000279a1d6491eff697de8ced29f28 [file] [log] [blame]
// Copyright 2015 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 THERMALD_FAKE_TEMPERATURE_SENSOR_H_
#define THERMALD_FAKE_TEMPERATURE_SENSOR_H_
#include <string>
#include "base/files/file_path.h"
#include "base/macros.h"
#include "thermald/temperature_sensor_common.h"
namespace thermald {
// A fake temperature sensor reads the temperature from a file. The file is
// expected to contain a string with the temperature in millidegree Celsius.
class FakeTemperatureSensor : public TemperatureSensorCommon {
public:
FakeTemperatureSensor(const base::FilePath &fake_data_file,
const std::string &name);
// Read the temperature from the file.
bool ReadTemperature(int *value) override;
private:
const base::FilePath fake_data_file_;
DISALLOW_COPY_AND_ASSIGN(FakeTemperatureSensor);
};
} // namespace thermald
#endif // THERMALD_FAKE_TEMPERATURE_SENSOR_H_