Support a range of major and minor version.
In DeltaPerformer we set a supported major and minor version and only
accept that perticular version, but in reality we still support older
versions to test backward comatibility.
This CL change the supported major and minor version to a range to
reflect the truth of which version is supported and moved them to
payload_constants.
This is also useful when we have multi payload and want to reuse old
payload for non system partition while updating the system partition
to use a higher minor version.
Bug: 36289531
Test: update_engine_unittests
Change-Id: I49d73d69e64d78dfc2db21446faa98b3579ff995
Merged-In: I49d73d69e64d78dfc2db21446faa98b3579ff995
diff --git a/payload_consumer/payload_constants.h b/payload_consumer/payload_constants.h
index ac3e882..43c3137 100644
--- a/payload_consumer/payload_constants.h
+++ b/payload_consumer/payload_constants.h
@@ -31,6 +31,10 @@
// The major version used by Brillo.
extern const uint64_t kBrilloMajorPayloadVersion;
+// The minimum and maximum supported major version.
+extern const uint64_t kMinSupportedMajorPayloadVersion;
+extern const uint64_t kMaxSupportedMajorPayloadVersion;
+
// The minor version used for all full payloads.
extern const uint32_t kFullPayloadMinorVersion;
@@ -49,6 +53,10 @@
// The minor version that allows PUFFDIFF operation.
extern const uint32_t kPuffdiffMinorPayloadVersion;
+// The minimum and maximum supported minor version.
+extern const uint32_t kMinSupportedMinorPayloadVersion;
+extern const uint32_t kMaxSupportedMinorPayloadVersion;
+
// The maximum size of the payload header (anything before the protobuf).
extern const uint64_t kMaxPayloadHeaderSize;