| Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2014 The Android Open Source Project | 
|  | 3 | // | 
|  | 4 | // Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | // you may not use this file except in compliance with the License. | 
|  | 6 | // You may obtain a copy of the License at | 
|  | 7 | // | 
|  | 8 | //      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | // | 
|  | 10 | // Unless required by applicable law or agreed to in writing, software | 
|  | 11 | // distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | // See the License for the specific language governing permissions and | 
|  | 14 | // limitations under the License. | 
|  | 15 | // | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 16 |  | 
| Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 17 | #ifndef UPDATE_ENGINE_PAYLOAD_CONSUMER_PAYLOAD_CONSTANTS_H_ | 
|  | 18 | #define UPDATE_ENGINE_PAYLOAD_CONSUMER_PAYLOAD_CONSTANTS_H_ | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 19 |  | 
| Ben Chan | 05735a1 | 2014-09-03 07:48:22 -0700 | [diff] [blame] | 20 | #include <stdint.h> | 
|  | 21 |  | 
|  | 22 | #include <limits> | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 23 |  | 
| Alex Deymo | 2d621a3 | 2015-10-01 11:09:01 -0700 | [diff] [blame] | 24 | #include "update_engine/update_metadata.pb.h" | 
|  | 25 |  | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 26 | namespace chromeos_update_engine { | 
|  | 27 |  | 
| Alex Deymo | cbf0989 | 2015-09-11 16:13:16 -0700 | [diff] [blame] | 28 | // The major version used by Chrome OS. | 
|  | 29 | extern const uint64_t kChromeOSMajorPayloadVersion; | 
|  | 30 |  | 
|  | 31 | // The major version used by Brillo. | 
|  | 32 | extern const uint64_t kBrilloMajorPayloadVersion; | 
|  | 33 |  | 
|  | 34 | // The minor version used for all full payloads. | 
|  | 35 | extern const uint32_t kFullPayloadMinorVersion; | 
|  | 36 |  | 
|  | 37 | // The minor version used by the in-place delta generator algorithm. | 
|  | 38 | extern const uint32_t kInPlaceMinorPayloadVersion; | 
|  | 39 |  | 
|  | 40 | // The minor version used by the A to B delta generator algorithm. | 
|  | 41 | extern const uint32_t kSourceMinorPayloadVersion; | 
|  | 42 |  | 
| Sen Jiang | 82352f9 | 2015-11-09 16:36:53 -0800 | [diff] [blame] | 43 | // The minor version that allows per-operation source hash. | 
|  | 44 | extern const uint32_t kOpSrcHashMinorPayloadVersion; | 
|  | 45 |  | 
| Sen Jiang | 55c4f9b | 2016-02-10 11:26:20 -0800 | [diff] [blame] | 46 | // The minor version that allows IMGDIFF operation. | 
|  | 47 | extern const uint32_t kImgdiffMinorPayloadVersion; | 
|  | 48 |  | 
| Alex Deymo | cbf0989 | 2015-09-11 16:13:16 -0700 | [diff] [blame] | 49 |  | 
| Sen Jiang | 70a6ab0 | 2015-08-28 13:23:27 -0700 | [diff] [blame] | 50 | // The kernel and rootfs partition names used by the BootControlInterface when | 
|  | 51 | // handling update payloads with a major version 1. The names of the updated | 
|  | 52 | // partitions are include in the payload itself for major version 2. | 
|  | 53 | extern const char kLegacyPartitionNameKernel[]; | 
|  | 54 | extern const char kLegacyPartitionNameRoot[]; | 
|  | 55 |  | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 56 | extern const char kBspatchPath[]; | 
| Sen Jiang | b8060e4 | 2015-09-24 17:30:50 -0700 | [diff] [blame] | 57 | extern const char kDeltaMagic[4]; | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 58 |  | 
| Sen Jiang | e0d0428 | 2016-03-01 14:22:52 -0800 | [diff] [blame] | 59 | // The list of compatible SHA256 hashes of zlib source code. | 
|  | 60 | // This is used to check if the source image have a compatible zlib (produce | 
|  | 61 | // same compressed result given the same input). | 
|  | 62 | // When a new fingerprint is found, please examine the changes in zlib source | 
|  | 63 | // carefully and determine if it's still compatible with previous version, if | 
|  | 64 | // yes then add the new fingerprint to this array, otherwise remove all previous | 
|  | 65 | // fingerprints in the array first, and only include the new fingerprint. | 
|  | 66 | extern const char kCompatibleZlibFingerprint[2][65]; | 
|  | 67 |  | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 68 | // A block number denoting a hole on a sparse file. Used on Extents to refer to | 
|  | 69 | // section of blocks not present on disk on a sparse file. | 
| Ben Chan | 05735a1 | 2014-09-03 07:48:22 -0700 | [diff] [blame] | 70 | const uint64_t kSparseHole = std::numeric_limits<uint64_t>::max(); | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 71 |  | 
| Alex Deymo | 2d621a3 | 2015-10-01 11:09:01 -0700 | [diff] [blame] | 72 | // Return the name of the operation type. | 
|  | 73 | const char* InstallOperationTypeName(InstallOperation_Type op_type); | 
|  | 74 |  | 
| Ben Chan | 05735a1 | 2014-09-03 07:48:22 -0700 | [diff] [blame] | 75 | }  // namespace chromeos_update_engine | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 76 |  | 
| Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 77 | #endif  // UPDATE_ENGINE_PAYLOAD_CONSUMER_PAYLOAD_CONSTANTS_H_ |