blob: 8688b9c9c06ecfacfcb7cbec9fe3ad40a4bca5e1 [file] [log] [blame]
Alex Deymobd04b142014-03-18 15:00:05 -07001// Copyright (c) 2014 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 Arnold48415f12014-06-27 07:10:58 -07005#ifndef UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
6#define UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
Alex Deymobd04b142014-03-18 15:00:05 -07007
Alex Deymo63784a52014-05-28 10:46:14 -07008#include "update_engine/update_manager/provider.h"
9#include "update_engine/update_manager/variable.h"
Alex Deymobd04b142014-03-18 15:00:05 -070010
Alex Deymo63784a52014-05-28 10:46:14 -070011namespace chromeos_update_manager {
Alex Deymobd04b142014-03-18 15:00:05 -070012
13// Provider for system information, mostly constant, such as the information
14// reported by crossystem, the kernel boot command line and the partition table.
15class SystemProvider : public Provider {
16 public:
David Zeuthen21716e22014-04-23 15:42:05 -070017 virtual ~SystemProvider() {}
18
Alex Deymobd04b142014-03-18 15:00:05 -070019 // Returns true if the boot mode is normal or if it's unable to
20 // determine the boot mode. Returns false if the boot mode is
21 // developer.
David Zeuthen21716e22014-04-23 15:42:05 -070022 virtual Variable<bool>* var_is_normal_boot_mode() = 0;
Alex Deymobd04b142014-03-18 15:00:05 -070023
24 // Returns whether this is an official Chrome OS build.
David Zeuthen21716e22014-04-23 15:42:05 -070025 virtual Variable<bool>* var_is_official_build() = 0;
Alex Deymobd04b142014-03-18 15:00:05 -070026
Gilad Arnold48e13612014-05-16 10:18:05 -070027 // Returns a variable that tells whether OOBE was completed.
28 virtual Variable<bool>* var_is_oobe_complete() = 0;
29
Gilad Arnoldbfc44f72014-07-09 14:41:39 -070030 // Returns a variable that tells the boot device is removable (USB stick etc).
31 virtual Variable<bool>* var_is_boot_device_removable() = 0;
32
Alex Deymobd04b142014-03-18 15:00:05 -070033 protected:
34 SystemProvider() {}
35
Alex Deymobd04b142014-03-18 15:00:05 -070036 private:
Alex Deymobd04b142014-03-18 15:00:05 -070037 DISALLOW_COPY_AND_ASSIGN(SystemProvider);
38};
39
Alex Deymo63784a52014-05-28 10:46:14 -070040} // namespace chromeos_update_manager
Alex Deymobd04b142014-03-18 15:00:05 -070041
Gilad Arnold48415f12014-06-27 07:10:58 -070042#endif // UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_