]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSShared/Java/DNSSDRecordRegistrar.java
mDNSResponder-107.6.tar.gz
[apple/mdnsresponder.git] / mDNSShared / Java / DNSSDRecordRegistrar.java
1 /* -*- Mode: Java; tab-width: 4 -*-
2 *
3 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16
17 This file declares the public interface to DNSSDRecordRegistrar, a DNSSDService
18 subclass that allows efficient registration of multiple individual records.
19
20 Change History (most recent first):
21
22 $Log: DNSSDRecordRegistrar.java,v $
23 Revision 1.2 2006/08/14 23:25:08 cheshire
24 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
25
26 Revision 1.1 2006/06/20 23:00:12 rpantos
27 <rdar://problem/3839132> Java needs to implement DNSServiceRegisterRecord equivalent
28
29 */
30
31
32 package com.apple.dnssd;
33
34
35 /** An object for registering records, created by {@link DNSSD#createRecordRegistrar}. */
36
37 public interface DNSSDRecordRegistrar extends DNSSDService
38 {
39 /** Register an independent {@link DNSRecord}.<P>
40 @param flags
41 Possible values are SHARED or UNIQUE (see flag type definitions for details).
42 <P>
43 @param ifIndex
44 If non-zero, specifies the interface on which to register the record
45 (the index for a given interface is determined via the if_nametoindex()
46 family of calls.) Passing 0 causes the record to be registered on all interfaces.
47 <P>
48 @param fullname
49 The full domain name of the resource record.
50 <P>
51 @param rrtype
52 The numerical type of the resource record to be queried for (e.g. PTR, SRV, etc)
53 as defined in nameser.h.
54 <P>
55 @param rrclass
56 The class of the resource record, as defined in nameser.h
57 (usually 1 for the Internet class).
58 <P>
59 @param rData
60 The new rdata as it is to appear in the DNS record.
61 <P>
62 @param ttl
63 The time to live of the resource record, in seconds. Pass 0 to use a default value.
64 <P>
65 @param listener
66 This object will get called when the service is registered.
67 <P>
68 @return A {@link DNSSDService} that can be used to abort the record registration.
69
70 @throws SecurityException If a security manager is present and denies <tt>RuntimePermission("getDNSSDInstance")</tt>.
71 @see RuntimePermission
72 */
73 public DNSRecord registerRecord( int flags, int ifIndex, String fullname, int rrtype,
74 int rrclass, byte[] rdata, int ttl)
75 throws DNSSDException;
76 }
77