blob: 39abbad862df8572b1257d9e088f947da08cf3ed [file] [log] [blame]
Alex Deymo2de23f52014-02-26 14:30:13 -08001// 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 Arnold2cbb3852014-03-07 12:40:50 -08005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_
Alex Deymo2de23f52014-02-26 14:30:13 -08007
Alex Deymoc83baf62014-04-02 17:43:35 -07008#include "update_engine/policy_manager/device_policy_provider.h"
Alex Deymof9f12632014-04-17 13:51:26 -07009#include "update_engine/policy_manager/config_provider.h"
Alex Deymo2de23f52014-02-26 14:30:13 -080010#include "update_engine/policy_manager/random_provider.h"
11#include "update_engine/policy_manager/shill_provider.h"
Alex Deymobd04b142014-03-18 15:00:05 -070012#include "update_engine/policy_manager/system_provider.h"
Gilad Arnold78a78112014-03-13 14:58:06 -070013#include "update_engine/policy_manager/time_provider.h"
Gilad Arnoldae47a9a2014-03-26 12:16:47 -070014#include "update_engine/policy_manager/updater_provider.h"
Alex Deymo2de23f52014-02-26 14:30:13 -080015
16namespace 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.
20class State {
21 public:
22 virtual ~State() {}
23
Alex Deymo94c06162014-03-21 20:34:46 -070024 // These methods return the given provider.
David Zeuthen4e89e2c2014-04-24 11:47:00 -070025 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 Arnold78a78112014-03-13 14:58:06 -070035
Alex Deymo2de23f52014-02-26 14:30:13 -080036 private:
David Zeuthen4e89e2c2014-04-24 11:47:00 -070037 DISALLOW_COPY_AND_ASSIGN(State);
Alex Deymo2de23f52014-02-26 14:30:13 -080038};
39
40} // namespace chromeos_policy_manager
41
Gilad Arnold2cbb3852014-03-07 12:40:50 -080042#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_H_