Mårten Kongstad | 867a349 | 2023-04-25 15:06:30 +0200 | [diff] [blame] | 1 | // 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 Kongstad | bb52072 | 2023-04-26 13:16:41 +0200 | [diff] [blame] | 15 | // 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 Kongstad | 867a349 | 2023-04-25 15:06:30 +0200 | [diff] [blame] | 18 | |
Mårten Kongstad | bb52072 | 2023-04-26 13:16:41 +0200 | [diff] [blame] | 19 | syntax = "proto2"; |
Mårten Kongstad | 867a349 | 2023-04-25 15:06:30 +0200 | [diff] [blame] | 20 | |
| 21 | package android.aconfig; |
| 22 | |
Mårten Kongstad | 416330b | 2023-05-05 11:10:01 +0200 | [diff] [blame^] | 23 | enum permission { |
| 24 | READ_ONLY = 1; |
| 25 | READ_WRITE = 2; |
| 26 | } |
| 27 | |
Mårten Kongstad | 09c28d1 | 2023-05-04 13:29:26 +0200 | [diff] [blame] | 28 | message value { |
| 29 | required bool value = 1; |
Mårten Kongstad | 416330b | 2023-05-05 11:10:01 +0200 | [diff] [blame^] | 30 | required permission permission = 2; |
| 31 | optional uint32 since = 3; |
Mårten Kongstad | 09c28d1 | 2023-05-04 13:29:26 +0200 | [diff] [blame] | 32 | } |
| 33 | |
Mårten Kongstad | bb52072 | 2023-04-26 13:16:41 +0200 | [diff] [blame] | 34 | message flag { |
| 35 | required string id = 1; |
| 36 | required string description = 2; |
Mårten Kongstad | 09c28d1 | 2023-05-04 13:29:26 +0200 | [diff] [blame] | 37 | repeated value value = 3; |
Mårten Kongstad | bb52072 | 2023-04-26 13:16:41 +0200 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | message android_config { |
| 41 | repeated flag flag = 1; |
| 42 | }; |
| 43 | |
| 44 | message override { |
| 45 | required string id = 1; |
| 46 | required bool value = 2; |
Mårten Kongstad | 416330b | 2023-05-05 11:10:01 +0200 | [diff] [blame^] | 47 | required permission permission = 3; |
Mårten Kongstad | bb52072 | 2023-04-26 13:16:41 +0200 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | message override_config { |
| 51 | repeated override override = 1; |
| 52 | }; |