summaryrefslogtreecommitdiffstats
path: root/applypatch/include
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-11-01 22:25:12 +0100
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-11-01 22:25:12 +0100
commit3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a (patch)
treecf2bdcc9774bb7199847c5f26a3cc369a68d5f6d /applypatch/include
parentMerge "Revert "Some cleanups to recovery."" (diff)
parentapplypatch: Switch the parameter of Value** to std::vector. (diff)
downloadandroid_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar.gz
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar.bz2
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar.lz
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar.xz
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.tar.zst
android_bootable_recovery-3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a.zip
Diffstat (limited to 'applypatch/include')
-rw-r--r--applypatch/include/applypatch/applypatch.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/applypatch/include/applypatch/applypatch.h b/applypatch/include/applypatch/applypatch.h
index 80d681638..ca3dafbc9 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -20,10 +20,12 @@
#include <stdint.h>
#include <sys/stat.h>
+#include <memory>
#include <string>
#include <vector>
-#include "openssl/sha.h"
+#include <openssl/sha.h>
+
#include "edify/expr.h"
struct FileContents {
@@ -41,27 +43,26 @@ struct FileContents {
typedef ssize_t (*SinkFn)(const unsigned char*, ssize_t, void*);
-// applypatch.c
+// applypatch.cpp
int ShowLicenses();
size_t FreeSpaceForFile(const char* filename);
int CacheSizeCheck(size_t bytes);
int ParseSha1(const char* str, uint8_t* digest);
-int applypatch_flash(const char* source_filename, const char* target_filename,
- const char* target_sha1_str, size_t target_size);
int applypatch(const char* source_filename,
const char* target_filename,
const char* target_sha1_str,
size_t target_size,
const std::vector<std::string>& patch_sha1_str,
- Value** patch_data,
- Value* bonus_data);
+ const std::vector<std::unique_ptr<Value>>& patch_data,
+ const Value* bonus_data);
int applypatch_check(const char* filename,
const std::vector<std::string>& patch_sha1_str);
+int applypatch_flash(const char* source_filename, const char* target_filename,
+ const char* target_sha1_str, size_t target_size);
int LoadFileContents(const char* filename, FileContents* file);
int SaveFileContents(const char* filename, const FileContents* file);
-void FreeFileContents(FileContents* file);
int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str);
// bsdiff.cpp