dbus: perform D-Bus initialization in DBusControl
This moves the RPC specific initialization out of the Daemon class,
which makes it agnostic of the underlying RPC implementation.
Also move the ownership of Manager from Daemon to the ControlInterface
implementation. So the ControlInterface is now responsible for
creating Manager and exposing it through the underlying RPC interface.
This makes it easier to maintain the relevant objects (e.g. Manager,
ObjectManager), and avoids possible confusion during cleanup.
Bug: 25654681
TEST=Verify device setup works on Brillo device
Change-Id: Id2eb8d08346841e294f8286fe191708caa2cbc24
diff --git a/control_interface.h b/control_interface.h
index e5bbfd0..4661eca 100644
--- a/control_interface.h
+++ b/control_interface.h
@@ -31,6 +31,9 @@
public:
virtual ~ControlInterface() {}
+ virtual void Init() = 0;
+ virtual void Shutdown() = 0;
+
// Proxy creation APIs.
virtual std::unique_ptr<FirewallProxyInterface> CreateFirewallProxy(
const base::Closure& service_appeared_callback,