1/*
2 * Copyright (C) 2020 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 com.android.nfc;
19
20import "frameworks/base/core/proto/android/app/pendingintent.proto";
21import "frameworks/base/core/proto/android/content/intent.proto";
22import "frameworks/base/core/proto/android/nfc/card_emulation.proto";
23import "frameworks/base/core/proto/android/nfc/ndef.proto";
24import "frameworks/base/core/proto/android/privacy.proto";
25
26option java_multiple_files = true;
27
28// Debugging information for com.android.nfc.NfcService
29message NfcServiceDumpProto {
30    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
31
32    enum State {
33        STATE_UNKNOWN = 0;
34        STATE_OFF = 1;
35        STATE_TURNING_ON = 2;
36        STATE_ON = 3;
37        STATE_TURNING_OFF = 4;
38    }
39
40    enum ScreenState {
41        SCREEN_STATE_UNKNOWN = 0;
42        SCREEN_STATE_OFF_UNLOCKED = 1;
43        SCREEN_STATE_OFF_LOCKED = 2;
44        SCREEN_STATE_ON_LOCKED = 3;
45        SCREEN_STATE_ON_UNLOCKED = 4;
46    }
47
48    optional State state = 1;
49    optional bool in_provision_mode = 2;
50    optional bool ndef_push_enabled = 3;
51    optional ScreenState screen_state = 4;
52    optional bool secure_nfc_enabled = 5;
53    optional bool polling_paused = 6;
54    optional int32 num_tags_detected = 7;
55    optional int32 num_p2p_detected = 8;
56    optional int32 num_hce_detected = 9;
57    optional bool hce_capable = 10;
58    optional bool hce_f_capable = 11;
59    optional bool beam_capable = 12;
60    optional bool secure_nfc_capable = 13;
61    optional bool vr_mode_enabled = 14;
62    optional DiscoveryParamsProto discovery_params = 15;
63    optional P2pLinkManagerProto p2p_link_manager = 16;
64    optional com.android.nfc.cardemulation.CardEmulationManagerProto card_emulation_manager = 17;
65    optional NfcDispatcherProto nfc_dispatcher = 18;
66    optional string native_crash_logs = 19 [(.android.privacy).dest = DEST_EXPLICIT];
67}
68
69// Debugging information for com.android.nfc.NfcDiscoveryParameters
70message DiscoveryParamsProto {
71    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
72
73    optional int32 tech_mask = 1;
74    optional bool enable_lpd = 2;
75    optional bool enable_reader = 3;
76    optional bool enable_host_routing = 4;
77    optional bool enable_p2p = 5;
78}
79
80// Debugging information for com.android.nfc.P2pLinkManager
81message P2pLinkManagerProto {
82    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
83
84    enum LinkState {
85        LINK_STATE_UNKNOWN = 0;
86        LINK_STATE_DOWN = 1;
87        LINK_STATE_DEBOUNCE = 2;
88        LINK_STATE_UP = 3;
89    }
90
91    enum SendState {
92        SEND_STATE_UNKNOWN = 0;
93        SEND_STATE_NOTHING_TO_SEND = 1;
94        SEND_STATE_NEED_CONFIRMATION = 2;
95        SEND_STATE_SENDING = 3;
96        SEND_STATE_COMPLETE = 4;
97        SEND_STATE_CANCELED = 5;
98    }
99
100    optional int32 default_miu = 1;
101    optional int32 default_rw_size = 2;
102    optional LinkState link_state = 3;
103    optional SendState send_state = 4;
104    optional int32 send_flags = 5;
105    optional bool send_enabled = 6;
106    optional bool receive_enabled = 7;
107    optional string callback_ndef = 8 [(.android.privacy).dest = DEST_EXPLICIT];
108    optional .android.nfc.NdefMessageProto message_to_send = 9;
109    repeated string uris_to_send = 10 [(.android.privacy).dest = DEST_EXPLICIT];
110}
111
112// Debugging information for com.android.nfc.NfcDispatcher
113message NfcDispatcherProto {
114    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
115
116    optional bool device_supports_bluetooth = 1;
117    optional bool bluetooth_enabled_by_nfc = 2;
118    optional bool provisioning_only = 3;
119    optional .android.app.PendingIntentProto override_intent = 4;
120    repeated .android.content.IntentFilterProto override_filters = 5;
121    optional string override_tech_lists = 6;
122}
123