Problems with creating strings for a SDPServiceRecord using plists
Problems with creating strings for a SDPServiceRecord using plists
- Subject: Problems with creating strings for a SDPServiceRecord using plists
- From: Ron Wagner <email@hidden>
- Date: Tue, 27 Mar 2007 18:30:19 -0400
Message: 1
Date: Mon, 26 Mar 2007 21:52:51 +0100
From: Thomas Tempelmann <email@hidden>
Subject: Problems with creating strings for a SDPServiceRecord using
plists
To: "email@hidden" <email@hidden>
Message-ID: <C22DF133.391F%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
I believe I've found two bugs with the plist-to-SDP translation.
I had already written quite a long article about this but then lost
it all
due to a bug in MS Entourage. When I tried to invoke the "feedback"
page for
this product, I got an empty page. Go figure...
Anyways, here's what I found, in short:
1. Boolean entries should be translated into records of type
"Boolean", but
they instead they get stored as type "integer".
2. Even worse, I cannot seem to store non-textual bytes (e.g. byte
sequences
containing 0x00 etc.) as strings. This is even a bigger flaw as I
cannot
work around this other than doing it in code. Or does someone know
how I
would store a string with, say, 40 bytes, using the plist?
To store non-textual bytes, try using the "Data" data type in your
plist. If you have trouble creating the plist in Property List Editor
you can write it out programmatically by putting your data into a
CFData, then the CFData into a CFArray or CFDictionary, ...
http://developer.apple.com/documentation/CoreFoundation/Conceptual/
CFPropertyLists/index.html
Ron Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden