shill: Start assigning service state

Service state is usually controlled by the associated Device.  Devices
select a single Service to reflect current connection state.  All other
Services remain in an idle or whatever Failure state they ended up with
at the end of their last attempt.

When Service state changes, the service notifies the Manager of its new
state.  This will be used by the Manager to update service priority and
selection of default routes.

For unit-tests, add a "State" test for service_unittest which which
tests for state changes and up-calls to the Manager.  Add
"SelectedDevice" test to device_unittest to ensure proper down-calls
to the service.

BUG=chromium-os:19523
TEST=New unit tests

Change-Id: Ic253cc1dd77821a74176346521aff5948ad59660
Reviewed-on: http://gerrit.chromium.org/gerrit/6495
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 files changed
tree: 5a5dde13641adfa0bc13f87ee189b040fa922348
  1. dbus_bindings/
  2. accessor_interface.h
  3. adaptor_interfaces.h
  4. byte_string.cc
  5. byte_string.h
  6. byte_string_unittest.cc
  7. cellular.cc
  8. cellular.h
  9. cellular_service.cc
  10. cellular_service.h
  11. cellular_unittest.cc
  12. connection.cc
  13. connection.h
  14. connection_unittest.cc
  15. control_interface.h
  16. crypto_des_cbc.cc
  17. crypto_des_cbc.h
  18. crypto_des_cbc_unittest.cc
  19. crypto_interface.h
  20. crypto_provider.cc
  21. crypto_provider.h
  22. crypto_provider_unittest.cc
  23. crypto_rot47.cc
  24. crypto_rot47.h
  25. crypto_rot47_unittest.cc
  26. dbus_adaptor.cc
  27. dbus_adaptor.h
  28. dbus_adaptor_unittest.cc
  29. dbus_control.cc
  30. dbus_control.h
  31. dbus_properties.cc
  32. dbus_properties.h
  33. dbus_properties_proxy.cc
  34. dbus_properties_proxy.h
  35. dbus_properties_proxy_interface.h
  36. dbus_properties_unittest.cc
  37. default_profile.cc
  38. default_profile.h
  39. default_profile_unittest.cc
  40. device.cc
  41. device.h
  42. device_dbus_adaptor.cc
  43. device_dbus_adaptor.h
  44. device_info.cc
  45. device_info.h
  46. device_info_unittest.cc
  47. device_stub.h
  48. device_unittest.cc
  49. dhcp_config.cc
  50. dhcp_config.h
  51. dhcp_config_unittest.cc
  52. dhcp_provider.cc
  53. dhcp_provider.h
  54. dhcp_provider_unittest.cc
  55. dhcp_proxy_interface.h
  56. dhcpcd_proxy.cc
  57. dhcpcd_proxy.h
  58. endpoint.cc
  59. endpoint.h
  60. ephemeral_profile.cc
  61. ephemeral_profile.h
  62. error.cc
  63. error.h
  64. error_unittest.cc
  65. ethernet.cc
  66. ethernet.h
  67. ethernet_service.cc
  68. ethernet_service.h
  69. glib.cc
  70. glib.h
  71. glib_io_handler.cc
  72. glib_io_handler.h
  73. HACKING
  74. io_handler.h
  75. ip_address.cc
  76. ip_address.h
  77. ip_address_unittest.cc
  78. ipconfig.cc
  79. ipconfig.h
  80. ipconfig_dbus_adaptor.cc
  81. ipconfig_dbus_adaptor.h
  82. ipconfig_unittest.cc
  83. key_file_store.cc
  84. key_file_store.h
  85. key_file_store_unittest.cc
  86. LICENSE
  87. Makefile
  88. manager.cc
  89. manager.h
  90. manager_dbus_adaptor.cc
  91. manager_dbus_adaptor.h
  92. manager_unittest.cc
  93. mock_adaptors.cc
  94. mock_adaptors.h
  95. mock_control.cc
  96. mock_control.h
  97. mock_dbus_properties_proxy.h
  98. mock_device.cc
  99. mock_device.h
  100. mock_device_info.h
  101. mock_dhcp_config.h
  102. mock_dhcp_provider.h
  103. mock_dhcp_proxy.h
  104. mock_glib.h
  105. mock_ipconfig.h
  106. mock_manager.h
  107. mock_modem_cdma_proxy.h
  108. mock_modem_manager_proxy.h
  109. mock_modem_proxy.h
  110. mock_modem_simple_proxy.h
  111. mock_profile.cc
  112. mock_profile.h
  113. mock_property_store.h
  114. mock_resolver.h
  115. mock_routing_table.h
  116. mock_rtnl_handler.h
  117. mock_service.cc
  118. mock_service.h
  119. mock_sockets.h
  120. mock_store.h
  121. mock_supplicant_interface_proxy.h
  122. mock_supplicant_process_proxy.h
  123. modem.cc
  124. modem.h
  125. modem_cdma_proxy.cc
  126. modem_cdma_proxy.h
  127. modem_cdma_proxy_interface.h
  128. modem_info.cc
  129. modem_info.h
  130. modem_info_unittest.cc
  131. modem_manager.cc
  132. modem_manager.h
  133. modem_manager_proxy.cc
  134. modem_manager_proxy.h
  135. modem_manager_proxy_interface.h
  136. modem_manager_unittest.cc
  137. modem_proxy.cc
  138. modem_proxy.h
  139. modem_proxy_interface.h
  140. modem_simple_proxy.cc
  141. modem_simple_proxy.h
  142. modem_simple_proxy_interface.h
  143. modem_unittest.cc
  144. nice_mock_control.cc
  145. nice_mock_control.h
  146. profile.cc
  147. profile.h
  148. profile_dbus_adaptor.cc
  149. profile_dbus_adaptor.h
  150. profile_unittest.cc
  151. property_accessor.h
  152. property_accessor_unittest.cc
  153. property_iterator.h
  154. property_store.cc
  155. property_store.h
  156. property_store_unittest.cc
  157. property_store_unittest.h
  158. proxy_factory.cc
  159. proxy_factory.h
  160. refptr_types.h
  161. resolver.cc
  162. resolver.h
  163. resolver_unittest.cc
  164. routing_table.cc
  165. routing_table.h
  166. routing_table_entry.h
  167. routing_table_unittest.cc
  168. rtnl_handler.cc
  169. rtnl_handler.h
  170. rtnl_handler_unittest.cc
  171. rtnl_listener.cc
  172. rtnl_listener.h
  173. rtnl_listener_unittest.cc
  174. rtnl_message.cc
  175. rtnl_message.h
  176. rtnl_message_unittest.cc
  177. service.cc
  178. service.h
  179. service_dbus_adaptor.cc
  180. service_dbus_adaptor.h
  181. service_unittest.cc
  182. shill.conf
  183. shill_config.cc
  184. shill_config.h
  185. shill_daemon.cc
  186. shill_daemon.h
  187. shill_event.cc
  188. shill_event.h
  189. shill_main.cc
  190. shill_unittest.cc
  191. sockets.cc
  192. sockets.h
  193. store_interface.h
  194. supplicant_interface_proxy.cc
  195. supplicant_interface_proxy.h
  196. supplicant_interface_proxy_interface.h
  197. supplicant_process_proxy.cc
  198. supplicant_process_proxy.h
  199. supplicant_process_proxy_interface.h
  200. testrunner.cc
  201. wifi.cc
  202. wifi.h
  203. wifi_endpoint.cc
  204. wifi_endpoint.h
  205. wifi_service.cc
  206. wifi_service.h
  207. wifi_service_unittest.cc
  208. wifi_unittest.cc