| Index: delta_performer.h
|
| diff --git a/delta_performer.h b/delta_performer.h
|
| index 8a9914d4c77627f612c4ed00f0cb4c351feb2f23..c693333a1ddcd71842027457d1187a2fa2a19e91 100644
|
| --- a/delta_performer.h
|
| +++ b/delta_performer.h
|
| @@ -25,6 +25,12 @@ class PrefsInterface;
|
|
|
| class DeltaPerformer : public FileWriter {
|
| public:
|
| + enum MetadataParseResult {
|
| + kMetadataParseSuccess,
|
| + kMetadataParseError,
|
| + kMetadataParseInsufficientData,
|
| + };
|
| +
|
| DeltaPerformer(PrefsInterface* prefs)
|
| : prefs_(prefs),
|
| fd_(-1),
|
| @@ -100,6 +106,17 @@ class DeltaPerformer : public FileWriter {
|
| // success, false otherwise.
|
| static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
|
|
|
| + // Attempts to parse the update metadata starting from the beginning of
|
| + // |payload| into |manifest|. On success, sets |metadata_size| to the total
|
| + // metadata bytes (including the delta magic and metadata size fields), and
|
| + // returns kMetadataParseSuccess. Returns kMetadataParseInsufficientData if
|
| + // more data is needed to parse the complete metadata. Returns
|
| + // kMetadataParseError if the metadata can't be parsed given the payload.
|
| + static MetadataParseResult ParsePayloadMetadata(
|
| + const std::vector<char>& payload,
|
| + DeltaArchiveManifest* manifest,
|
| + uint64_t* metadata_size);
|
| +
|
| void set_current_kernel_hash(const std::vector<char>& hash) {
|
| current_kernel_hash_ = hash;
|
| }
|
|
|