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    optional .android.content.ComponentNameProto wallet_role_holder_payment_service = 8;
63}
64
65// Debugging information for com.android.nfc.cardemulation.EnabledNfcFServices
66message EnabledNfcFServicesProto {
67    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
68    optional .android.content.ComponentNameProto foreground_component = 1;
69    optional .android.content.ComponentNameProto foreground_requested = 2;
70    optional bool activated = 3;
71    optional bool compute_fg_requested = 4;
72    optional int32 foreground_uid = 5;
73}
74
75// Debugging information for com.android.nfc.cardemulation.RegisteredAidCache
76message RegisteredAidCacheProto {
77    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
78    message AidCacheEntry {
79        optional string key = 1 [(.android.privacy).dest = DEST_EXPLICIT];
80        optional string category = 2 [(.android.privacy).dest = DEST_EXPLICIT];
81        optional .android.content.ComponentNameProto default_component = 3;
82        repeated .android.nfc.cardemulation.ApduServiceInfoProto services = 4;
83    }
84    repeated AidCacheEntry aid_cache_entries = 1;
85    optional .android.content.ComponentNameProto preferred_foreground_service = 2;
86    optional .android.content.ComponentNameProto preferred_payment_service = 3;
87    optional AidRoutingManagerProto routing_manager = 4;
88}
89
90message AidRoutingManagerProto {
91    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
92    message Route {
93        option (.android.msg_privacy).dest = DEST_AUTOMATIC;
94        optional int32 id = 1;
95        repeated string aids = 2 [(.android.privacy).dest = DEST_EXPLICIT];
96    }
97    optional int32 default_route = 1;
98    repeated Route routes = 2;
99}
100
101// Debugging information for com.android.nfc.cardemulation.RegisteredT3tIdentifiersCache
102message RegisteredT3tIdentifiersCacheProto {
103    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
104    repeated .android.nfc.cardemulation.NfcFServiceInfoProto t3t_identifier_cache_entries = 1;
105    optional SystemCodeRoutingManagerProto routing_manager = 2;
106}
107
108// Debugging information for com.android.nfc.cardemulation.SystemCodeRoutingManager
109message SystemCodeRoutingManagerProto {
110    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
111    message T3tIdentifier {
112        option (.android.msg_privacy).dest = DEST_EXPLICIT;
113        optional string system_code = 1;
114        optional string nfcid2 = 2;
115    }
116    repeated T3tIdentifier t3t_identifiers = 1;
117}
118
119// Debugging information for com.android.nfc.cardemulation.HostEmulationManager
120message HostEmulationManagerProto {
121    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
122    optional .android.content.ComponentNameProto payment_service_name = 1;
123    optional .android.content.ComponentNameProto service_name = 2;
124}
125
126// Debugging information for com.android.nfc.cardemulation.HostNfcFEmulationManager
127message HostNfcFEmulationManagerProto {
128    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
129    optional .android.content.ComponentNameProto service_name = 1;
130}
131