• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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  */
16 
17 #ifndef ANDROID_VINTF_LEVEL_H
18 #define ANDROID_VINTF_LEVEL_H
19 
20 #include <stddef.h>
21 #include <stdint.h>
22 
23 namespace android {
24 namespace vintf {
25 
26 // Manifest and Compatibility Matrix Level, a.k.a FCM Version, is a number assigned to each
27 // manifest / matrix.
28 // - For manifest, the FCM Version that it implements
29 // - For matrix, the single FCM Version that this matrix file details.
30 // This is not a strong-typed enum because Level can be any integer value. Listed are some
31 // special values.
32 enum Level : size_t {
33     // Non-Treble devices.
34     LEGACY = 0,
35     // Actual values starts from 1.
36     O = 1,
37     O_MR1 = 2,
38     P = 3,
39     Q = 4,
40     R = 5,
41     S = 6,
42     T = 7,
43     // To add new values: (1) add above this line.  (2) edit if needed:
44     // - RuntimeInfo::gkiAndroidReleaseToLevel
45     // - analyze_matrix.cpp, LevelDescription()
46 
47     // The maximum of all specified Levels + 1.
48     LAST_PLUS_ONE,
49 
50     // For older manifests and compatibility matrices, "level" is not specified.
51     UNSPECIFIED = SIZE_MAX,
52 };
53 
54 std::string GetDescription(Level level);
55 
56 }  // namespace vintf
57 }  // namespace android
58 
59 #endif  // ANDROID_VINTF_LEVEL_H
60