author | Jens Alfke <jens@mooseyard.com> |
Tue Apr 28 10:36:28 2009 -0700 (2009-04-28) | |
changeset 29 | 59689fbdcf77 |
parent 26 | cb9cdf247239 |
child 31 | 1d6924779df7 |
permissions | -rw-r--r-- |
jens@26 | 1 |
// |
jens@26 | 2 |
// MYBonjourBrowser.h |
jens@26 | 3 |
// MYNetwork |
jens@26 | 4 |
// |
jens@26 | 5 |
// Created by Jens Alfke on 1/22/08. |
jens@26 | 6 |
// Copyright 2008 Jens Alfke. All rights reserved. |
jens@26 | 7 |
// |
jens@26 | 8 |
|
jens@28 | 9 |
#import "MYDNSService.h" |
jens@26 | 10 |
|
jens@26 | 11 |
|
jens@26 | 12 |
/** Searches for Bonjour services of a specific type. */ |
jens@28 | 13 |
@interface MYBonjourBrowser : MYDNSService |
jens@26 | 14 |
{ |
jens@26 | 15 |
@private |
jens@26 | 16 |
NSString *_serviceType; |
jens@26 | 17 |
BOOL _browsing; |
jens@26 | 18 |
Class _serviceClass; |
jens@26 | 19 |
NSMutableSet *_services, *_addServices, *_rmvServices; |
jens@26 | 20 |
} |
jens@26 | 21 |
|
jens@26 | 22 |
/** Initializes a new BonjourBrowser. |
jens@26 | 23 |
Call -start to begin browsing. |
jens@26 | 24 |
@param serviceType The name of the service type to look for, e.g. "_http._tcp". */ |
jens@26 | 25 |
- (id) initWithServiceType: (NSString*)serviceType; |
jens@26 | 26 |
|
jens@26 | 27 |
/** Is the browser currently browsing? */ |
jens@26 | 28 |
@property (readonly) BOOL browsing; |
jens@26 | 29 |
|
jens@26 | 30 |
/** The set of currently found services. These are instances of the serviceClass, |
jens@26 | 31 |
which is BonjourService by default. |
jens@26 | 32 |
This is KV-observable. */ |
jens@26 | 33 |
@property (readonly) NSSet *services; |
jens@26 | 34 |
|
jens@26 | 35 |
/** The class of objects to create to represent services. |
jens@26 | 36 |
The default value is [BonjourService class]; you can change this, but only |
jens@26 | 37 |
to a subclass of that. */ |
jens@26 | 38 |
@property Class serviceClass; |
jens@26 | 39 |
|
jens@26 | 40 |
@end |