aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-05-01 14:23:17 -0500
committerTao Bao2017-05-01 14:31:48 -0500
commit29ee69bf27cc7ad7ef7e604684110b3f562ed42d (patch)
treef14f4f41f5e9f7016f5895a3f7e3d25d7fe1abd0 /install.h
parent54da1122776f38ae365f61bb0ea190b456b2fa62 (diff)
downloadplatform-bootable-recovery-29ee69bf27cc7ad7ef7e604684110b3f562ed42d.tar.gz
platform-bootable-recovery-29ee69bf27cc7ad7ef7e604684110b3f562ed42d.tar.xz
platform-bootable-recovery-29ee69bf27cc7ad7ef7e604684110b3f562ed42d.zip
recovery: Change install_package() to take std::string.
Also change the parameter type for log_buffer from reference to pointer, so the styles for parameters look consistent. Test: mmma bootable/recovery Test: sideload a package with the new recovery image Change-Id: I8f25580ccf22977624648b3e2181cca44dd67c1b
Diffstat (limited to 'install.h')
-rw-r--r--install.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/install.h b/install.h
index 68f0a8d4..f3fda305 100644
--- a/install.h
+++ b/install.h
@@ -23,10 +23,9 @@
23enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED, 23enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED,
24 INSTALL_RETRY }; 24 INSTALL_RETRY };
25 25
26// Install the package specified by root_path. If INSTALL_SUCCESS is 26// Installs the given update package. If INSTALL_SUCCESS is returned and *wipe_cache is true on
27// returned and *wipe_cache is true on exit, caller should wipe the 27// exit, caller should wipe the cache partition.
28// cache partition. 28int install_package(const std::string& package, bool* wipe_cache, const std::string& install_file,
29int install_package(const char* root_path, bool* wipe_cache, const char* install_file,
30 bool needs_mount, int retry_count); 29 bool needs_mount, int retry_count);
31 30
32// Verify the package by ota keys. Return true if the package is verified successfully, 31// Verify the package by ota keys. Return true if the package is verified successfully,
@@ -35,9 +34,9 @@ bool verify_package(const unsigned char* package_data, size_t package_size);
35 34
36// Read meta data file of the package, write its content in the string pointed by meta_data. 35// Read meta data file of the package, write its content in the string pointed by meta_data.
37// Return true if succeed, otherwise return false. 36// Return true if succeed, otherwise return false.
38bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data); 37bool read_metadata_from_package(ZipArchiveHandle zip, std::string* metadata);
39 38
40// Verifes the compatibility info in a Treble-compatible package. Returns true directly if the 39// Verifies the compatibility info in a Treble-compatible package. Returns true directly if the
41// entry doesn't exist. 40// entry doesn't exist.
42bool verify_package_compatibility(ZipArchiveHandle package_zip); 41bool verify_package_compatibility(ZipArchiveHandle package_zip);
43 42