Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 1 | // 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 Arnold | 2cbb385 | 2014-03-07 12:40:50 -0800 | [diff] [blame] | 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_ |
Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 7 | |
Alex Deymo | c83baf6 | 2014-04-02 17:43:35 -0700 | [diff] [blame] | 8 | #include "update_engine/policy_manager/device_policy_provider.h" |
Alex Deymo | f9f1263 | 2014-04-17 13:51:26 -0700 | [diff] [blame] | 9 | #include "update_engine/policy_manager/config_provider.h" |
Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 10 | #include "update_engine/policy_manager/random_provider.h" |
| 11 | #include "update_engine/policy_manager/shill_provider.h" |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 12 | #include "update_engine/policy_manager/system_provider.h" |
Gilad Arnold | 78a7811 | 2014-03-13 14:58:06 -0700 | [diff] [blame] | 13 | #include "update_engine/policy_manager/time_provider.h" |
Gilad Arnold | ae47a9a | 2014-03-26 12:16:47 -0700 | [diff] [blame] | 14 | #include "update_engine/policy_manager/updater_provider.h" |
Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 15 | |
| 16 | namespace chromeos_policy_manager { |
| 17 | |
| 18 | // The State class is an interface to the ensemble of providers. This class |
| 19 | // gives visibility of the state providers to policy implementations. |
| 20 | class State { |
| 21 | public: |
| 22 | virtual ~State() {} |
| 23 | |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 24 | // These methods return the given provider. |
David Zeuthen | 4e89e2c | 2014-04-24 11:47:00 -0700 | [diff] [blame] | 25 | virtual ConfigProvider* config_provider() = 0; |
| 26 | virtual DevicePolicyProvider* device_policy_provider() = 0; |
| 27 | virtual RandomProvider* random_provider() = 0; |
| 28 | virtual ShillProvider* shill_provider() = 0; |
| 29 | virtual SystemProvider* system_provider() = 0; |
| 30 | virtual TimeProvider* time_provider() = 0; |
| 31 | virtual UpdaterProvider* updater_provider() = 0; |
| 32 | |
| 33 | protected: |
| 34 | State() {} |
Gilad Arnold | 78a7811 | 2014-03-13 14:58:06 -0700 | [diff] [blame] | 35 | |
Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 36 | private: |
David Zeuthen | 4e89e2c | 2014-04-24 11:47:00 -0700 | [diff] [blame] | 37 | DISALLOW_COPY_AND_ASSIGN(State); |
Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } // namespace chromeos_policy_manager |
| 41 | |
Gilad Arnold | 2cbb385 | 2014-03-07 12:40:50 -0800 | [diff] [blame] | 42 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_ |