Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qbluetoothlocaldevice_winrt.cpp File Reference

(3d234d3b182f1759ecf8e5c092948c15f5c3ea4c)

#include <private/qbluetoothutils_winrt_p.h>
#include "qbluetoothlocaldevice.h"
#include "qbluetoothaddress.h"
#include "qbluetoothdevicewatcher_winrt_p.h"
#include "qbluetoothlocaldevice_p.h"
#include "qbluetoothutils_winrt_p.h"
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Devices.Enumeration.h>
#include <winrt/Windows.Devices.Bluetooth.h>
#include <winrt/Windows.Devices.Radios.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QElapsedTimer>
#include <QtCore/QLoggingCategory>
#include <QtCore/QMutex>
#include <QtCore/QPointer>
#include <QtCore/QTimer>
#include "qbluetoothlocaldevice_winrt.moc"
+ Include dependency graph for qbluetoothlocaldevice_winrt.cpp:

Go to the source code of this file.

Classes

class  WatcherWrapper
 
class  AdapterManager
 
struct  BluetoothInfo
 
struct  PairingWorker
 

Functions

template<typename T >
static QT_BEGIN_NAMESPACE bool await (IAsyncOperation< T > &&asyncInfo, T &result, uint timeout=0)
 
static QBluetoothLocalDevice::HostMode adjustHostMode (QBluetoothLocalDevice::HostMode mode)
 
static QBluetoothLocalDevice::HostMode modeFromWindowsBluetoothState (RadioState state)
 
static RadioState windowsStateFromMode (QBluetoothLocalDevice::HostMode mode)
 
static BluetoothInfo getBluetoothInfo (winrt::hstring id)
 
static DeviceInformationCollection getAvailableAdapters ()
 
DeviceInformationPairing pairingInfoFromAddress (const QBluetoothAddress &address)
 

Variables

static const int kMaximumAttempts = 5
 

Function Documentation

◆ adjustHostMode()

◆ await()

template<typename T >
static QT_BEGIN_NAMESPACE bool await ( IAsyncOperation< T > && asyncInfo,
T & result,
uint timeout = 0 )
static

Definition at line 37 of file qbluetoothlocaldevice_winrt.cpp.

References QCoreApplication::processEvents(), QTimer::start(), and timer.

Referenced by getAvailableAdapters(), getBluetoothInfo(), PairingWorker::pairAsync(), pairingInfoFromAddress(), QGeoPositionInfoSourceWinRT::requestAccess(), and AdapterManager::updateMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvailableAdapters()

static DeviceInformationCollection getAvailableAdapters ( )
static

Definition at line 457 of file qbluetoothlocaldevice_winrt.cpp.

References await().

+ Here is the call graph for this function:

◆ getBluetoothInfo()

static BluetoothInfo getBluetoothInfo ( winrt::hstring id)
static

Definition at line 361 of file qbluetoothlocaldevice_winrt.cpp.

References await(), and device.

+ Here is the call graph for this function:

◆ modeFromWindowsBluetoothState()

static QBluetoothLocalDevice::HostMode modeFromWindowsBluetoothState ( RadioState state)
static

Definition at line 64 of file qbluetoothlocaldevice_winrt.cpp.

References QBluetoothLocalDevice::HostConnectable, QBluetoothLocalDevice::HostPoweredOff, and state.

Referenced by AdapterManager::addClient().

+ Here is the caller graph for this function:

◆ pairingInfoFromAddress()

DeviceInformationPairing pairingInfoFromAddress ( const QBluetoothAddress & address)

Definition at line 465 of file qbluetoothlocaldevice_winrt.cpp.

References await(), and device.

Referenced by PairingWorker::pairAsync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ windowsStateFromMode()

static RadioState windowsStateFromMode ( QBluetoothLocalDevice::HostMode mode)
static

Definition at line 70 of file qbluetoothlocaldevice_winrt.cpp.

References QBluetoothLocalDevice::HostPoweredOff.

Referenced by AdapterManager::updateMode().

+ Here is the caller graph for this function:

Variable Documentation

◆ kMaximumAttempts

const int kMaximumAttempts = 5
static

Definition at line 310 of file qbluetoothlocaldevice_winrt.cpp.