This file is indexed.

/usr/share/qt5/doc/qtbluetooth/qbluetoothlocaldevice.html is in qtconnectivity5-doc-html 5.5.1-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<?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.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtbluetooth-index.html">Qt Bluetooth</a></li>
<li><a href="qtbluetooth-module.html">C++ Classes</a></li>
<li>QBluetoothLocalDevice</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </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><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></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> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothlocaldevice.html#QBluetoothLocalDevice-2">QBluetoothLocalDevice</a></b>(const QBluetoothAddress &amp;<i> address</i>, QObject *<i> parent</i> = 0)</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"> 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"> 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>, 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>
<ul>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<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> accept</i>)</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<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>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<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>
</table></div>
<ul>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<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>
</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"><code>0</code></td><td class="topAlign">No known error</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::PairingError</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">Error in pairing</td></tr>
<tr><td class="topAlign"><code>QBluetoothLocalDevice::UnknownError</code></td><td class="topAlign"><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"><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"><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"><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"><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 OS X, 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"><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"><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"><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"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i> parent</i> = 0)</h3>
<p>Constructs a <a href="qbluetoothlocaldevice.html">QBluetoothLocalDevice</a> with <i>parent</i>.</p>
<!-- @@@QBluetoothLocalDevice -->
<!-- $$$QBluetoothLocalDevice$$$QBluetoothLocalDeviceconstQBluetoothAddress&QObject* -->
<h3 class="fn" id="QBluetoothLocalDevice-2"><a name="QBluetoothLocalDevice-2"></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"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i> parent</i> = 0)</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>
<!-- @@@address -->
<!-- $$$allDevices[overload1]$$$allDevices -->
<h3 class="fn" id="allDevices"><a name="allDevices"></a><code>[static] </code><span class="type"><a href="../qtcore/qlist.html">QList</a></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 OS X, 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"><a href="../qtcore/qlist.html">QList</a></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 OS X, 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">HostMode</a></span> QBluetoothLocalDevice::<span class="name">hostMode</span>() const</h3>
<p>Returns the current host mode of this local Bluetooth device. On OS X, 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"><a href="../qtcore/qstring.html">QString</a></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> accept</i>)</h3>
<p>To be called after getting a <a href="qbluetoothlocaldevice.html#pairingDisplayConfirmation">pairingDisplayConfirmation</a>(). The <i>accept</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>
<!-- @@@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"><a href="../qtcore/qstring.html">QString</a></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 OS X, 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"><a href="../qtcore/qstring.html">QString</a></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">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 OS X it is not possible to power on/off Bluetooth. Please refer to the platform specific Bluetooth documentation for details.</p><!-- @@@powerOn -->
<!-- $$$requestPairing[overload1]$$$requestPairingconstQBluetoothAddress&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">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 BlackBerry <a href="qbluetoothlocaldevice.html#Pairing-enum">AuthorizedPaired</a> is not possible and will have the same behavior as Paired.</p>
<p>On OS X, 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 OS X, 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> 2015 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>