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