diff options
author | Aaron Wood <aaronwood@google.com> | 2017-08-28 14:51:21 -0700 |
---|---|---|
committer | Sen Jiang <senj@google.com> | 2017-09-19 18:08:34 -0700 |
commit | 7f92e2b7060cb35719acf96ef96a4e273e165bc5 (patch) | |
tree | 5d3c045386b04d8ed96cba1041a9e105713ef2c8 /client_library/include | |
parent | b1e063a383115ae2bbc62cbd64047c913724921c (diff) | |
download | android_system_update_engine-7f92e2b7060cb35719acf96ef96a4e273e165bc5.tar.gz android_system_update_engine-7f92e2b7060cb35719acf96ef96a4e273e165bc5.tar.bz2 android_system_update_engine-7f92e2b7060cb35719acf96ef96a4e273e165bc5.zip |
Update API: initial support
Initial pieces of the Update API callback framework.
- move the status callback params to a new object, UpdateEngineStatus to
allow for the easier addition of new params in the future.
- switch the IUpdateEngineStatusCallback to provide a
ParcelableUpdateEngineStatus instead of a series of individual params
- move the various GetStatus() methods to use the UpdateEngineStatus
object instead of a series of params (which will need future expansion)
- Add current and new product/os versions to both the UpdateEngineStatus
and the ParcelableUpdateEngineStatus.
Bug: 64808702
Test: unit tests, and performing OTAs via a test app calling
IUpdateEngine::AttemptUpdate() via UpdateManager::performUpdateNow()
Change-Id: I53f66f3511049f0809855814e1e758023cd8cc08
(cherry picked from commit 4f96ebf85022837603f2e10100a044d234b7d86f)
Diffstat (limited to 'client_library/include')
-rw-r--r-- | client_library/include/update_engine/update_status.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/client_library/include/update_engine/update_status.h b/client_library/include/update_engine/update_status.h index 3e9af5b6..76dd8654 100644 --- a/client_library/include/update_engine/update_status.h +++ b/client_library/include/update_engine/update_status.h @@ -17,6 +17,8 @@ #ifndef UPDATE_ENGINE_CLIENT_LIBRARY_INCLUDE_UPDATE_ENGINE_UPDATE_STATUS_H_ #define UPDATE_ENGINE_CLIENT_LIBRARY_INCLUDE_UPDATE_ENGINE_UPDATE_STATUS_H_ +#include <string> + namespace update_engine { enum class UpdateStatus { @@ -32,6 +34,25 @@ enum class UpdateStatus { DISABLED, }; +struct UpdateEngineStatus { + // When the update_engine last checked for updates (ms since Epoch) + int64_t last_checked_time_ms; + // the current status/operation of the update_engine + UpdateStatus status; + // the current product version (oem bundle id) + std::string current_version; + // the current system version + std::string current_system_version; + // The current progress (0.0f-1.0f). + double progress; + // the size of the update (bytes) + uint64_t new_size_bytes; + // the new product version + std::string new_version; + // the new system version, if there is one (empty, otherwise) + std::string new_system_version; +}; + } // namespace update_engine #endif // UPDATE_ENGINE_CLIENT_LIBRARY_INCLUDE_UPDATE_ENGINE_UPDATE_STATUS_H_ |