4b22b9337f359bfd063322244f5336cc7c6ffcfars/* -*- Mode: Java; tab-width: 4 -*-
4b22b9337f359bfd063322244f5336cc7c6ffcfars *
4b22b9337f359bfd063322244f5336cc7c6ffcfars * Copyright (c) 2006 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/** An object for registering records, created by {@link DNSSD#createRecordRegistrar}. */
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfarspublic interface DNSSDRecordRegistrar extends DNSSDService
4b22b9337f359bfd063322244f5336cc7c6ffcfars{
4b22b9337f359bfd063322244f5336cc7c6ffcfars /** Register an independent {@link DNSRecord}.<P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param flags
4b22b9337f359bfd063322244f5336cc7c6ffcfars Possible values are SHARED or UNIQUE (see flag type definitions for details).
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param ifIndex
4b22b9337f359bfd063322244f5336cc7c6ffcfars If non-zero, specifies the interface on which to register the record
4b22b9337f359bfd063322244f5336cc7c6ffcfars (the index for a given interface is determined via the if_nametoindex()
4b22b9337f359bfd063322244f5336cc7c6ffcfars family of calls.) Passing 0 causes the record to be registered on all interfaces.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param fullname
4b22b9337f359bfd063322244f5336cc7c6ffcfars The full domain name of the resource record.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param rrtype
4b22b9337f359bfd063322244f5336cc7c6ffcfars The numerical type of the resource record to be queried for (e.g. PTR, SRV, etc)
4b22b9337f359bfd063322244f5336cc7c6ffcfars as defined in nameser.h.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param rrclass
4b22b9337f359bfd063322244f5336cc7c6ffcfars The class of the resource record, as defined in nameser.h
4b22b9337f359bfd063322244f5336cc7c6ffcfars (usually 1 for the Internet class).
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome @param rdata
4b22b9337f359bfd063322244f5336cc7c6ffcfars The new rdata as it is to appear in the DNS record.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @param ttl
4b22b9337f359bfd063322244f5336cc7c6ffcfars The time to live of the resource record, in seconds. Pass 0 to use a default value.
4b22b9337f359bfd063322244f5336cc7c6ffcfars <P>
4b22b9337f359bfd063322244f5336cc7c6ffcfars @return A {@link DNSSDService} that can be used to abort the record registration.
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars @throws SecurityException If a security manager is present and denies <tt>RuntimePermission("getDNSSDInstance")</tt>.
4b22b9337f359bfd063322244f5336cc7c6ffcfars @see RuntimePermission
4b22b9337f359bfd063322244f5336cc7c6ffcfars */
4b22b9337f359bfd063322244f5336cc7c6ffcfars public DNSRecord registerRecord( int flags, int ifIndex, String fullname, int rrtype,
4b22b9337f359bfd063322244f5336cc7c6ffcfars int rrclass, byte[] rdata, int ttl)
4b22b9337f359bfd063322244f5336cc7c6ffcfars throws DNSSDException;
4b22b9337f359bfd063322244f5336cc7c6ffcfars}
4b22b9337f359bfd063322244f5336cc7c6ffcfars