1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/Bonjour/MYAddressLookup.h Mon Apr 27 09:03:56 2009 -0700
1.3 @@ -0,0 +1,42 @@
1.4 +//
1.5 +// MYAddressLookup.h
1.6 +// MYNetwork
1.7 +//
1.8 +// Created by Jens Alfke on 4/24/09.
1.9 +// Copyright 2009 Jens Alfke. All rights reserved.
1.10 +//
1.11 +
1.12 +#import "MYDNSService.h"
1.13 +
1.14 +
1.15 +/** An asynchronous DNS address lookup. Supports both Bonjour services and traditional hostnames. */
1.16 +@interface MYAddressLookup : MYDNSService
1.17 +{
1.18 + NSString *_hostname;
1.19 + UInt16 _interfaceIndex;
1.20 + NSMutableSet *_addresses;
1.21 + UInt16 _port;
1.22 + CFAbsoluteTime _expires;
1.23 +}
1.24 +
1.25 +/** Initializes the lookup with a DNS hostname. */
1.26 +- (id) initWithHostname: (NSString*)hostname;
1.27 +
1.28 +/** The port number; this will be copied into the resulting IPAddress objects.
1.29 + Defaults to zero, but you can set it before calling -start. */
1.30 +@property UInt16 port;
1.31 +
1.32 +/** The index of the network interface. You usually don't need to set this. */
1.33 +@property UInt16 interfaceIndex;
1.34 +
1.35 +/** The resulting address(es) of the host, as HostAddress objects. */
1.36 +@property (readonly) NSSet *addresses;
1.37 +
1.38 +/** How much longer the addresses will remain valid.
1.39 + If the value is zero, the addresses are no longer valid, and you should instead
1.40 + call -start again and wait for the 'addresses' property to update.
1.41 + If you set the service to continuous mode, addresses will never expire since the
1.42 + query will continue to update them. */
1.43 +@property (readonly) NSTimeInterval timeToLive;
1.44 +
1.45 +@end