blob: 4f03cf1d8de68a1bb913395bb8bcd1b239a3f67f [file] [log] [blame]
Alex Deymoaea4c1c2015-08-19 20:24:43 -07001//
2// Copyright (C) 2013 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
Alex Deymo42432912013-07-12 20:21:15 -070016
Gilad Arnoldcf175a02014-07-10 16:48:47 -070017#ifndef UPDATE_ENGINE_HARDWARE_H_
18#define UPDATE_ENGINE_HARDWARE_H_
Alex Deymo42432912013-07-12 20:21:15 -070019
Alex Deymodf632d12014-04-29 20:04:36 -070020#include <string>
21#include <vector>
Alex Deymo42432912013-07-12 20:21:15 -070022
Ben Chan05735a12014-09-03 07:48:22 -070023#include <base/macros.h>
Alex Deymodf632d12014-04-29 20:04:36 -070024
25#include "update_engine/hardware_interface.h"
Alex Deymo42432912013-07-12 20:21:15 -070026
27namespace chromeos_update_engine {
28
29// Implements the real interface with the hardware.
30class Hardware : public HardwareInterface {
31 public:
Alex Deymo763e7db2015-08-27 21:08:08 -070032 Hardware() = default;
33 ~Hardware() override = default;
Alex Deymo42432912013-07-12 20:21:15 -070034
35 // HardwareInterface methods.
Alex Vakulenko157fe302014-08-11 15:59:58 -070036 bool IsOfficialBuild() const override;
37 bool IsNormalBootMode() const override;
38 bool IsOOBEComplete(base::Time* out_time_of_oobe) const override;
39 std::string GetHardwareClass() const override;
40 std::string GetFirmwareVersion() const override;
41 std::string GetECVersion() const override;
Alex Deymoebbe7ef2014-10-30 13:02:49 -070042 int GetPowerwashCount() const override;
Alex Deymo42432912013-07-12 20:21:15 -070043
44 private:
45 DISALLOW_COPY_AND_ASSIGN(Hardware);
46};
47
48} // namespace chromeos_update_engine
49
Gilad Arnoldcf175a02014-07-10 16:48:47 -070050#endif // UPDATE_ENGINE_HARDWARE_H_