Bonjour/MYBonjourService.h
changeset 59 46c7844cb592
parent 50 63baa74c903f
     1.1 --- a/Bonjour/MYBonjourService.h	Wed Jul 01 14:14:32 2009 -0700
     1.2 +++ b/Bonjour/MYBonjourService.h	Mon Jul 20 13:26:29 2009 -0700
     1.3 @@ -7,13 +7,14 @@
     1.4  //
     1.5  
     1.6  #import "MYDNSService.h"
     1.7 -@class MYBonjourQuery, MYAddressLookup;
     1.8 +@class MYBonjourBrowser, MYBonjourQuery, MYAddressLookup;
     1.9  
    1.10  
    1.11  /** Represents a Bonjour service discovered by a MYBonjourBrowser. */
    1.12  @interface MYBonjourService : MYDNSService 
    1.13  {
    1.14      @private
    1.15 +    MYBonjourBrowser *_bonjourBrowser;
    1.16      NSString *_name, *_fullName, *_type, *_domain, *_hostname;
    1.17      uint32_t _interfaceIndex;
    1.18      BOOL _startedResolve;
    1.19 @@ -23,6 +24,9 @@
    1.20      MYAddressLookup *_addressLookup;
    1.21  }
    1.22  
    1.23 +/** The browser I belong to. */
    1.24 +@property (readonly) MYBonjourBrowser *bonjourBrowser;
    1.25 +
    1.26  /** The service's name. */
    1.27  @property (readonly) NSString *name;
    1.28  
    1.29 @@ -81,10 +85,11 @@
    1.30  
    1.31  /** Designated initializer. You probably don't want to create MYBonjourService instances yourself,
    1.32      but if you subclass you might need to override this initializer. */
    1.33 -- (id) initWithName: (NSString*)serviceName
    1.34 -               type: (NSString*)type
    1.35 -             domain: (NSString*)domain
    1.36 -          interface: (UInt32)interfaceIndex;
    1.37 +- (id) initWithBrowser: (MYBonjourBrowser*)browser
    1.38 +                  name: (NSString*)serviceName
    1.39 +                  type: (NSString*)type
    1.40 +                domain: (NSString*)domain
    1.41 +             interface: (UInt32)interfaceIndex;
    1.42  
    1.43  /** Called when this service is officially added to its browser's service set.
    1.44      You can override this, but be sure to call the superclass method. */