blob: 7ab879a0a6507b2042e5cb9870fd0de48716860f [file] [log] [blame]
Alex Deymo42432912013-07-12 20:21:15 -07001// Copyright (c) 2013 The Chromium OS 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
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_HARDWARE_H_
6#define UPDATE_ENGINE_HARDWARE_H_
Alex Deymo42432912013-07-12 20:21:15 -07007
Alex Deymodf632d12014-04-29 20:04:36 -07008#include <string>
9#include <vector>
Alex Deymo42432912013-07-12 20:21:15 -070010
Alex Deymodf632d12014-04-29 20:04:36 -070011#include <base/basictypes.h>
12
13#include "update_engine/hardware_interface.h"
Alex Deymo42432912013-07-12 20:21:15 -070014
15namespace chromeos_update_engine {
16
17// Implements the real interface with the hardware.
18class Hardware : public HardwareInterface {
19 public:
Chris Masonef8d037f2014-02-19 01:53:00 +000020 Hardware();
Alex Vakulenkod0fdfb32014-02-21 15:26:26 -080021 virtual ~Hardware() override;
Alex Deymo42432912013-07-12 20:21:15 -070022
23 // HardwareInterface methods.
Alex Vakulenkod0fdfb32014-02-21 15:26:26 -080024 virtual std::string BootKernelDevice() const override;
25 virtual std::string BootDevice() const override;
Alex Deymo5708ecd2014-04-29 19:44:50 -070026 virtual bool IsBootDeviceRemovable() const override;
Alex Vakulenkod0fdfb32014-02-21 15:26:26 -080027 virtual std::vector<std::string> GetKernelDevices() const override;
Don Garrett83692e42013-11-08 10:11:30 -080028 virtual bool IsKernelBootable(const std::string& kernel_device,
Alex Vakulenkod0fdfb32014-02-21 15:26:26 -080029 bool* bootable) const override;
30 virtual bool MarkKernelUnbootable(const std::string& kernel_device) override;
31 virtual bool IsOfficialBuild() const override;
32 virtual bool IsNormalBootMode() const override;
Alex Deymobccbc382014-04-03 13:38:55 -070033 virtual bool IsOOBEComplete(base::Time* out_time_of_oobe) const override;
Alex Vakulenkod0fdfb32014-02-21 15:26:26 -080034 virtual std::string GetHardwareClass() const override;
35 virtual std::string GetFirmwareVersion() const override;
36 virtual std::string GetECVersion() const override;
Alex Deymo42432912013-07-12 20:21:15 -070037
38 private:
39 DISALLOW_COPY_AND_ASSIGN(Hardware);
40};
41
42} // namespace chromeos_update_engine
43
Gilad Arnoldcf175a02014-07-10 16:48:47 -070044#endif // UPDATE_ENGINE_HARDWARE_H_