• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
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 //
16 
17 #ifndef UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
18 #define UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
19 
20 #include "update_engine/update_manager/provider.h"
21 #include "update_engine/update_manager/variable.h"
22 
23 namespace chromeos_update_manager {
24 
25 // Provider for system information, mostly constant, such as the information
26 // reported by crossystem, the kernel boot command line and the partition table.
27 class SystemProvider : public Provider {
28  public:
~SystemProvider()29   ~SystemProvider() override {}
30 
31   // 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.
34   virtual Variable<bool>* var_is_normal_boot_mode() = 0;
35 
36   // Returns whether this is an official Chrome OS build.
37   virtual Variable<bool>* var_is_official_build() = 0;
38 
39   // Returns a variable that tells whether OOBE was completed.
40   virtual Variable<bool>* var_is_oobe_complete() = 0;
41 
42   // Returns a variable that tells the number of slots in the system.
43   virtual Variable<unsigned int>* var_num_slots() = 0;
44 
45   // Returns the required platform version of the configured auto launch
46   // with zero delay kiosk app if any.
47   virtual Variable<std::string>* var_kiosk_required_platform_version() = 0;
48 
49  protected:
SystemProvider()50   SystemProvider() {}
51 
52  private:
53   DISALLOW_COPY_AND_ASSIGN(SystemProvider);
54 };
55 
56 }  // namespace chromeos_update_manager
57 
58 #endif  // UPDATE_ENGINE_UPDATE_MANAGER_SYSTEM_PROVIDER_H_
59