Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame^] | 1 | // |
| 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 Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 16 | |
Gilad Arnold | cf175a0 | 2014-07-10 16:48:47 -0700 | [diff] [blame] | 17 | #ifndef UPDATE_ENGINE_HARDWARE_H_ |
| 18 | #define UPDATE_ENGINE_HARDWARE_H_ |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 19 | |
Alex Deymo | df632d1 | 2014-04-29 20:04:36 -0700 | [diff] [blame] | 20 | #include <string> |
| 21 | #include <vector> |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 22 | |
Ben Chan | 05735a1 | 2014-09-03 07:48:22 -0700 | [diff] [blame] | 23 | #include <base/macros.h> |
Alex Deymo | df632d1 | 2014-04-29 20:04:36 -0700 | [diff] [blame] | 24 | |
| 25 | #include "update_engine/hardware_interface.h" |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 26 | |
| 27 | namespace chromeos_update_engine { |
| 28 | |
| 29 | // Implements the real interface with the hardware. |
| 30 | class Hardware : public HardwareInterface { |
| 31 | public: |
Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 32 | Hardware(); |
Alex Vakulenko | 157fe30 | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 33 | ~Hardware() override; |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 34 | |
| 35 | // HardwareInterface methods. |
Alex Vakulenko | 157fe30 | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 36 | std::string BootKernelDevice() const override; |
| 37 | std::string BootDevice() const override; |
| 38 | bool IsBootDeviceRemovable() const override; |
| 39 | std::vector<std::string> GetKernelDevices() const override; |
| 40 | bool IsKernelBootable(const std::string& kernel_device, |
| 41 | bool* bootable) const override; |
| 42 | bool MarkKernelUnbootable(const std::string& kernel_device) override; |
| 43 | bool IsOfficialBuild() const override; |
| 44 | bool IsNormalBootMode() const override; |
| 45 | bool IsOOBEComplete(base::Time* out_time_of_oobe) const override; |
| 46 | std::string GetHardwareClass() const override; |
| 47 | std::string GetFirmwareVersion() const override; |
| 48 | std::string GetECVersion() const override; |
Alex Deymo | ebbe7ef | 2014-10-30 13:02:49 -0700 | [diff] [blame] | 49 | int GetPowerwashCount() const override; |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 50 | |
| 51 | private: |
| 52 | DISALLOW_COPY_AND_ASSIGN(Hardware); |
| 53 | }; |
| 54 | |
| 55 | } // namespace chromeos_update_engine |
| 56 | |
Gilad Arnold | cf175a0 | 2014-07-10 16:48:47 -0700 | [diff] [blame] | 57 | #endif // UPDATE_ENGINE_HARDWARE_H_ |