Alex Deymo | 63784a5 | 2014-05-28 10:46:14 -0700 | [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 | 48415f1 | 2014-06-27 07:10:58 -0700 | [diff] [blame] | 5 | #ifndef UPDATE_ENGINE_UPDATE_MANAGER_STATE_H_ |
| 6 | #define UPDATE_ENGINE_UPDATE_MANAGER_STATE_H_ |
Alex Deymo | 63784a5 | 2014-05-28 10:46:14 -0700 | [diff] [blame] | 7 | |
| 8 | #include "update_engine/update_manager/config_provider.h" |
| 9 | #include "update_engine/update_manager/device_policy_provider.h" |
| 10 | #include "update_engine/update_manager/random_provider.h" |
| 11 | #include "update_engine/update_manager/shill_provider.h" |
| 12 | #include "update_engine/update_manager/system_provider.h" |
| 13 | #include "update_engine/update_manager/time_provider.h" |
| 14 | #include "update_engine/update_manager/updater_provider.h" |
| 15 | |
| 16 | namespace chromeos_update_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 | |
| 24 | // These methods return the given provider. |
| 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() {} |
| 35 | |
| 36 | private: |
| 37 | DISALLOW_COPY_AND_ASSIGN(State); |
| 38 | }; |
| 39 | |
| 40 | } // namespace chromeos_update_manager |
| 41 | |
Gilad Arnold | 48415f1 | 2014-06-27 07:10:58 -0700 | [diff] [blame] | 42 | #endif // UPDATE_ENGINE_UPDATE_MANAGER_STATE_H_ |