4b22b9337f359bfd063322244f5336cc7c6ffcfars/* -*- Mode: Java; tab-width: 4 -*-
4b22b9337f359bfd063322244f5336cc7c6ffcfars *
4b22b9337f359bfd063322244f5336cc7c6ffcfars * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4b22b9337f359bfd063322244f5336cc7c6ffcfars *
4b22b9337f359bfd063322244f5336cc7c6ffcfars * Licensed under the Apache License, Version 2.0 (the "License");
4b22b9337f359bfd063322244f5336cc7c6ffcfars * you may not use this file except in compliance with the License.
4b22b9337f359bfd063322244f5336cc7c6ffcfars * You may obtain a copy of the License at
4b22b9337f359bfd063322244f5336cc7c6ffcfars *
4b22b9337f359bfd063322244f5336cc7c6ffcfars * http://www.apache.org/licenses/LICENSE-2.0
4b22b9337f359bfd063322244f5336cc7c6ffcfars *
4b22b9337f359bfd063322244f5336cc7c6ffcfars * Unless required by applicable law or agreed to in writing, software
4b22b9337f359bfd063322244f5336cc7c6ffcfars * distributed under the License is distributed on an "AS IS" BASIS,
4b22b9337f359bfd063322244f5336cc7c6ffcfars * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4b22b9337f359bfd063322244f5336cc7c6ffcfars * See the License for the specific language governing permissions and
4b22b9337f359bfd063322244f5336cc7c6ffcfars * limitations under the License.
4b22b9337f359bfd063322244f5336cc7c6ffcfars */
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfarspackage com.apple.dnssd;
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars/** A listener that receives results from {@link DNSSD#queryRecord}. */
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfarspublic interface QueryListener extends BaseListener
4b22b9337f359bfd063322244f5336cc7c6ffcfars{
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome /** Called when a record query has been completed. Inspect flags
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome parameter to determine nature of query event.<P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param query
4b22b9337f359bfd063322244f5336cc7c6ffcfars The active query object.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param flags
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome If kDNSServiceFlagsAdd bit is set, this is a newly discovered answer;
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome otherwise this is a previously discovered answer which has expired.
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome Other possible values are DNSSD.MORE_COMING.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param ifIndex
4b22b9337f359bfd063322244f5336cc7c6ffcfars The interface on which the query was resolved. (The index for a given
4b22b9337f359bfd063322244f5336cc7c6ffcfars interface is determined via the if_nametoindex() family of calls.)
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param fullName
4b22b9337f359bfd063322244f5336cc7c6ffcfars The resource record's full domain name.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param rrtype
4b22b9337f359bfd063322244f5336cc7c6ffcfars The resource record's type (e.g. PTR, SRV, etc) as defined by RFC 1035 and its updates.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param rrclass
4b22b9337f359bfd063322244f5336cc7c6ffcfars The class of the resource record, as defined by RFC 1035 and its updates.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param rdata
4b22b9337f359bfd063322244f5336cc7c6ffcfars The raw rdata of the resource record.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param ttl
4b22b9337f359bfd063322244f5336cc7c6ffcfars The resource record's time to live, in seconds.
4b22b9337f359bfd063322244f5336cc7c6ffcfars */
4b22b9337f359bfd063322244f5336cc7c6ffcfars void queryAnswered( DNSSDService query, int flags, int ifIndex, String fullName,
4b22b9337f359bfd063322244f5336cc7c6ffcfars int rrtype, int rrclass, byte[] rdata, int ttl);
4b22b9337f359bfd063322244f5336cc7c6ffcfars}
4b22b9337f359bfd063322244f5336cc7c6ffcfars