1/*
2 * Copyright (C) 2019 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
17syntax = "proto3";
18
19// The version of a single module.
20message SdkVersion {
21  int32 version = 1;
22}
23
24// All the modules that can be used for version requirements.
25//
26// The only modules that should be listed here are non-optional modules that
27// have Java APIs, i.e. their APEX contains a bootclaspath_fragment or a
28// systemserverclasspath_fragment.
29// Add every entry made in this enum to the corresponding MainlineModule
30// defined in packages/modules/common/build/mainline_modules_sdks.py
31enum SdkModule {
32  UNKNOWN = 0;
33
34  // R modules
35  CONSCRYPT = 10;
36  EXT_SERVICES = 14;
37  IPSEC = 1;
38  MEDIA = 2;
39  MEDIA_PROVIDER = 3;
40  PERMISSIONS = 4;
41  SDK_EXTENSIONS = 5;
42  STATSD = 6;
43  TETHERING = 7;
44  // WIFI - optional
45
46  // S modules
47  ART = 8;
48  SCHEDULING = 9;
49
50  // T modules
51  AD_SERVICES = 11;
52  APPSEARCH = 12;
53  ON_DEVICE_PERSONALIZATION = 13;
54  // UWB - optional
55
56  // U modules
57  // BT_SERVICES - optional
58  CONFIG_INFRASTRUCTURE = 15;
59  HEALTH_FITNESS = 16;
60  // REMOTE_KEY_PROVISIONING - optional
61
62  // V modules
63  // No new modules introduced in V
64}
65
66// A single extension version.
67message ExtensionVersion {
68  message ModuleRequirement {
69    SdkModule module = 1;
70    SdkVersion version = 2;
71  }
72
73  // The extension version.
74  int32 version = 1;
75
76  // The modules required for this extension version.
77  repeated ModuleRequirement requirements = 2;
78}
79
80// All the defined extension versions.
81message ExtensionDatabase {
82  repeated ExtensionVersion versions = 1;
83}
84