Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: chromeos_update_engine.h

Issue 6648007: Libcros changes for issue_12743: Add async RequestUpdateCheck call. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cros.git@master
Patch Set: Used scoped_ptr in callback data. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos_update_engine.h
diff --git a/chromeos_update_engine.h b/chromeos_update_engine.h
index d2caea3935bff80773a9e01dd6e16e015e2deff6..5aa0c9af8bc550a29bd350d97844877b1ff64348 100644
--- a/chromeos_update_engine.h
+++ b/chromeos_update_engine.h
@@ -64,6 +64,17 @@ extern void (*DisconnectUpdateProgress)(UpdateStatusConnection connection);
extern bool (*RetrieveUpdateProgress)(UpdateProgress* information);
// Tell UpdateEngine daemon to check for an update. Returns true on success.
extern bool (*InitiateUpdateCheck)();
+// Asynchronously tell UpdateEngine daemon to check for an update.
+// If |callback| is non NULL, call with the result when the request completes.
+enum UpdateResult {
+ UPDATE_RESULT_SUCCESS,
+ UPDATE_RESULT_FAILED,
+ UPDATE_RESULT_DBUS_FAILED
+};
+typedef void (*UpdateCallback)(void* user_data,
+ UpdateResult result,
+ const char* error_msg);
+extern void (*RequestUpdateCheck)(UpdateCallback callback, void* user_data);
// Tell UpdateEngine daemon to reboot the system if an update has been
// downloaded and installed. Returns true on success.
extern bool (*RebootIfUpdated)();

Powered by Google App Engine
This is Rietveld 408576698