summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/windows
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2015-09-28 21:15:28 +0300
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-10-13 13:09:38 +0000
commit797624ac0c5f0a7ee3dd0a938454d55cb8786373 (patch)
treecb834888381805b491d373d63ef4a5c5e0b4a284 /src/bluetooth/windows
parent3e7d0c6b62d2fd6acd2c8a64b8e007729843e088 (diff)
Windows: Simplify code related to enumerating of a local radios
It is the first stage to cleaning of the 'windows' directory. A shared code related to enumerating of a local adapters are moved to the QBluetoothLocalDevicePrivate class. Change-Id: I208b79c29cd1f906b6fed627d25c7b1310718581 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/windows')
-rw-r--r--src/bluetooth/windows/qwinclassicbluetooth.cpp42
-rw-r--r--src/bluetooth/windows/qwinclassicbluetooth_p.h2
2 files changed, 0 insertions, 44 deletions
diff --git a/src/bluetooth/windows/qwinclassicbluetooth.cpp b/src/bluetooth/windows/qwinclassicbluetooth.cpp
index 44a73c9e..88313ed7 100644
--- a/src/bluetooth/windows/qwinclassicbluetooth.cpp
+++ b/src/bluetooth/windows/qwinclassicbluetooth.cpp
@@ -51,48 +51,6 @@ RemoteDeviceDiscoveryResult::RemoteDeviceDiscoveryResult()
device.dwSize = sizeof(device);
}
-LocalRadiosDiscoveryResult enumerateLocalRadios()
-{
- BLUETOOTH_FIND_RADIO_PARAMS params;
- ::ZeroMemory(&params, sizeof(params));
- params.dwSize = sizeof(params);
-
- HANDLE hRadio = 0;
- const HBLUETOOTH_RADIO_FIND hSearch =
- ::BluetoothFindFirstRadio(&params, &hRadio);
-
- LocalRadiosDiscoveryResult result;
-
- if (!hSearch) {
- result.error = ::GetLastError();
- return result;
- }
-
- forever {
- BLUETOOTH_RADIO_INFO radio;
- ::ZeroMemory(&radio, sizeof(radio));
- radio.dwSize = sizeof(radio);
-
- const DWORD retval = ::BluetoothGetRadioInfo(hRadio, &radio);
- ::CloseHandle(hRadio);
-
- if (retval != ERROR_SUCCESS) {
- result.error = ::GetLastError();
- break;
- }
-
- result.radios.append(radio);
-
- if (!::BluetoothFindNextRadio(hSearch, &hRadio)) {
- result.error = ::GetLastError();
- break;
- }
- }
-
- ::BluetoothFindRadioClose(hSearch);
- return result;
-}
-
RemoteDeviceDiscoveryResult startDiscoveryOfFirstRemoteDevice()
{
BLUETOOTH_DEVICE_SEARCH_PARAMS searchParams;
diff --git a/src/bluetooth/windows/qwinclassicbluetooth_p.h b/src/bluetooth/windows/qwinclassicbluetooth_p.h
index 87c4093c..2ba255ce 100644
--- a/src/bluetooth/windows/qwinclassicbluetooth_p.h
+++ b/src/bluetooth/windows/qwinclassicbluetooth_p.h
@@ -61,8 +61,6 @@ struct RemoteDeviceDiscoveryResult
DWORD error;
};
-LocalRadiosDiscoveryResult enumerateLocalRadios();
-
RemoteDeviceDiscoveryResult startDiscoveryOfFirstRemoteDevice();
RemoteDeviceDiscoveryResult startDiscoveryOfNextRemoteDevice(HBLUETOOTH_DEVICE_FIND hSearch);
void cancelRemoteDevicesDiscovery(HBLUETOOTH_DEVICE_FIND hSearch);