Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 814a2b4c48f3ef6444b2ff5bf854d05a > files > 69

qtconnectivity5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qbluetoothlocaldevice.cpp -->
  <title>QBluetoothLocalDevice Class | Qt Bluetooth 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtbluetooth-index.html">Qt Bluetooth</a></td><td ><a href="qtbluetooth-module.html">C++ Classes</a></td><td >QBluetoothLocalDevice</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtbluetooth-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QBluetoothLocalDevice Class</h1>
<!-- $$$QBluetoothLocalDevice-brief -->
<p>The <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> class enables access to the local Bluetooth device. <a href="#details">More...</a></p>
<!-- @@@QBluetoothLocalDevice -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QBluetoothLocalDevice&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += bluetooth</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.2</td></tr></table></div><ul>
<li><a href="qbluetoothlocaldevice-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#Error-enum">Error</a></b> { NoError, PairingError, UnknownError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#HostMode-enum">HostMode</a></b> { HostPoweredOff, HostConnectable, HostDiscoverable, HostDiscoverableLimitedInquiry }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#Pairing-enum">Pairing</a></b> { Unpaired, Paired, AuthorizedPaired }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#QBluetoothLocalDevice">QBluetoothLocalDevice</a></b>(QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#QBluetoothLocalDevice-1">QBluetoothLocalDevice</a></b>(const QBluetoothAddress &amp;<i>address</i>, QObject *<i>parent</i> = ...)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#dtor.QBluetoothLocalDevice">~QBluetoothLocalDevice</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothAddress </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#address">address</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QBluetoothAddress&gt; </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#connectedDevices">connectedDevices</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothLocalDevice::HostMode </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#hostMode">hostMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#name">name</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothLocalDevice::Pairing </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#pairingStatus">pairingStatus</a></b>(const QBluetoothAddress &amp;<i>address</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#powerOn">powerOn</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#requestPairing">requestPairing</a></b>(const QBluetoothAddress &amp;<i>address</i>, QBluetoothLocalDevice::Pairing <i>pairing</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#setHostMode">setHostMode</a></b>(QBluetoothLocalDevice::HostMode <i>mode</i>)</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#pairingConfirmation">pairingConfirmation</a></b>(bool <i>confirmation</i>)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#deviceConnected">deviceConnected</a></b>(const QBluetoothAddress &amp;<i>address</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#deviceDisconnected">deviceDisconnected</a></b>(const QBluetoothAddress &amp;<i>address</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#error">error</a></b>(QBluetoothLocalDevice::Error <i>error</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#hostModeStateChanged">hostModeStateChanged</a></b>(QBluetoothLocalDevice::HostMode <i>state</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#pairingDisplayConfirmation">pairingDisplayConfirmation</a></b>(const QBluetoothAddress &amp;<i>address</i>, QString <i>pin</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#pairingDisplayPinCode">pairingDisplayPinCode</a></b>(const QBluetoothAddress &amp;<i>address</i>, QString <i>pin</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#pairingFinished">pairingFinished</a></b>(const QBluetoothAddress &amp;<i>address</i>, QBluetoothLocalDevice::Pairing <i>pairing</i>)</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QBluetoothHostInfo&gt; </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#allDevices">allDevices</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QBluetoothLocalDevice-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> class enables access to the local Bluetooth device.</p>
<p><a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> provides functions for getting and setting the state of local Bluetooth devices.</p>
<p>On iOS and Windows, this class cannot be used because the platform does not expose any data or API which may provide information on the local Bluetooth device.</p>
</div>
<!-- @@@QBluetoothLocalDevice -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$PairingError$$$UnknownError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QBluetoothLocalDevice::<span class="name">Error</span></h3>
<p>This enum describes errors that maybe returned</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No known error</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::PairingError</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Error in pairing</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::UnknownError</code></td><td class="topAlign tblval"><code>100</code></td><td class="topAlign">Unknown error</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$HostMode$$$HostPoweredOff$$$HostConnectable$$$HostDiscoverable$$$HostDiscoverableLimitedInquiry -->
<h3 class="fn" id="HostMode-enum"><a name="HostMode-enum"></a>enum QBluetoothLocalDevice::<span class="name">HostMode</span></h3>
<p>This enum describes the most of the local Bluetooth device.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::HostPoweredOff</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Power off the device</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::HostConnectable</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Remote Bluetooth devices can connect to the local Bluetooth device if they have previously been paired with it or otherwise know its address. This powers up the device if it was powered off.</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::HostDiscoverable</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Remote Bluetooth devices can discover the presence of the local Bluetooth device. The device will also be connectable, and powered on. On Android, this mode can only be active for a maximum of 5 minutes.</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::HostDiscoverableLimitedInquiry</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Remote Bluetooth devices can discover the presence of the local Bluetooth device when performing a limited inquiry. This should be used for locating services that are only made discoverable for a limited period of time. This can speed up discovery between gaming devices, as service discovery can be skipped on devices not in LimitedInquiry mode. In this mode, the device will be connectable and powered on, if required. This mode is is not supported on Android. On macOS, it is not possible to set the <a href="qbluetoothlocaldevice.html#hostMode">hostMode</a>() to HostConnectable or HostPoweredOff.</td></tr>
</table></div>
<!-- @@@HostMode -->
<!-- $$$Pairing$$$Unpaired$$$Paired$$$AuthorizedPaired -->
<h3 class="fn" id="Pairing-enum"><a name="Pairing-enum"></a>enum QBluetoothLocalDevice::<span class="name">Pairing</span></h3>
<p>This enum describes the pairing state between the two Bluetooth devices.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::Unpaired</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The Bluetooth devices are not paired.</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::Paired</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The Bluetooth devices are paired. The system will prompt the user for authorization when the remote device initiates a connection to the local device.</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::AuthorizedPaired</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The Bluetooth devices are paired. The system will not prompt the user for authorization when the remote device initiates a connection to the local device.</td></tr>
</table></div>
<!-- @@@Pairing -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QBluetoothLocalDevice[overload1]$$$QBluetoothLocalDeviceQObject* -->
<h3 class="fn" id="QBluetoothLocalDevice"><a name="QBluetoothLocalDevice"></a>QBluetoothLocalDevice::<span class="name">QBluetoothLocalDevice</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> with <i>parent</i>.</p>
<!-- @@@QBluetoothLocalDevice -->
<!-- $$$QBluetoothLocalDevice$$$QBluetoothLocalDeviceconstQBluetoothAddress&QObject* -->
<h3 class="fn" id="QBluetoothLocalDevice-1"><a name="QBluetoothLocalDevice-1"></a>QBluetoothLocalDevice::<span class="name">QBluetoothLocalDevice</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>, <span class="type">QObject</span> *<i>parent</i> = ...)</h3>
<p>Construct new <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> for <i>address</i>. If <i>address</i> is default constructed the resulting local device selects the local default device.</p>
<!-- @@@QBluetoothLocalDevice -->
<!-- $$$~QBluetoothLocalDevice[overload1]$$$~QBluetoothLocalDevice -->
<h3 class="fn" id="dtor.QBluetoothLocalDevice"><a name="dtor.QBluetoothLocalDevice"></a><code>[virtual] </code>QBluetoothLocalDevice::<span class="name">~QBluetoothLocalDevice</span>()</h3>
<p>Destroys the <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a>.</p>
<!-- @@@~QBluetoothLocalDevice -->
<!-- $$$address[overload1]$$$address -->
<h3 class="fn" id="address"><a name="address"></a><span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> QBluetoothLocalDevice::<span class="name">address</span>() const</h3>
<p>Returns the MAC address of this Bluetooth device.</p>
<p><b>Note: </b>On Android, this function always returns the constant value <code>02:00:00:00:00:00</code> as local address starting with Android 6.0&#x2e; The programmatic access to the device's local MAC address was removed.</p><!-- @@@address -->
<!-- $$$allDevices[overload1]$$$allDevices -->
<h3 class="fn" id="allDevices"><a name="allDevices"></a><code>[static] </code><span class="type">QList</span>&lt;<span class="type"><a href="qbluetoothhostinfo.html">QBluetoothHostInfo</a></span>&gt; QBluetoothLocalDevice::<span class="name">allDevices</span>()</h3>
<p>Returns a list of all available local Bluetooth devices. On macOS, there is only the &quot;default&quot; local device.</p>
<!-- @@@allDevices -->
<!-- $$$connectedDevices[overload1]$$$connectedDevices -->
<h3 class="fn" id="connectedDevices"><a name="connectedDevices"></a><span class="type">QList</span>&lt;<span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span>&gt; QBluetoothLocalDevice::<span class="name">connectedDevices</span>() const</h3>
<p>Returns the list of connected devices. This list is different from the list of currently paired devices.</p>
<p>On Android and macOS, it is not possible to retrieve a list of connected devices. It is only possible to listen to (dis)connect changes. For convenience, this class monitors all connect and disconnect events since its instanciation and returns the current list when calling this function. Therefore it is possible that this function returns an empty list shortly after creating an instance.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#deviceConnected">deviceConnected</a>() and <a href="qbluetoothlocaldevice.html#deviceDisconnected">deviceDisconnected</a>().</p>
<!-- @@@connectedDevices -->
<!-- $$$deviceConnected[overload1]$$$deviceConnectedconstQBluetoothAddress& -->
<h3 class="fn" id="deviceConnected"><a name="deviceConnected"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">deviceConnected</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>)</h3>
<p>This signal is emitted when the local device establishes a connection to a remote device with <i>address</i>.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#deviceDisconnected">deviceDisconnected</a>() and <a href="qbluetoothlocaldevice.html#connectedDevices">connectedDevices</a>().</p>
<!-- @@@deviceConnected -->
<!-- $$$deviceDisconnected[overload1]$$$deviceDisconnectedconstQBluetoothAddress& -->
<h3 class="fn" id="deviceDisconnected"><a name="deviceDisconnected"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">deviceDisconnected</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>)</h3>
<p>This signal is emitted when the local device disconnects from a remote Bluetooth device with <i>address</i>.</p>
<p>This function was introduced in  Qt 5.3.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#deviceConnected">deviceConnected</a>() and <a href="qbluetoothlocaldevice.html#connectedDevices">connectedDevices</a>().</p>
<!-- @@@deviceDisconnected -->
<!-- $$$error[overload1]$$$errorQBluetoothLocalDevice::Error -->
<h3 class="fn" id="error"><a name="error"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">error</span>(<span class="type"><a href="qbluetoothlocaldevice.html#Error-enum">QBluetoothLocalDevice::Error</a></span> <i>error</i>)</h3>
<p>Signal emitted if there's an exceptional <i>error</i> while pairing.</p>
<!-- @@@error -->
<!-- $$$hostMode[overload1]$$$hostMode -->
<h3 class="fn" id="hostMode"><a name="hostMode"></a><span class="type"><a href="qbluetoothlocaldevice.html#HostMode-enum">QBluetoothLocalDevice::HostMode</a></span> QBluetoothLocalDevice::<span class="name">hostMode</span>() const</h3>
<p>Returns the current host mode of this local Bluetooth device. On macOS, it is either <a href="qbluetoothlocaldevice.html#HostMode-enum">HostPoweredOff</a> or <a href="qbluetoothlocaldevice.html#HostMode-enum">HostConnectable</a>.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#setHostMode">setHostMode</a>().</p>
<!-- @@@hostMode -->
<!-- $$$hostModeStateChanged[overload1]$$$hostModeStateChangedQBluetoothLocalDevice::HostMode -->
<h3 class="fn" id="hostModeStateChanged"><a name="hostModeStateChanged"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">hostModeStateChanged</span>(<span class="type"><a href="qbluetoothlocaldevice.html#HostMode-enum">QBluetoothLocalDevice::HostMode</a></span> <i>state</i>)</h3>
<p>The <i>state</i> of the host has transitioned to a different <a href="qbluetoothlocaldevice.html#HostMode-enum">HostMode</a>.</p>
<!-- @@@hostModeStateChanged -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QBluetoothLocalDevice::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if the <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> represents an available local Bluetooth device; otherwise return false.</p>
<p>If the local Bluetooth adapter represented by an instance of this class is removed from the system (e.g&#x2e; removal of the underlying Bluetooth dongle) then this instance will become invalid. An already invalid <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> instance remains invalid even if the same Bluetooth adapter is returned to the system.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#allDevices">allDevices</a>().</p>
<!-- @@@isValid -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn" id="name"><a name="name"></a><span class="type">QString</span> QBluetoothLocalDevice::<span class="name">name</span>() const</h3>
<p>Returns the name assgined by the user to this Bluetooth device.</p>
<!-- @@@name -->
<!-- $$$pairingConfirmation[overload1]$$$pairingConfirmationbool -->
<h3 class="fn" id="pairingConfirmation"><a name="pairingConfirmation"></a><code>[slot] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">pairingConfirmation</span>(<span class="type">bool</span> <i>confirmation</i>)</h3>
<p>To be called after getting a <a href="qbluetoothlocaldevice.html#pairingDisplayConfirmation">pairingDisplayConfirmation</a>(). The <i>confirmation</i> parameter either accepts the pairing or rejects it.</p>
<p>Accepting a pairing always refers to the last pairing request issued via <a href="qbluetoothlocaldevice.html#requestPairing">requestPairing</a>().</p>
<p><b>Note: </b>This function requires BLUETOOTH_PRIVILEGED permission on Android which is generally not obtainable for 3rdparty. Android's default handler for pairing requests will do this on behalf of the user and the application can ignore this call. Nevertheless the proper Android calls are made in case the application does have the required permissions.</p><!-- @@@pairingConfirmation -->
<!-- $$$pairingDisplayConfirmation[overload1]$$$pairingDisplayConfirmationconstQBluetoothAddress&QString -->
<h3 class="fn" id="pairingDisplayConfirmation"><a name="pairingDisplayConfirmation"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">pairingDisplayConfirmation</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>, <span class="type">QString</span> <i>pin</i>)</h3>
<p>Signal by some platforms to display a pairing confirmation dialog for <i>address</i>. The user is asked to confirm the <i>pin</i> is the same on both devices. The <a href="qbluetoothlocaldevice.html#pairingConfirmation">pairingConfirmation</a>() function must be called to indicate if the user accepts or rejects the displayed pin.</p>
<p>This signal is only emitted for pairing requests issues by calling <a href="qbluetoothlocaldevice.html#requestPairing">requestPairing</a>(). On macOS, this method never gets called - there is a callback with a PIN (IOBluetooth), but it expects immediate reply yes/no - and there is no time to show any dialog or compare PINs.</p>
<p><b>See also </b><a href="qbluetoothlocaldevice.html#pairingConfirmation">pairingConfirmation</a>().</p>
<!-- @@@pairingDisplayConfirmation -->
<!-- $$$pairingDisplayPinCode[overload1]$$$pairingDisplayPinCodeconstQBluetoothAddress&QString -->
<h3 class="fn" id="pairingDisplayPinCode"><a name="pairingDisplayPinCode"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">pairingDisplayPinCode</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>, <span class="type">QString</span> <i>pin</i>)</h3>
<p>Signal by some platforms to display the <i>pin</i> to the user for <i>address</i>. The pin is automatically generated, and does not need to be confirmed.</p>
<p>This signal is only emitted for pairing requests issues by calling <a href="qbluetoothlocaldevice.html#requestPairing">requestPairing</a>().</p>
<!-- @@@pairingDisplayPinCode -->
<!-- $$$pairingFinished[overload1]$$$pairingFinishedconstQBluetoothAddress&QBluetoothLocalDevice::Pairing -->
<h3 class="fn" id="pairingFinished"><a name="pairingFinished"></a><code>[signal] </code><span class="type">void</span> QBluetoothLocalDevice::<span class="name">pairingFinished</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>, <span class="type"><a href="qbluetoothlocaldevice.html#Pairing-enum">QBluetoothLocalDevice::Pairing</a></span> <i>pairing</i>)</h3>
<p>Pairing or unpairing has completed with <i>address</i>. Current pairing status is in <i>pairing</i>. If the pairing request was not successful, this signal will not be emitted. The <a href="qbluetoothlocaldevice.html#error">error</a>() signal is emitted if the pairing request failed. The signal is only ever emitted for pairing requests which have previously requested by calling <a href="qbluetoothlocaldevice.html#requestPairing">requestPairing</a>() of the current object instance.</p>
<!-- @@@pairingFinished -->
<!-- $$$pairingStatus[overload1]$$$pairingStatusconstQBluetoothAddress& -->
<h3 class="fn" id="pairingStatus"><a name="pairingStatus"></a><span class="type"><a href="qbluetoothlocaldevice.html#Pairing-enum">QBluetoothLocalDevice::Pairing</a></span> QBluetoothLocalDevice::<span class="name">pairingStatus</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>) const</h3>
<p>Returns the current bluetooth pairing status of <i>address</i>, if it's unpaired, paired, or paired and authorized.</p>
<!-- @@@pairingStatus -->
<!-- $$$powerOn[overload1]$$$powerOn -->
<h3 class="fn" id="powerOn"><a name="powerOn"></a><span class="type">void</span> QBluetoothLocalDevice::<span class="name">powerOn</span>()</h3>
<p>Powers on the device after returning it to the <a href="qbluetoothlocaldevice.html#hostMode">hostMode</a>() state, if it was powered off.</p>
<p><b>Note: </b>Due to varying security policies on the supported platforms, this method may have differing behaviors on the various platforms. For example the system may ask the user for confirmation before turning Bluetooth on or off. On macOS it is not possible to power on/off Bluetooth. Please refer to the platform specific Bluetooth documentation for details.</p><!-- @@@powerOn -->
<!-- $$$requestPairing[overload1]$$$requestPairingconstQBluetoothAddress&QBluetoothLocalDevice::Pairing -->
<h3 class="fn" id="requestPairing"><a name="requestPairing"></a><span class="type">void</span> QBluetoothLocalDevice::<span class="name">requestPairing</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>address</i>, <span class="type"><a href="qbluetoothlocaldevice.html#Pairing-enum">QBluetoothLocalDevice::Pairing</a></span> <i>pairing</i>)</h3>
<p>Set the <i>pairing</i> status with <i>address</i>. The results are returned by the signal, <a href="qbluetoothlocaldevice.html#pairingFinished">pairingFinished</a>(). On Android and macOS, <a href="qbluetoothlocaldevice.html#Pairing-enum">AuthorizedPaired</a> is not possible and will have the same behavior as Paired.</p>
<p>On macOS, it is not possible to unpair a device. If Unpaired is requested, <a href="qbluetoothlocaldevice.html#pairingFinished">pairingFinished</a>() is immediately emitted although the device remains paired. It is possible to request the pairing for a previously unpaired device. In addition <a href="qbluetoothlocaldevice.html#Pairing-enum">AuthorizedPaired</a> has the same behavior as <a href="qbluetoothlocaldevice.html#Pairing-enum">Paired</a>.</p>
<p>Caution: creating a pairing may take minutes, and may require the user to acknowledge.</p>
<!-- @@@requestPairing -->
<!-- $$$setHostMode[overload1]$$$setHostModeQBluetoothLocalDevice::HostMode -->
<h3 class="fn" id="setHostMode"><a name="setHostMode"></a><span class="type">void</span> QBluetoothLocalDevice::<span class="name">setHostMode</span>(<span class="type"><a href="qbluetoothlocaldevice.html#HostMode-enum">QBluetoothLocalDevice::HostMode</a></span> <i>mode</i>)</h3>
<p>Sets the host mode of this local Bluetooth device to <i>mode</i>.</p>
<p><b>Note: </b>Due to varying security policies on the supported platforms, this method may have differing behaviors on the various platforms. For example the system may ask the user for confirmation before turning Bluetooth on or off and not all host modes may be supported. On macOS, it is not possbile to programmatically change the <a href="qbluetoothlocaldevice.html#hostMode">hostMode</a>(). A user can only switch Bluetooth on/off in the System Preferences. Please refer to the platform specific Bluetooth documentation for details.</p><p><b>See also </b><a href="qbluetoothlocaldevice.html#hostMode">hostMode</a>().</p>
<!-- @@@setHostMode -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>