blob: 5edec187f7c3a29bcc8ceef075c4f2e40de9a8a9 [file] [log] [blame]
Alex Deymoaea4c1c2015-08-19 20:24:43 -07001//
2// Copyright (C) 2014 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 Deymobd04b142014-03-18 15:00:05 -070016
Gilad Arnold48415f12014-06-27 07:10:58 -070017#ifndef UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
18#define UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
Alex Deymobd04b142014-03-18 15:00:05 -070019
Alex Deymo63784a52014-05-28 10:46:14 -070020#include "update_engine/update_manager/provider.h"
21#include "update_engine/update_manager/variable.h"
Alex Deymobd04b142014-03-18 15:00:05 -070022
Alex Deymo63784a52014-05-28 10:46:14 -070023namespace chromeos_update_manager {
Alex Deymobd04b142014-03-18 15:00:05 -070024
25// Provider for system information, mostly constant, such as the information
26// reported by crossystem, the kernel boot command line and the partition table.
27class SystemProvider : public Provider {
28 public:
Alex Deymo610277e2014-11-11 21:18:11 -080029 ~SystemProvider() override {}
David Zeuthen21716e22014-04-23 15:42:05 -070030
Alex Deymobd04b142014-03-18 15:00:05 -070031 // Returns true if the boot mode is normal or if it's unable to
32 // determine the boot mode. Returns false if the boot mode is
33 // developer.
David Zeuthen21716e22014-04-23 15:42:05 -070034 virtual Variable<bool>* var_is_normal_boot_mode() = 0;
Alex Deymobd04b142014-03-18 15:00:05 -070035
36 // Returns whether this is an official Chrome OS build.
David Zeuthen21716e22014-04-23 15:42:05 -070037 virtual Variable<bool>* var_is_official_build() = 0;
Alex Deymobd04b142014-03-18 15:00:05 -070038
Gilad Arnold48e13612014-05-16 10:18:05 -070039 // Returns a variable that tells whether OOBE was completed.
40 virtual Variable<bool>* var_is_oobe_complete() = 0;
41
Gilad Arnoldbfc44f72014-07-09 14:41:39 -070042 // Returns a variable that tells the boot device is removable (USB stick etc).
43 virtual Variable<bool>* var_is_boot_device_removable() = 0;
44
Alex Deymobd04b142014-03-18 15:00:05 -070045 protected:
46 SystemProvider() {}
47
Alex Deymobd04b142014-03-18 15:00:05 -070048 private:
Alex Deymobd04b142014-03-18 15:00:05 -070049 DISALLOW_COPY_AND_ASSIGN(SystemProvider);
50};
51
Alex Deymo63784a52014-05-28 10:46:14 -070052} // namespace chromeos_update_manager
Alex Deymobd04b142014-03-18 15:00:05 -070053
Gilad Arnold48415f12014-06-27 07:10:58 -070054#endif // UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_