Split DBus client proxies into separated headers.
Each daemon we talk to should expose its own DBus library. This patch
splits the DBus proxies we generate from other daemon's .xml files into
separated header files so we can then replace them with libraries.
BUG=b:23084776
TEST=FEATURES=test emerge-link update_engine
Change-Id: Idbf1671eb7fc4259d493dbe2c8bcc8dad5b8784f
diff --git a/chrome_browser_proxy_resolver.h b/chrome_browser_proxy_resolver.h
index f9b1e29..558b95a 100644
--- a/chrome_browser_proxy_resolver.h
+++ b/chrome_browser_proxy_resolver.h
@@ -26,7 +26,6 @@
#include <chromeos/message_loops/message_loop.h>
-#include "update_engine/dbus_proxies.h"
#include "update_engine/libcros_proxy.h"
#include "update_engine/proxy_resolver.h"
diff --git a/chrome_browser_proxy_resolver_unittest.cc b/chrome_browser_proxy_resolver_unittest.cc
index 44d45e1..d0a9289 100644
--- a/chrome_browser_proxy_resolver_unittest.cc
+++ b/chrome_browser_proxy_resolver_unittest.cc
@@ -26,7 +26,8 @@
#include <chromeos/make_unique_ptr.h>
#include <chromeos/message_loops/fake_message_loop.h>
-#include "update_engine/dbus_mocks.h"
+#include "libcros/dbus-proxies.h"
+#include "libcros/dbus-proxy-mocks.h"
#include "update_engine/dbus_test_utils.h"
using ::testing::Return;
diff --git a/connection_manager.cc b/connection_manager.cc
index 6d9799d..2589a4a 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -24,6 +24,7 @@
#include <chromeos/dbus/service_constants.h>
#include <policy/device_policy.h>
+#include "shill/dbus-proxies.h"
#include "update_engine/prefs.h"
#include "update_engine/system_state.h"
#include "update_engine/utils.h"
diff --git a/connection_manager.h b/connection_manager.h
index 2f0fe6f..cb638b6 100644
--- a/connection_manager.h
+++ b/connection_manager.h
@@ -22,7 +22,6 @@
#include <base/macros.h>
#include "update_engine/connection_manager_interface.h"
-#include "update_engine/dbus_proxies.h"
#include "update_engine/shill_proxy_interface.h"
namespace chromeos_update_engine {
diff --git a/connection_manager_unittest.cc b/connection_manager_unittest.cc
index 400ee6a..b799e65 100644
--- a/connection_manager_unittest.cc
+++ b/connection_manager_unittest.cc
@@ -28,6 +28,8 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+#include "shill/dbus-proxies.h"
+#include "shill/dbus-proxy-mocks.h"
#include "update_engine/fake_shill_proxy.h"
#include "update_engine/fake_system_state.h"
#include "update_engine/test_utils.h"
diff --git a/fake_shill_proxy.cc b/fake_shill_proxy.cc
index 3979746..7513599 100644
--- a/fake_shill_proxy.cc
+++ b/fake_shill_proxy.cc
@@ -16,8 +16,6 @@
#include "update_engine/fake_shill_proxy.h"
-#include "update_engine/dbus_proxies.h"
-
using org::chromium::flimflam::ManagerProxyMock;
using org::chromium::flimflam::ServiceProxyInterface;
diff --git a/fake_shill_proxy.h b/fake_shill_proxy.h
index 90da075..4feb2b8 100644
--- a/fake_shill_proxy.h
+++ b/fake_shill_proxy.h
@@ -23,8 +23,8 @@
#include <base/macros.h>
-#include "update_engine/dbus_mocks.h"
-#include "update_engine/dbus_proxies.h"
+#include "shill/dbus-proxies.h"
+#include "shill/dbus-proxy-mocks.h"
#include "update_engine/shill_proxy_interface.h"
namespace chromeos_update_engine {
diff --git a/fake_system_state.h b/fake_system_state.h
index 3c7dfdb..59d25b6 100644
--- a/fake_system_state.h
+++ b/fake_system_state.h
@@ -22,8 +22,8 @@
#include <policy/mock_device_policy.h>
#include "metrics/metrics_library_mock.h"
-#include "update_engine/dbus_mocks.h"
-#include "update_engine/dbus_proxies.h"
+#include "power_manager/dbus-proxies.h"
+#include "power_manager/dbus-proxy-mocks.h"
#include "update_engine/fake_clock.h"
#include "update_engine/fake_hardware.h"
#include "update_engine/mock_connection_manager.h"
diff --git a/libcros_proxy.cc b/libcros_proxy.cc
index f4cf71c..689ed39 100644
--- a/libcros_proxy.cc
+++ b/libcros_proxy.cc
@@ -16,8 +16,6 @@
#include "update_engine/libcros_proxy.h"
-#include "update_engine/dbus_proxies.h"
-
using org::chromium::LibCrosServiceInterfaceProxy;
using org::chromium::LibCrosServiceInterfaceProxyInterface;
using org::chromium::UpdateEngineLibcrosProxyResolvedInterfaceProxy;
diff --git a/libcros_proxy.h b/libcros_proxy.h
index 5974c9c..afb5d54 100644
--- a/libcros_proxy.h
+++ b/libcros_proxy.h
@@ -22,7 +22,7 @@
#include <base/macros.h>
#include <dbus/bus.h>
-#include "update_engine/dbus_proxies.h"
+#include "libcros/dbus-proxies.h"
namespace chromeos_update_engine {
diff --git a/real_system_state.h b/real_system_state.h
index 533fa10..9eaa6cb 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -24,9 +24,11 @@
#include <metrics/metrics_library.h>
#include <policy/device_policy.h>
+#include "debugd/dbus-proxies.h"
+#include "login_manager/dbus-proxies.h"
+#include "power_manager/dbus-proxies.h"
#include "update_engine/clock.h"
#include "update_engine/connection_manager.h"
-#include "update_engine/dbus_proxies.h"
#include "update_engine/hardware.h"
#include "update_engine/p2p_manager.h"
#include "update_engine/payload_state.h"
diff --git a/shill_proxy.cc b/shill_proxy.cc
index 1c7301b..caa68b3 100644
--- a/shill_proxy.cc
+++ b/shill_proxy.cc
@@ -18,7 +18,6 @@
#include <chromeos/dbus/service_constants.h>
-#include "update_engine/dbus_proxies.h"
using org::chromium::flimflam::ManagerProxy;
using org::chromium::flimflam::ManagerProxyInterface;
diff --git a/shill_proxy.h b/shill_proxy.h
index d73dfff..3e62793 100644
--- a/shill_proxy.h
+++ b/shill_proxy.h
@@ -23,7 +23,7 @@
#include <base/macros.h>
#include <dbus/bus.h>
-#include "update_engine/dbus_proxies.h"
+#include "shill/dbus-proxies.h"
#include "update_engine/shill_proxy_interface.h"
namespace chromeos_update_engine {
diff --git a/shill_proxy_interface.h b/shill_proxy_interface.h
index fc3669f..5eb7701 100644
--- a/shill_proxy_interface.h
+++ b/shill_proxy_interface.h
@@ -22,7 +22,7 @@
#include <base/macros.h>
-#include "update_engine/dbus_proxies.h"
+#include "shill/dbus-proxies.h"
namespace chromeos_update_engine {
diff --git a/system_state.h b/system_state.h
index 8c26c51..4d4c74a 100644
--- a/system_state.h
+++ b/system_state.h
@@ -17,7 +17,7 @@
#ifndef UPDATE_ENGINE_SYSTEM_STATE_H_
#define UPDATE_ENGINE_SYSTEM_STATE_H_
-#include "update_engine/dbus_proxies.h"
+#include "power_manager/dbus-proxies.h"
class MetricsLibraryInterface;
diff --git a/update_attempter.cc b/update_attempter.cc
index 364abdd..cfa44bf 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -39,6 +39,7 @@
#include <policy/device_policy.h>
#include <policy/libpolicy.h>
+#include "power_manager/dbus-proxies.h"
#include "update_engine/certificate_checker.h"
#include "update_engine/clock_interface.h"
#include "update_engine/constants.h"
diff --git a/update_attempter.h b/update_attempter.h
index 9b0fad5..19b7b81 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -28,6 +28,7 @@
#include <base/time/time.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
+#include "debugd/dbus-proxies.h"
#include "update_engine/action_processor.h"
#include "update_engine/chrome_browser_proxy_resolver.h"
#include "update_engine/download_action.h"
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index d891400..a50c50a 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -32,6 +32,10 @@
#include <policy/libpolicy.h>
#include <policy/mock_device_policy.h>
+#include "debugd/dbus-proxies.h"
+#include "debugd/dbus-proxy-mocks.h"
+#include "libcros/dbus-proxies.h"
+#include "libcros/dbus-proxy-mocks.h"
#include "update_engine/fake_clock.h"
#include "update_engine/fake_prefs.h"
#include "update_engine/fake_system_state.h"
diff --git a/update_engine.gyp b/update_engine.gyp
index 7bc0ac0..f5ca7db 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -86,22 +86,61 @@
'includes': ['../common-mk/generate-dbus-adaptors.gypi'],
},
{
- 'target_name': 'update_engine-dbus-proxies',
+ 'target_name': 'update_engine-other-dbus-proxies',
'type': 'none',
'actions': [
{
- 'action_name': 'update_engine-dbus-proxies-action',
+ 'action_name': 'update_engine-dbus-shill-client',
'variables': {
- 'dbus_service_config': '',
- 'mock_output_file': 'include/update_engine/dbus_mocks.h',
- 'proxy_output_file': 'include/update_engine/dbus_proxies.h'
+ 'mock_output_file': 'include/shill/dbus-proxy-mocks.h',
+ 'proxy_output_file': 'include/shill/dbus-proxies.h'
+ },
+ 'sources': [
+ '../shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
+ '../shill/dbus_bindings/org.chromium.flimflam.Service.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ {
+ 'action_name': 'update_engine-dbus-debugd-client',
+ 'variables': {
+ 'mock_output_file': 'include/debugd/dbus-proxy-mocks.h',
+ 'proxy_output_file': 'include/debugd/dbus-proxies.h'
},
'sources': [
'../debugd/share/org.chromium.debugd.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ {
+ 'action_name': 'update_engine-dbus-login_manager-client',
+ 'variables': {
+ 'mock_output_file': 'include/login_manager/dbus-proxy-mocks.h',
+ 'proxy_output_file': 'include/login_manager/dbus-proxies.h'
+ },
+ 'sources': [
'../login_manager/org.chromium.SessionManagerInterface.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ {
+ 'action_name': 'update_engine-dbus-power_manager-client',
+ 'variables': {
+ 'mock_output_file': 'include/power_manager/dbus-proxy-mocks.h',
+ 'proxy_output_file': 'include/power_manager/dbus-proxies.h'
+ },
+ 'sources': [
'../power_manager/dbus_bindings/org.chromium.PowerManager.xml',
- '../shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
- '../shill/dbus_bindings/org.chromium.flimflam.Service.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ {
+ 'action_name': 'update_engine-dbus-libcros-client',
+ 'variables': {
+ 'mock_output_file': 'include/libcros/dbus-proxy-mocks.h',
+ 'proxy_output_file': 'include/libcros/dbus-proxies.h'
+ },
+ 'sources': [
'dbus_bindings/org.chromium.LibCrosService.xml',
],
'includes': ['../common-mk/generate-dbus-proxies.gypi'],
@@ -115,7 +154,7 @@
'dependencies': [
'update_metadata-protos',
'update_engine-dbus-adaptor',
- 'update_engine-dbus-proxies',
+ 'update_engine-other-dbus-proxies',
],
'variables': {
'exported_deps': [
diff --git a/update_manager/real_device_policy_provider.h b/update_manager/real_device_policy_provider.h
index 2952e5c..1553db3 100644
--- a/update_manager/real_device_policy_provider.h
+++ b/update_manager/real_device_policy_provider.h
@@ -24,7 +24,7 @@
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include <policy/libpolicy.h>
-#include "update_engine/dbus_proxies.h"
+#include "login_manager/dbus-proxies.h"
#include "update_engine/update_manager/device_policy_provider.h"
#include "update_engine/update_manager/generic_variables.h"
diff --git a/update_manager/real_device_policy_provider_unittest.cc b/update_manager/real_device_policy_provider_unittest.cc
index b49074f..bd59589 100644
--- a/update_manager/real_device_policy_provider_unittest.cc
+++ b/update_manager/real_device_policy_provider_unittest.cc
@@ -27,7 +27,8 @@
#include <policy/mock_device_policy.h>
#include <policy/mock_libpolicy.h>
-#include "update_engine/dbus_mocks.h"
+#include "login_manager/dbus-proxies.h"
+#include "login_manager/dbus-proxy-mocks.h"
#include "update_engine/dbus_test_utils.h"
#include "update_engine/test_utils.h"
#include "update_engine/update_manager/umtest_utils.h"
diff --git a/update_manager/real_shill_provider.cc b/update_manager/real_shill_provider.cc
index ab4900d..065eac3 100644
--- a/update_manager/real_shill_provider.cc
+++ b/update_manager/real_shill_provider.cc
@@ -22,6 +22,8 @@
#include <base/strings/stringprintf.h>
#include <chromeos/dbus/service_constants.h>
+#include "shill/dbus-proxies.h"
+
using org::chromium::flimflam::ManagerProxyInterface;
using org::chromium::flimflam::ServiceProxyInterface;
using std::string;
diff --git a/update_manager/real_shill_provider.h b/update_manager/real_shill_provider.h
index 6df5568..2184ac2 100644
--- a/update_manager/real_shill_provider.h
+++ b/update_manager/real_shill_provider.h
@@ -26,7 +26,6 @@
#include <base/time/time.h>
#include "update_engine/clock_interface.h"
-#include "update_engine/dbus_proxies.h"
#include "update_engine/shill_proxy_interface.h"
#include "update_engine/update_manager/generic_variables.h"
#include "update_engine/update_manager/shill_provider.h"
diff --git a/update_manager/real_shill_provider_unittest.cc b/update_manager/real_shill_provider_unittest.cc
index 2c493e1..4ba2708 100644
--- a/update_manager/real_shill_provider_unittest.cc
+++ b/update_manager/real_shill_provider_unittest.cc
@@ -25,8 +25,8 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include "update_engine/dbus_mocks.h"
-#include "update_engine/dbus_proxies.h"
+#include "shill/dbus-proxies.h"
+#include "shill/dbus-proxy-mocks.h"
#include "update_engine/dbus_test_utils.h"
#include "update_engine/fake_clock.h"
#include "update_engine/fake_shill_proxy.h"
diff --git a/update_manager/state_factory.h b/update_manager/state_factory.h
index caf38e3..e39a74d 100644
--- a/update_manager/state_factory.h
+++ b/update_manager/state_factory.h
@@ -17,7 +17,7 @@
#ifndef UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
#define UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
-#include "update_engine/dbus_proxies.h"
+#include "login_manager/dbus-proxies.h"
#include "update_engine/shill_proxy.h"
#include "update_engine/system_state.h"
#include "update_engine/update_manager/state.h"