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