Introduce brillo binder interface
This is more or less an exact analogue of the DBus interface, but
available over binder. We also add support to the client library and let
update_engine_client build with binder. We don't yet support an
equivalent of the status signal/the HandleStatusUpdate method. That will
come in a future CL.
Bug: 25908638
TEST=Verified update_engine_client functionality
Change-Id: Ic793619c8019b0d50aa184e0f592b6a9ab71e0b0
diff --git a/dbus_service.h b/dbus_service.h
index 88bd90a..eb05a11 100644
--- a/dbus_service.h
+++ b/dbus_service.h
@@ -24,17 +24,18 @@
#include <base/memory/ref_counted.h>
#include <brillo/errors/error.h>
+#include "update_engine/common_service.h"
#include "update_engine/update_attempter.h"
#include "dbus_bindings/org.chromium.UpdateEngineInterface.h"
namespace chromeos_update_engine {
-class UpdateEngineService
+class DBusUpdateEngineService
: public org::chromium::UpdateEngineInterfaceInterface {
public:
- explicit UpdateEngineService(SystemState* system_state);
- virtual ~UpdateEngineService() = default;
+ explicit DBusUpdateEngineService(SystemState* system_state);
+ virtual ~DBusUpdateEngineService() = default;
// Implementation of org::chromium::UpdateEngineInterfaceInterface.
bool AttemptUpdate(brillo::ErrorPtr* error,
@@ -128,7 +129,7 @@
std::string* out_rollback_partition_name) override;
private:
- SystemState* system_state_;
+ std::unique_ptr<UpdateEngineService> common_;
};
// The UpdateEngineAdaptor class runs the UpdateEngineInterface in the fixed
@@ -151,7 +152,7 @@
private:
scoped_refptr<dbus::Bus> bus_;
- UpdateEngineService dbus_service_;
+ DBusUpdateEngineService dbus_service_;
brillo::dbus_utils::DBusObject dbus_object_;
};