Remove D-Bus dependency from Service

Here are the main changes:
1. Update service to use ServiceAdaptorInterface instead of using
   D-Bus adaptor directly.
2. Update D-Bus object registration for Service and Config to be
   synchronous, to remove unnecessary complexity. This also
   eliminates the need for Manager::CreateService handler to be
   asynchronous.
3. Update Service APIs to use the internal Error instead of brillo::Error.
4. Use MockServiceAdaptor for testing, fake version is not needed
   since the adaptor properties for Service are not being used in test.

Bug: 24194427
TEST=Start AP service on both Brillo and Chrome OS devices
TEST=Run unittests on both Brillo and Chrome OS

Change-Id: Ib94a4b91ef402415470e0131afdeeef5105817e4
13 files changed
tree: 4b52276abb3cb19ffa29f57176e235541e0a43be
  1. Android.mk
  2. MODULE_LICENSE_APACHE2
  3. NOTICE
  4. OWNERS
  5. PRESUBMIT.cfg
  6. apmanager.gyp
  7. apmanager.rc
  8. config.cc
  9. config.h
  10. config_adaptor_interface.h
  11. config_unittest.cc
  12. control_interface.h
  13. daemon.cc
  14. daemon.h
  15. dbus/
  16. dbus_bindings/
  17. dbus_permissions/
  18. device.cc
  19. device.h
  20. device_adaptor_interface.h
  21. device_info.cc
  22. device_info.h
  23. device_info_unittest.cc
  24. device_unittest.cc
  25. dhcp_server.cc
  26. dhcp_server.h
  27. dhcp_server_factory.cc
  28. dhcp_server_factory.h
  29. dhcp_server_unittest.cc
  30. error.cc
  31. error.h
  32. error_unittest.cc
  33. event_dispatcher.cc
  34. event_dispatcher.h
  35. fake_config_adaptor.cc
  36. fake_config_adaptor.h
  37. fake_device_adaptor.cc
  38. fake_device_adaptor.h
  39. file_writer.cc
  40. file_writer.h
  41. firewall_manager.cc
  42. firewall_manager.h
  43. firewall_proxy_interface.h
  44. hostapd_monitor.cc
  45. hostapd_monitor.h
  46. hostapd_monitor_unittest.cc
  47. init/
  48. libapmanager-client-test.pc.in
  49. libapmanager-client.pc.in
  50. main.cc
  51. manager.cc
  52. manager.h
  53. manager_unittest.cc
  54. mock_config.cc
  55. mock_config.h
  56. mock_control.cc
  57. mock_control.h
  58. mock_device.cc
  59. mock_device.h
  60. mock_dhcp_server.cc
  61. mock_dhcp_server.h
  62. mock_dhcp_server_factory.cc
  63. mock_dhcp_server_factory.h
  64. mock_event_dispatcher.cc
  65. mock_event_dispatcher.h
  66. mock_file_writer.cc
  67. mock_file_writer.h
  68. mock_hostapd_monitor.cc
  69. mock_hostapd_monitor.h
  70. mock_manager.cc
  71. mock_manager.h
  72. mock_process_factory.cc
  73. mock_process_factory.h
  74. mock_service.cc
  75. mock_service.h
  76. mock_service_adaptor.cc
  77. mock_service_adaptor.h
  78. process_factory.cc
  79. process_factory.h
  80. rpc_interface.h
  81. run_all_tests.cc
  82. service.cc
  83. service.h
  84. service_adaptor_interface.h
  85. service_unittest.cc
  86. shill_manager.cc
  87. shill_manager.h
  88. shill_proxy_interface.h
  89. shill_stub_proxy.cc
  90. shill_stub_proxy.h
  91. testrunner.cc