Re: kSearchOptionsDiscardCachedResults not working as expected.
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Hello, Thanks, John --- relevant code snippet --- _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... 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? 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] This email sent to site_archiver@lists.apple.com
participants (1)
-
John Iversen