Re: kSearchOptionsDiscardCachedResults not working as expected.
Re: kSearchOptionsDiscardCachedResults not working as expected.
- Subject: Re: kSearchOptionsDiscardCachedResults not working as expected.
- From: John Iversen <email@hidden>
- Date: Wed, 9 Jul 2008 10:58:45 -0700
Hello,
New to the list (and bluetooth). It has been a pleasant and clearly
documented experience so far, but I have come up against one confusing
UI issue. Sorry if this question has already been covered, but I could
not find it in the archives.
I'm having a problem with cached bluetooth devices showing up in the
IOBluetoothDeviceSelectorController UI panel even when I don't want
them to. (This is on 10.5.4/9E17).
In particular, cached devices show up even when setting the options
field of IOBluetoothDeviceSearchAttributes to
kSearchOptionsDiscardCachedResults. I expected this to exclude any
cached results and start with a clean slate with the device inquiry
process.
(In addition, the display of cached devices doesn't obey restrictions
imposed by specifying IOBluetoothDeviceSearchDeviceAttributes, and
newly discovered devices chosen using this UI are cached even when the
"remember this device" checkbox is unchecked.)
Is my expectation of how these things should work wrong, or perhaps it
is my execution?
Thanks,
John
--- relevant code snippet ---
IOBluetoothDeviceSearchAttributes *searchAttributes =
malloc(1,sizeof(IOBluetoothDeviceSearchAttributes));
searchAttributes->options = kSearchOptionsDiscardCachedResults; //
doesn't work as expected
searchAttributes->maxResults = 0; //infinite
searchAttributes->deviceAttributeCount = 1;
searchAttributes->attributeList = deviceAttributes; //works correctly
to filter what new devices show up during inquiry, but doesn't affect
cached ones
IOBluetoothDeviceSelectorController *deviceSelector =
[IOBluetoothDeviceSelectorController deviceSelector];
[deviceSelector
setOptions:kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry
]; //is default from Leopard onwards
[deviceSelector setSearchAttributes:searchAttributes]; //narrow search
...after setting the UI text, the UI is invoked using [deviceSelector
runModal]
_______________________________________________
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