blob: 1fa2edf99bbdafea23de395812343def445e106c [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 Vakulenko157fe302014-08-11 15:59:58 -070021 ~Hardware() override;
Alex Deymo42432912013-07-12 20:21:15 -070022
23 // HardwareInterface methods.
Alex Vakulenko157fe302014-08-11 15:59:58 -070024 std::string BootKernelDevice() const override;
25 std::string BootDevice() const override;
26 bool IsBootDeviceRemovable() const override;
27 std::vector<std::string> GetKernelDevices() const override;
28 bool IsKernelBootable(const std::string& kernel_device,
29 bool* bootable) const override;
30 bool MarkKernelUnbootable(const std::string& kernel_device) override;
31 bool IsOfficialBuild() const override;
32 bool IsNormalBootMode() const override;
33 bool IsOOBEComplete(base::Time* out_time_of_oobe) const override;
34 std::string GetHardwareClass() const override;
35 std::string GetFirmwareVersion() const override;
36 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_