1/* -*- Mode: Java; tab-width: 4 -*-
2 *
3 * Copyright (c) 2004 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
18
19package	com.apple.dnssd;
20
21
22/**	A listener that receives results from {@link DNSSD#browse}. */
23
24public interface BrowseListener extends BaseListener
25{
26	/** Called to report discovered services.<P>
27
28		@param	browser
29					The active browse service.
30		<P>
31		@param	flags
32					Possible values are DNSSD.MORE_COMING.
33		<P>
34		@param	ifIndex
35					The interface on which the service is advertised. This index should be passed
36					to {@link DNSSD#resolve} when resolving the service.
37		<P>
38		@param	serviceName
39					The service name discovered.
40		<P>
41		@param	regType
42					The registration type, as passed in to DNSSD.browse().
43		<P>
44		@param	domain
45					The domain in which the service was discovered.
46	*/
47	void	serviceFound( DNSSDService browser, int flags, int ifIndex,
48							String serviceName, String regType, String domain);
49
50	/** Called to report services which have been deregistered.<P>
51
52		@param	browser
53					The active browse service.
54		<P>
55		@param	flags
56					Possible values are DNSSD.MORE_COMING.
57		<P>
58		@param	ifIndex
59					The interface on which the service is advertised.
60		<P>
61		@param	serviceName
62					The service name which has deregistered.
63		<P>
64		@param	regType
65					The registration type, as passed in to DNSSD.browse().
66		<P>
67		@param	domain
68					The domain in which the service was discovered.
69	*/
70	void	serviceLost( DNSSDService browser, int flags, int ifIndex,
71							String serviceName, String regType, String domain);
72}
73
74