AU: Provide a reboot_if_needed D-Bus API.
This will reboot if the current state is UPDATED_REBOOT_NEEDED.
Also add -reboot option to the update_engine_client.
BUG=4250
TEST=unit tests,gmerged on device and tried reboot requests
Review URL: http://codereview.chromium.org/3034026
diff --git a/dbus_service.h b/dbus_service.h
index 4b760ce..12c9ed1 100644
--- a/dbus_service.h
+++ b/dbus_service.h
@@ -46,6 +46,14 @@
// Methods
+gboolean update_engine_service_attempt_update(UpdateEngineService* self,
+ gchar* app_version,
+ gchar* omaha_url,
+ GError **error);
+
+gboolean update_engine_service_check_for_update(UpdateEngineService* self,
+ GError **error);
+
gboolean update_engine_service_get_status(UpdateEngineService* self,
int64_t* last_checked_time,
double* progress,
@@ -54,14 +62,9 @@
int64_t* new_size,
GError **error);
-gboolean update_engine_service_check_for_update(UpdateEngineService* self,
+gboolean update_engine_service_reboot_if_needed(UpdateEngineService* self,
GError **error);
-gboolean update_engine_service_attempt_update(UpdateEngineService* self,
- gchar* app_version,
- gchar* omaha_url,
- GError **error);
-
gboolean update_engine_service_emit_status_update(
UpdateEngineService* self,
gint64 last_checked_time,