blob: caaecd0d36fad69db8566fed354407d6f70688f1 [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
Alex Deymobd04b142014-03-18 15:00:05 -070030 protected:
31 SystemProvider() {}
32
Alex Deymobd04b142014-03-18 15:00:05 -070033 private:
Alex Deymobd04b142014-03-18 15:00:05 -070034 DISALLOW_COPY_AND_ASSIGN(SystemProvider);
35};
36
Alex Deymo63784a52014-05-28 10:46:14 -070037} // namespace chromeos_update_manager
Alex Deymobd04b142014-03-18 15:00:05 -070038
Gilad Arnold48415f12014-06-27 07:10:58 -070039#endif // UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_