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
17syntax = "proto2";
18package android.util;
19
20option java_multiple_files = true;
21
22import "frameworks/base/libs/incident/proto/android/privacy.proto";
23
24// Proto representation of event.logtags.
25// Usually sit in /system/etc/event-log-tags.
26message EventLogTagMapProto {
27    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
28
29    repeated EventLogTag event_log_tags = 1;
30}
31
32message EventLogTag {
33    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
34
35    optional uint32 tag_number = 1; // keyed by tag number.
36    optional string tag_name = 2;
37
38    message ValueDescriptor {
39        option (.android.msg_privacy).dest = DEST_AUTOMATIC;
40
41        optional string name = 1;
42
43        enum DataType {
44            UNKNOWN = 0;
45            INT = 1;
46            LONG = 2;
47            STRING = 3;
48            LIST = 4;
49            FLOAT = 5;
50        }
51        optional DataType type = 2;
52
53        enum DataUnit {
54            UNSET = 0;          // this field is optional, so default is unset
55            OBJECTS = 1;        // Number of objects
56            BYTES = 2;          // Number of bytes (default for type of int/long)
57            MILLISECONDS = 3;   // Number of milliseconds
58            ALLOCATIONS = 4;    // Number of allocations
59            ID = 5;             // Id
60            PERCENT = 6;        // Percent
61            SECONDS = 115;      // 's', Number of seconds (monotonic time)
62        }
63        optional DataUnit unit = 3;
64    }
65    repeated ValueDescriptor value_descriptors = 3;
66}
67