blob: fa1164c53fdf29e9c965cf2471c37c26affe6c9a [file] [log] [blame]
Alex Deymo94c06162014-03-21 20:34:46 -07001// 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 Arnold48415f12014-06-27 07:10:58 -07005#ifndef UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
6#define UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
Alex Deymo94c06162014-03-21 20:34:46 -07007
Gilad Arnold1f847232014-04-07 12:07:49 -07008#include "update_engine/dbus_wrapper_interface.h"
Gilad Arnoldae47a9a2014-03-26 12:16:47 -07009#include "update_engine/system_state.h"
Alex Deymo63784a52014-05-28 10:46:14 -070010#include "update_engine/update_manager/state.h"
Alex Deymo94c06162014-03-21 20:34:46 -070011
Alex Deymo63784a52014-05-28 10:46:14 -070012namespace chromeos_update_manager {
Alex Deymo94c06162014-03-21 20:34:46 -070013
Alex Deymo63784a52014-05-28 10:46:14 -070014// Creates and initializes a new UpdateManager State instance containing real
Gilad Arnoldae47a9a2014-03-26 12:16:47 -070015// providers instantiated using the passed interfaces. The State doesn't take
16// ownership of the passed interfaces, which need to remain available during the
17// life of this instance. Returns null if one of the underlying providers fails
18// to initialize.
Alex Deymoc83baf62014-04-02 17:43:35 -070019State* DefaultStateFactory(
20 policy::PolicyProvider* policy_provider,
21 chromeos_update_engine::DBusWrapperInterface* dbus,
22 chromeos_update_engine::SystemState* system_state);
Alex Deymo94c06162014-03-21 20:34:46 -070023
Alex Deymo63784a52014-05-28 10:46:14 -070024} // namespace chromeos_update_manager
Alex Deymo94c06162014-03-21 20:34:46 -070025
Gilad Arnold48415f12014-06-27 07:10:58 -070026#endif // UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_