Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Panther and protocolSpecificInformation



Hey Andrew,

On Jun 1, 2005, at 9:01 PM, Andrew White wrote:

I don't suppose there's a category for NSNetService around that would allow Cocoa developers on 10.3.9 access to the TXTRecord routines?

Unfortunately, the NSNetService TXTRecord routines are only available in 10.4 and later.




I'm basically wanting an implementation of:

+ (NSData *)dataFromTXTRecordDictionary:(NSDictionary *)txtDictionary
+ (NSDictionary *)dictionaryFromTXTRecordData:(NSData *)txtData
- (BOOL)setTXTRecordData:(NSData *)recordData
- (NSData *)TXTRecordData

and perhaps support for

- netService:didUpdateTXTRecordData:

that I can compile (or just link) into a 10.3.9 application.

As an alternative, if I build my own TXT parsing code (or copy the stuff from mDNSResponder) will it 'just work' if I integrate it using protocolSpecificInformation, or does that use a completely different format? For my current project, I need interoperability with non-NSNetService code.

protocolSpecificInformation uses a different format than the native TXTRecord NSData, however, it should be easy to take the NSString returned by protocolSpecificInformation and convert it into an NSDictionary of key/value pairs. The following Q&A explains the differences in TXT record formats, although it needs to be updated to discuss the new TXTRecord NSNetService routines.


<http://developer.apple.com/qa/qa2001/qa1306.html>

Best Regards,

-Marc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Panther and protocolSpecificInformation (From: Andrew White <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.