blob: 21dab005da1b8ae9cc1865c1533a744dc0d1ea22 [file] [log] [blame]
Alex Deymoaea4c1c2015-08-19 20:24:43 -07001//
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 Deymo161c4a12014-05-16 15:56:21 -070016
Gilad Arnoldcf175a02014-07-10 16:48:47 -070017#ifndef UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_
18#define UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_
Alex Deymo161c4a12014-05-16 15:56:21 -070019
Ben Chan05735a12014-09-03 07:48:22 -070020#include <stdint.h>
21
22#include <limits>
Alex Deymo161c4a12014-05-16 15:56:21 -070023
24namespace chromeos_update_engine {
25
Alex Deymocbf09892015-09-11 16:13:16 -070026// The major version used by Chrome OS.
27extern const uint64_t kChromeOSMajorPayloadVersion;
28
29// The major version used by Brillo.
30extern const uint64_t kBrilloMajorPayloadVersion;
31
32// The minor version used for all full payloads.
33extern const uint32_t kFullPayloadMinorVersion;
34
35// The minor version used by the in-place delta generator algorithm.
36extern const uint32_t kInPlaceMinorPayloadVersion;
37
38// The minor version used by the A to B delta generator algorithm.
39extern const uint32_t kSourceMinorPayloadVersion;
40
41
Sen Jiang70a6ab02015-08-28 13:23:27 -070042// The kernel and rootfs partition names used by the BootControlInterface when
43// handling update payloads with a major version 1. The names of the updated
44// partitions are include in the payload itself for major version 2.
45extern const char kLegacyPartitionNameKernel[];
46extern const char kLegacyPartitionNameRoot[];
47
Alex Deymo161c4a12014-05-16 15:56:21 -070048extern const char kBspatchPath[];
49extern const char kDeltaMagic[];
50
51// A block number denoting a hole on a sparse file. Used on Extents to refer to
52// section of blocks not present on disk on a sparse file.
Ben Chan05735a12014-09-03 07:48:22 -070053const uint64_t kSparseHole = std::numeric_limits<uint64_t>::max();
Alex Deymo161c4a12014-05-16 15:56:21 -070054
Ben Chan05735a12014-09-03 07:48:22 -070055} // namespace chromeos_update_engine
Alex Deymo161c4a12014-05-16 15:56:21 -070056
Gilad Arnoldcf175a02014-07-10 16:48:47 -070057#endif // UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_