]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSShared/Java/DNSSDRegistration.java
7be186d061f964fa20a5d8cb0dc92e7031e56a40
2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
25 Change History (most recent first):
27 $Log: DNSSDRegistration.java,v $
28 Revision 1.1 2004/04/30 16:32:34 rpantos
32 This file declares the public interface to DNSSDRegistration, a DNSSDService
33 subclass that allows a client to control a service registration.
37 package com
.apple
.dnssd
;
40 /** A tracking object for a registration created by {@link DNSSD#register}. */
42 public interface DNSSDRegistration
extends DNSSDService
44 /** Add a record to a registered service.<P>
45 The name of the record will be the same as the registered service's name.<P>
46 The record can later be updated or deregistered by passing the DNSRecord returned
47 by this function to updateRecord() or removeRecord().<P>
50 Currently unused, reserved for future use.
53 The type of the record (e.g. TXT, SRV, etc), as defined in nameser.h.
56 The raw rdata to be contained in the added resource record.
59 The time to live of the resource record, in seconds.
61 @return A {@link DNSRecord} that may be passed to updateRecord() or removeRecord().
62 If {@link DNSSDRegistration#stop} is called, the DNSRecord is also
63 invalidated and may not be used further.
65 DNSRecord
addRecord( int flags
, int rrType
, byte[] rData
, int ttl
)
66 throws DNSSDException
;
68 /** Update a registered resource record.<P>
69 The record must either be the primary txt record of a service registered via DNSSD.register(),
70 or a record added to a registered service via addRecord().<P>
73 A DNSRecord initialized by addRecord(), or null to update the
74 service's primary txt record.
77 Currently unused, reserved for future use.
80 The new rdata to be contained in the updated resource record.
83 The time to live of the updated resource record, in seconds.
85 void updateRecord( DNSRecord record
, int flags
, byte[] rData
, int ttl
)
86 throws DNSSDException
;
88 /** Remove a registered resource record.<P>
89 The record must have been previously added to a service record set via via addRecord().<P>
92 A DNSRecord initialized by addRecord().
95 Currently unused, reserved for future use.
97 void removeRecord( DNSRecord record
, int flags
)
98 throws DNSSDException
;