New "properties" sub-command to export payload properties.
The new brillo_update_payload sub-command "properties" dumps a list of
properties for a given signed or unsigned payload. These properties are
normally included in the Omaha response, and extracted from python in
chromite.
This new sub-command helps to encapsulate the properties used by the
server side wehn serving a payload and to let the Android application
pass these required properties.
The properties include the payload and metadata hash and size.
Bug: 26991255
TEST=FEATURES=test emerge-link update_engine
TEST=mmma system/update_engine
TEST=`brillo_update_payload properties` for signed and unsigned payloads.
Change-Id: I4602ea4b8dc269e4cc66df4293ef9765d8dd031d
diff --git a/common/constants.h b/common/constants.h
index f20de8e..62f61ce 100644
--- a/common/constants.h
+++ b/common/constants.h
@@ -88,6 +88,12 @@
extern const char kPrefsUrlSwitchCount[];
extern const char kPrefsWallClockWaitPeriod[];
+// Keys used when storing and loading payload properties.
+extern const char kPayloadPropertyFileSize[];
+extern const char kPayloadPropertyFileHash[];
+extern const char kPayloadPropertyMetadataSize[];
+extern const char kPayloadPropertyMetadataHash[];
+
// A download source is any combination of protocol and server (that's of
// interest to us when looking at UMA metrics) using which we may download
// the payload.