blob: 6eac414b1e0f794eebe470c03cb3c8d20d970902 [file] [log] [blame]
Mårten Kongstad867a3492023-04-25 15:06:30 +02001// Copyright (C) 2023 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License
14
Mårten Kongstadbb520722023-04-26 13:16:41 +020015// This is the schema definition for of Aconfig files. Modifications need to be
16// either backwards compatible, or include updates to all Aconfig files in the
17// Android tree.
Mårten Kongstad867a3492023-04-25 15:06:30 +020018
Mårten Kongstadbb520722023-04-26 13:16:41 +020019syntax = "proto2";
Mårten Kongstad867a3492023-04-25 15:06:30 +020020
21package android.aconfig;
22
Mårten Kongstadc68c4ea2023-05-05 16:20:09 +020023enum flag_state {
24 ENABLED = 1;
25 DISABLED = 2;
26}
27
Mårten Kongstad416330b2023-05-05 11:10:01 +020028enum permission {
29 READ_ONLY = 1;
30 READ_WRITE = 2;
31}
32
Mårten Kongstad09c28d12023-05-04 13:29:26 +020033message value {
Mårten Kongstadc68c4ea2023-05-05 16:20:09 +020034 required flag_state state = 1;
Mårten Kongstad416330b2023-05-05 11:10:01 +020035 required permission permission = 2;
36 optional uint32 since = 3;
Mårten Kongstad09c28d12023-05-04 13:29:26 +020037}
38
Mårten Kongstadbb520722023-04-26 13:16:41 +020039message flag {
40 required string id = 1;
41 required string description = 2;
Mårten Kongstad09c28d12023-05-04 13:29:26 +020042 repeated value value = 3;
Mårten Kongstadbb520722023-04-26 13:16:41 +020043};
44
45message android_config {
46 repeated flag flag = 1;
47};
48
49message override {
50 required string id = 1;
Mårten Kongstadc68c4ea2023-05-05 16:20:09 +020051 required flag_state state = 2;
Mårten Kongstad416330b2023-05-05 11:10:01 +020052 required permission permission = 3;
Mårten Kongstadbb520722023-04-26 13:16:41 +020053};
54
55message override_config {
56 repeated override override = 1;
57};