blob: cd7c8d518478cde4d142fdf3d57026aeecb325a1 [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
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_HARDWARE_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_HARDWARE_H__
7
8#include "update_engine/hardware_interface.h"
9
10#include "base/basictypes.h"
11
12namespace chromeos_update_engine {
13
14// Implements the real interface with the hardware.
15class Hardware : public HardwareInterface {
16 public:
Chris Masonef8d037f2014-02-19 01:53:00 +000017 Hardware();
18 virtual ~Hardware();
Alex Deymo42432912013-07-12 20:21:15 -070019
20 // HardwareInterface methods.
Don Garrett83692e42013-11-08 10:11:30 -080021 virtual const std::string BootKernelDevice();
Alex Deymo42432912013-07-12 20:21:15 -070022 virtual const std::string BootDevice();
Alex Vakulenko59e253e2014-02-24 10:40:21 -080023 virtual std::vector<std::string> GetKernelDevices() override;
Don Garrett83692e42013-11-08 10:11:30 -080024 virtual bool IsKernelBootable(const std::string& kernel_device,
25 bool* bootable);
26 virtual bool MarkKernelUnbootable(const std::string& kernel_device);
J. Richard Barnette056b0ab2013-10-29 15:24:56 -070027 virtual bool IsOfficialBuild();
28 virtual bool IsNormalBootMode();
J. Richard Barnette522d36f2013-10-28 17:22:12 -070029 virtual std::string GetHardwareClass();
30 virtual std::string GetFirmwareVersion();
31 virtual std::string GetECVersion();
Alex Deymo42432912013-07-12 20:21:15 -070032
33 private:
34 DISALLOW_COPY_AND_ASSIGN(Hardware);
35};
36
37} // namespace chromeos_update_engine
38
39#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_HARDWARE_H__