Implement update_engine weave commands
The new WeaveServiceInterface abstracs the registration and interaction
with weave whenever present. The compilation and usage of weave is
based on the BRILLO_USE_WEAVE flag.
When enabled, update_engine registers the "_updater" component with
methods to force-check for an update and change channels.
Bug: 24386758
Bug: 24386768
Test: Deployed on edison, weave commands and state available online.
Change-Id: Ic49111772e123b8a2b1971da92fe65785f186ccd
diff --git a/system_state.h b/system_state.h
index 2ba0272..7923217 100644
--- a/system_state.h
+++ b/system_state.h
@@ -51,6 +51,7 @@
class PayloadStateInterface;
class PrefsInterface;
class UpdateAttempter;
+class WeaveServiceInterface;
// An interface to global system context, including platform resources,
// the current state of the system, high-level objects whose lifetime is same
@@ -98,6 +99,9 @@
// Returns a pointer to the update attempter object.
virtual UpdateAttempter* update_attempter() = 0;
+ // Returns a pointer to the WeaveServiceInterface class or nullptr if none.
+ virtual WeaveServiceInterface* weave_service() = 0;
+
// Returns a pointer to the object that stores the parameters that are
// common to all Omaha requests.
virtual OmahaRequestParams* request_params() = 0;