Yi Jin | f860184 | 2017-08-15 22:01:41 -0700 | [diff] [blame] | 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 | syntax = "proto2"; |
| 18 | |
| 19 | option java_package = "android"; |
| 20 | option java_multiple_files = true; |
| 21 | |
| 22 | import "google/protobuf/descriptor.proto"; |
| 23 | |
| 24 | package android; |
| 25 | |
| 26 | // SectionType defines how incidentd gonna get the field's data |
| 27 | enum SectionType { |
| 28 | |
| 29 | // Default fields, not available in incidentd |
| 30 | SECTION_NONE = 0; |
| 31 | |
| 32 | // incidentd reads a file to get the data for annotated field |
| 33 | SECTION_FILE = 1; |
| 34 | |
| 35 | // incidentd executes the given command for annotated field |
| 36 | SECTION_COMMAND = 2; |
| 37 | |
| 38 | // incidentd calls dumpsys for annotated field |
| 39 | SECTION_DUMPSYS = 3; |
Yi Jin | 3c034c9 | 2017-12-22 17:36:47 -0800 | [diff] [blame] | 40 | |
| 41 | // incidentd calls logs for annotated field |
| 42 | SECTION_LOG = 4; |
Yi Jin | f860184 | 2017-08-15 22:01:41 -0700 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | message SectionFlags { |
| 46 | optional SectionType type = 1 [default = SECTION_NONE]; |
| 47 | optional string args = 2; |
| 48 | } |
| 49 | |
| 50 | extend google.protobuf.FieldOptions { |
| 51 | // Flags for automatically section list generation |
| 52 | optional SectionFlags section = 155792027; |
| 53 | } |