update_engine: New BootControlInterface class.
The new BootControlInterface class is a platform-independent
abstraction to control the bootloader. It provides methods for setting
what partition slots are available for booting and getting the
bootloader status about the available slots.
The Chrome OS specific implementation of the bootloader was moved to
the BootControlChromeOS which now depends on the vboot_host
implementation used in Chrome OS. Follow up CL will implement the
equivalent class for Brillo.
BUG=b:23010637
TEST=unittests; cros flash from the new image and rolled back from it.
Change-Id: I0a03aeeb8c21d8c99e1866b625e6e8c96628215b
diff --git a/system_state.h b/system_state.h
index 4d4c74a..0190ee2 100644
--- a/system_state.h
+++ b/system_state.h
@@ -38,6 +38,7 @@
// SystemState is the root class within the update engine. So we should avoid
// any circular references in header file inclusion. Hence forward-declaring
// the required classes.
+class BootControlInterface;
class ClockInterface;
class ConnectionManagerInterface;
class HardwareInterface;
@@ -63,6 +64,9 @@
virtual void set_device_policy(const policy::DevicePolicy* device_policy) = 0;
virtual const policy::DevicePolicy* device_policy() = 0;
+ // Gets the interface object for the bootloader control interface.
+ virtual BootControlInterface* boot_control() = 0;
+
// Gets the interface object for the clock.
virtual ClockInterface* clock() = 0;