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.cardemulation;
19
20import "frameworks/base/core/proto/android/content/component_name.proto";
21import "frameworks/base/core/proto/android/nfc/apdu_service_info.proto";
22import "frameworks/base/core/proto/android/nfc/nfc_fservice_info.proto";
23import "frameworks/base/core/proto/android/privacy.proto";
24
25option java_multiple_files = true;
26
27// Debugging information for com.android.nfc.cardemulation.CardEmulationManager
28message CardEmulationManagerProto {
29    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
30    optional RegisteredServicesCacheProto registered_services_cache = 1;
31    optional RegisteredNfcFServicesCacheProto registered_nfc_f_services_cache = 2;
32    optional PreferredServicesProto preferred_services = 3;
33    optional EnabledNfcFServicesProto enabled_nfc_f_services = 4;
34    optional RegisteredAidCacheProto aid_cache = 5;
35    optional RegisteredT3tIdentifiersCacheProto t3t_identifiers_cache = 6;
36    optional HostEmulationManagerProto host_emulation_manager = 7;
37    optional HostNfcFEmulationManagerProto host_nfc_f_emulation_manager = 8;
38}
39
40// Debugging information for com.android.nfc.cardemulation.RegisteredServicesCache
41message RegisteredServicesCacheProto {
42    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
43    repeated .android.nfc.cardemulation.ApduServiceInfoProto apdu_service_infos = 1;
44}
45
46// Debugging information for com.android.nfc.cardemulation.RegisteredNfcFServicesCache
47message RegisteredNfcFServicesCacheProto {
48    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
49    repeated .android.nfc.cardemulation.NfcFServiceInfoProto nfc_fservice_info = 1;
50}
51
52// Debugging information for com.android.nfc.cardemulation.PreferredServices
53message PreferredServicesProto {
54    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
55    optional .android.content.ComponentNameProto foreground_current = 1;
56    optional .android.content.ComponentNameProto current_preferred = 2;
57    optional .android.content.ComponentNameProto next_tap_default = 3;
58    optional int32 foreground_uid = 4;
59    optional .android.content.ComponentNameProto foreground_requested = 5;
60    optional .android.content.ComponentNameProto settings_default = 6;
61    optional bool prefer_foreground = 7;
62}
63
64// Debugging information for com.android.nfc.cardemulation.EnabledNfcFServices
65message EnabledNfcFServicesProto {
66    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
67    optional .android.content.ComponentNameProto foreground_component = 1;
68    optional .android.content.ComponentNameProto foreground_requested = 2;
69    optional bool activated = 3;
70    optional bool compute_fg_requested = 4;
71    optional int32 foreground_uid = 5;
72}
73
74// Debugging information for com.android.nfc.cardemulation.RegisteredAidCache
75message RegisteredAidCacheProto {
76    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
77    message AidCacheEntry {
78        optional string key = 1 [(.android.privacy).dest = DEST_EXPLICIT];
79        optional string category = 2 [(.android.privacy).dest = DEST_EXPLICIT];
80        optional .android.content.ComponentNameProto default_component = 3;
81        repeated .android.nfc.cardemulation.ApduServiceInfoProto services = 4;
82    }
83    repeated AidCacheEntry aid_cache_entries = 1;
84    optional .android.content.ComponentNameProto preferred_foreground_service = 2;
85    optional .android.content.ComponentNameProto preferred_payment_service = 3;
86    optional AidRoutingManagerProto routing_manager = 4;
87}
88
89message AidRoutingManagerProto {
90    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
91    message Route {
92        option (.android.msg_privacy).dest = DEST_AUTOMATIC;
93        optional int32 id = 1;
94        repeated string aids = 2 [(.android.privacy).dest = DEST_EXPLICIT];
95    }
96    optional int32 default_route = 1;
97    repeated Route routes = 2;
98}
99
100// Debugging information for com.android.nfc.cardemulation.RegisteredT3tIdentifiersCache
101message RegisteredT3tIdentifiersCacheProto {
102    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
103    repeated .android.nfc.cardemulation.NfcFServiceInfoProto t3t_identifier_cache_entries = 1;
104    optional SystemCodeRoutingManagerProto routing_manager = 2;
105}
106
107// Debugging information for com.android.nfc.cardemulation.SystemCodeRoutingManager
108message SystemCodeRoutingManagerProto {
109    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
110    message T3tIdentifier {
111        option (.android.msg_privacy).dest = DEST_EXPLICIT;
112        optional string system_code = 1;
113        optional string nfcid2 = 2;
114    }
115    repeated T3tIdentifier t3t_identifiers = 1;
116}
117
118// Debugging information for com.android.nfc.cardemulation.HostEmulationManager
119message HostEmulationManagerProto {
120    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
121    optional .android.content.ComponentNameProto payment_service_name = 1;
122    optional .android.content.ComponentNameProto service_name = 2;
123}
124
125// Debugging information for com.android.nfc.cardemulation.HostNfcFEmulationManager
126message HostNfcFEmulationManagerProto {
127    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
128    optional .android.content.ComponentNameProto service_name = 1;
129}
130