1//
2// Copyright (C) 2024 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";
18
19package com_android_nfc;
20
21option java_package = "com.android.nfc.proto";
22option java_outer_classname = "NfcEventProto";
23
24// Proto used to format NFC event logs.
25message EventList {
26  repeated Event events = 1;
27}
28
29message Event {
30  required string timestamp = 1;
31  required EventType event_type = 2;
32}
33
34// Union of events.
35message EventType {
36  oneof _EventType {
37    NfcBootupState bootup_state = 1;
38    NfcStateChange state_change = 2;
39    NfcReaderModeChange reader_mode_change = 3;
40    NfcCeUnroutableAid ce_unroutable_aid = 4;
41    NfcObserveModeChange observe_mode_change = 5;
42    NfcWalletRoleHolderChange wallet_role_holder_change = 6;
43  }
44}
45
46message NfcBootupState {
47  required bool enabled = 1;
48}
49
50message NfcAppInfo {
51  optional string package_name = 1;
52  optional int32 uid = 2;
53}
54
55message NfcStateChange {
56  required NfcAppInfo app_info = 1;
57  required bool enabled = 2;
58}
59
60message NfcReaderModeChange {
61  optional NfcAppInfo app_info = 1;
62  required int32 flags = 2;
63}
64
65message NfcCeUnroutableAid {
66  required string aid = 1;
67}
68
69message NfcObserveModeChange {
70  optional NfcAppInfo app_info = 1;
71  required bool enable = 2;
72  required bool result = 3;
73  required int32 latency_ms = 4;
74}
75
76message NfcWalletRoleHolderChange {
77  optional string package_name = 1;
78}