MYBonjourService Class Reference

Represents a Bonjour service discovered by a BonjourBrowser. More...

#import <MYBonjourService.h>

Inherits MYDNSService.

List of all members.

Public Member Functions

Protected
Advanced methods that may be overridden by subclasses, but should not be called directly.

(id) - initWithName:type:domain:interface:
 Designated initializer.
(void) - added
 Called when this service is officially added to its browser's service set.
(void) - removed
 Called when this service is officially removed to its browser's service set.
(void) - txtRecordChanged
 Called when this service's TXT record changes.
(void) - queryDidUpdate:
 Called when a query started by this service updates.

Properties

NSString * name
 The service's name.
NSString * type
 The service's type.
NSString * domain
 The service's domain.
NSString * fullName
 The service's full name -- the name, type and domain concatenated together.
uint32_t interfaceIndex
 The index of the network interface on which this service was found.

Addressing

Getting the IP address of the service

NSString * hostname
 The hostname of the machine providing this service.
UInt16 port
 The IP port number of this service on its host.
(MYAddressLookup *) - addressLookup
 Returns a MYDNSLookup object that resolves the raw IP address(es) of this service.

TXT and other DNS records

NSDictionary * txtRecord
 The service's metadata dictionary, from its DNS TXT record.
(NSString *) - txtStringForKey:
 A convenience to access a single property from the TXT record.
(MYBonjourQuery *) - queryForRecord:
 Starts a new MYBonjourQuery for the specified DNS record type of this service.


Detailed Description

Represents a Bonjour service discovered by a BonjourBrowser.


Member Function Documentation

- (void) added  

Called when this service is officially added to its browser's service set.

You can override this, but be sure to call the superclass method.

- (MYAddressLookup *) addressLookup  

Returns a MYDNSLookup object that resolves the raw IP address(es) of this service.

Subsequent calls to this method will always return the same object.

- (id) initWithName: (NSString*)  serviceName
type: (NSString*)  type
domain: (NSString*)  domain
interface: (UInt32)  interfaceIndex 

Designated initializer.

You probably don't want to create MYBonjourService instances yourself, but if you subclass you might need to override this initializer.

- (void) queryDidUpdate: (MYBonjourQuery*)  query  

Called when a query started by this service updates.

You can override this, but be sure to call the superclass method.

- (MYBonjourQuery *) queryForRecord: (UInt16)  recordType  

Starts a new MYBonjourQuery for the specified DNS record type of this service.

Parameters:
recordType The DNS record type, e.g. kDNSServiceType_TXT; see the enum in <dns_sd.h>.

- (void) removed  

Called when this service is officially removed to its browser's service set.

You can override this, but be sure to call the superclass method.

- (void) txtRecordChanged  

Called when this service's TXT record changes.

You can override this, but be sure to call the superclass method.

- (NSString *) txtStringForKey: (NSString*)  key  

A convenience to access a single property from the TXT record.


Property Documentation

- (NSString*) domain [read, assign]

The service's domain.

- (NSString*) fullName [read, copy]

The service's full name -- the name, type and domain concatenated together.

- (NSString *) hostname [read, copy]

The hostname of the machine providing this service.

- (uint32_t) interfaceIndex [read, assign]

The index of the network interface on which this service was found.

- (NSString*) name [read, assign]

The service's name.

- (UInt16) port [read, assign]

The IP port number of this service on its host.

- (NSString*) type [read, assign]

The service's type.


The documentation for this class was generated from the following files:

Generated on Wed Apr 29 13:35:35 2009 for MYNetwork by  doxygen 1.5.8