author | Jens Alfke <jens@mooseyard.com> |
Mon Jul 20 14:50:49 2009 -0700 (2009-07-20) | |
changeset 60 | dd637bdd214e |
permissions | -rw-r--r-- |
jens@28 | 1 |
// |
jens@28 | 2 |
// MYBonjourQuery.h |
jens@28 | 3 |
// MYNetwork |
jens@28 | 4 |
// |
jens@28 | 5 |
// Created by Jens Alfke on 4/24/09. |
jens@28 | 6 |
// Copyright 2009 Jens Alfke. All rights reserved. |
jens@28 | 7 |
// |
jens@28 | 8 |
|
jens@28 | 9 |
#import "MYDNSService.h" |
jens@28 | 10 |
@class MYBonjourService; |
jens@28 | 11 |
|
jens@28 | 12 |
|
jens@28 | 13 |
/** A query for a particular DNS record (TXT, NULL, etc.) of a Bonjour service. |
jens@28 | 14 |
This class is used internally by MYBonjourService to track the TXT record; |
jens@28 | 15 |
you won't need to use it directly, unless you're interested in the contents of some other |
jens@28 | 16 |
record (such as the NULL record that iChat's _presence._tcp service uses for buddy icons.) */ |
jens@28 | 17 |
@interface MYBonjourQuery : MYDNSService |
jens@28 | 18 |
{ |
jens@28 | 19 |
@private |
jens@28 | 20 |
MYBonjourService *_bonjourService; |
jens@28 | 21 |
uint16_t _recordType; |
jens@28 | 22 |
NSData *_recordData; |
jens@28 | 23 |
} |
jens@28 | 24 |
|
jens@28 | 25 |
/** Initializes a query for a particular service and record type. |
jens@28 | 26 |
@param service The Bonjour service to query |
jens@28 | 27 |
@param recordType The DNS record type, e.g. kDNSServiceType_TXT; see the enum in <dns_sd.h>. */ |
jens@28 | 28 |
- (id) initWithBonjourService: (MYBonjourService*)service |
jens@28 | 29 |
recordType: (uint16_t)recordType; |
jens@28 | 30 |
|
jens@28 | 31 |
/** The data of the DNS record, once it's been found. |
jens@28 | 32 |
This property is KV-observable. */ |
jens@28 | 33 |
@property (readonly,copy) NSData *recordData; |
jens@28 | 34 |
|
jens@28 | 35 |
@end |