1 /*
2  * Copyright (C) 2022 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 
17 package android.net.mdns.aidl;
18 
19 /**
20  * Resolution service information.
21  * This information combine all arguments that used by both request and callback.
22  * Arguments are used by request:
23  * - id
24  * - serviceName
25  * - registrationType
26  * - domain
27  * - interfaceIdx
28  *
29  * Arguments are used by callback:
30  * - id
31  * - port
32  * - serviceFullName
33  * - hostname
34  * - txtRecord
35  * - interfaceIdx
36  * - result
37  *
38  * {@hide}
39  */
40 @JavaOnlyImmutable
41 @JavaDerive(equals=true, toString=true)
42 parcelable ResolutionInfo {
43     /**
44      * The operation ID.
45      */
46     int id;
47 
48     /**
49      * The resolution result.
50      */
51     int result;
52 
53     /**
54      * The service name to be resolved.
55      */
56     @utf8InCpp String serviceName;
57 
58     /**
59      * The service type to be resolved.
60      */
61     @utf8InCpp String registrationType;
62 
63     /**
64      * The service domain to be resolved.
65      */
66     @utf8InCpp String domain;
67 
68     /**
69      * The resolved full service domain name, in the form <servicename>.<protocol>.<domain>.
70      */
71     @utf8InCpp String serviceFullName;
72 
73     /**
74      * The target hostname of the machine providing the service.
75      */
76     @utf8InCpp String hostname;
77 
78     /**
79      * The port on which connections are accepted for this service.
80      */
81     int port;
82 
83     /**
84      * The service's txt record.
85      */
86     byte[] txtRecord;
87 
88     /**
89      * The interface index on which to resolve the service. 0 indicates "all interfaces".
90      */
91     int interfaceIdx;
92 }
93