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 * Registration 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 * - port 27 * - txtRecord 28 * - interfaceIdx 29 * 30 * Arguments are used by callback: 31 * - id 32 * - serviceName 33 * - registrationType 34 * - result 35 * 36 * {@hide} 37 */ 38 @JavaOnlyImmutable 39 @JavaDerive(equals=true, toString=true) 40 parcelable RegistrationInfo { 41 /** 42 * The operation ID. 43 */ 44 int id; 45 46 /** 47 * The registration result. 48 */ 49 int result; 50 51 /** 52 * The service name to be registered. 53 */ 54 @utf8InCpp String serviceName; 55 56 /** 57 * The service type followed by the protocol, separated by a dot (e.g. "_ftp._tcp"). The service 58 * type must be an underscore, followed by 1-15 characters, which may be letters, digits, or 59 * hyphens. The transport protocol must be "_tcp" or "_udp". New service types should be 60 * registered at <http://www.dns-sd.org/ServiceTypes.html>. 61 */ 62 @utf8InCpp String registrationType; 63 64 /** 65 * The port on which the service accepts connections. 66 */ 67 int port; 68 69 /** 70 * The txt record. 71 */ 72 byte[] txtRecord; 73 74 /** 75 * The interface index on which to register the service. 0 indicates "all interfaces". 76 */ 77 int interfaceIdx; 78 } 79