Home | History | Annotate | Download | only in android
      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;
     40 
     41     // incidentd calls logs for annotated field
     42     SECTION_LOG = 4;
     43 
     44     // incidentd read file and gzip the data in bytes field
     45     SECTION_GZIP = 5;
     46 
     47     // incidentd calls tombstoned for annotated field
     48     SECTION_TOMBSTONE = 6;
     49 }
     50 
     51 message SectionFlags {
     52   optional SectionType type = 1 [default = SECTION_NONE];
     53   optional string args = 2;
     54   // If true, then the section will only be generated for userdebug and eng
     55   // builds.
     56   optional bool userdebug_and_eng_only = 3 [default = false];
     57 }
     58 
     59 extend google.protobuf.FieldOptions {
     60     // Flags for automatically section list generation
     61     optional SectionFlags section = 155792027;
     62 }
     63