This file is indexed.

/usr/share/qt5/doc/qtbluetooth/qbluetoothdevicediscoveryagent.html is in qtconnectivity5-doc-html 5.7.1~20161021-2.

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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qbluetoothdevicediscoveryagent.cpp -->
  <title>QBluetoothDeviceDiscoveryAgent Class | Qt Bluetooth 5.7</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    window.onload = function(){document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");};
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.7</td><td ><a href="qtbluetooth-index.html">Qt Bluetooth</a></td><td ><a href="qtbluetooth-module.html">C++ Classes</a></td><td >QBluetoothDeviceDiscoveryAgent</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.7.1 Reference Documentation</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="#properties">Properties</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="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QBluetoothDeviceDiscoveryAgent Class</h1>
<!-- $$$QBluetoothDeviceDiscoveryAgent-brief -->
<p>The <a href="qbluetoothdevicediscoveryagent.html">QBluetoothDeviceDiscoveryAgent</a> class discovers the Bluetooth devices nearby. <a href="#details">More...</a></p>
<!-- @@@QBluetoothDeviceDiscoveryAgent -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QBluetoothDeviceDiscoveryAgent&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="qbluetoothdevicediscoveryagent-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="qbluetoothdevicediscoveryagent.html#Error-enum">Error</a></b> { NoError, PoweredOffError, InputOutputError, InvalidBluetoothAdapterError, UnsupportedPlatformError, UnknownError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#InquiryType-enum">InquiryType</a></b> { GeneralUnlimitedInquiry, LimitedInquiry }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qbluetoothdevicediscoveryagent.html#inquiryType-prop">inquiryType</a></b> : QBluetoothDeviceDiscoveryAgent::InquiryType</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<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="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></b>(QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent-1">QBluetoothDeviceDiscoveryAgent</a></b>(const QBluetoothAddress &amp;<i>deviceAdapter</i>, QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#dtor.QBluetoothDeviceDiscoveryAgent">~QBluetoothDeviceDiscoveryAgent</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QBluetoothDeviceInfo&gt; </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#discoveredDevices">discoveredDevices</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#errorString">errorString</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothDeviceDiscoveryAgent::InquiryType </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#inquiryType-prop">inquiryType</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#isActive">isActive</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#inquiryType-prop">setInquiryType</a></b>(QBluetoothDeviceDiscoveryAgent::InquiryType <i>type</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="qbluetoothdevicediscoveryagent.html#start">start</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#stop">stop</a></b>()</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="qbluetoothdevicediscoveryagent.html#canceled">canceled</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#deviceDiscovered">deviceDiscovered</a></b>(const QBluetoothDeviceInfo &amp;<i>info</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#error-1">error</a></b>(QBluetoothDeviceDiscoveryAgent::Error <i>error</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothdevicediscoveryagent.html#finished">finished</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">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>
<!-- $$$QBluetoothDeviceDiscoveryAgent-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qbluetoothdevicediscoveryagent.html">QBluetoothDeviceDiscoveryAgent</a> class discovers the Bluetooth devices nearby.</p>
<p>To discover the nearby Bluetooth devices:</p>
<ul>
<li>create an instance of <a href="qbluetoothdevicediscoveryagent.html">QBluetoothDeviceDiscoveryAgent</a>,</li>
<li>connect to either the <a href="qbluetoothdevicediscoveryagent.html#deviceDiscovered">deviceDiscovered</a>() or <a href="qbluetoothdevicediscoveryagent.html#finished">finished</a>() signals,</li>
<li>and call <a href="qbluetoothdevicediscoveryagent.html#start">start</a>().</li>
</ul>
<pre class="cpp">

  <span class="type">void</span> MyClass<span class="operator">::</span>startDeviceDiscovery()
  {

      <span class="comment">// Create a discovery agent and connect to its signals</span>
      <span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span> <span class="operator">*</span>discoveryAgent <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span>(<span class="keyword">this</span>);
      connect(discoveryAgent<span class="operator">,</span> SIGNAL(deviceDiscovered(<span class="type"><a href="qbluetoothdeviceinfo.html">QBluetoothDeviceInfo</a></span>))<span class="operator">,</span>
              <span class="keyword">this</span><span class="operator">,</span> SLOT(deviceDiscovered(<span class="type"><a href="qbluetoothdeviceinfo.html">QBluetoothDeviceInfo</a></span>)));

      <span class="comment">// Start a discovery</span>
      discoveryAgent<span class="operator">-</span><span class="operator">&gt;</span>start();

      <span class="comment">//...</span>
  }

  <span class="comment">// In your local slot, read information about the found devices</span>
  <span class="type">void</span> MyClass<span class="operator">::</span>deviceDiscovered(<span class="keyword">const</span> <span class="type"><a href="qbluetoothdeviceinfo.html">QBluetoothDeviceInfo</a></span> <span class="operator">&amp;</span>device)
  {
      <a href="../qtcore/qtglobal.html#qDebug">qDebug</a>() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Found new device:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> device<span class="operator">.</span>name() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="char">'('</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> device<span class="operator">.</span>address()<span class="operator">.</span>toString() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="char">')'</span>;
  }

</pre>
<p>To retrieve results asynchronously, connect to the <a href="qbluetoothdevicediscoveryagent.html#deviceDiscovered">deviceDiscovered</a>() signal. To get a list of all discovered devices, call <a href="qbluetoothdevicediscoveryagent.html#discoveredDevices">discoveredDevices</a>() after the <a href="qbluetoothdevicediscoveryagent.html#finished">finished</a>() signal.</p>
<p>This class can be used to discover Classic and Low Energy Bluetooth devices. The individual device type can be determined via the <a href="qbluetoothdeviceinfo.html#coreConfigurations">QBluetoothDeviceInfo::coreConfigurations</a>() attribute. In most cases the list returned by <a href="qbluetoothdevicediscoveryagent.html#discoveredDevices">discoveredDevices</a>() contains both types of devices. However not every platform can detect both types of devices. On platforms with this limitation (for example iOS only suports Low Energy discovery), the discovery process will limit the search to the type which is supported.</p>
<p><b>Note: </b>Since Android 6.0 the ability to detect devices requires ACCESS_COARSE_LOCATION.</p></div>
<!-- @@@QBluetoothDeviceDiscoveryAgent -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$InputOutputError$$$PoweredOffError$$$InvalidBluetoothAdapterError$$$UnsupportedPlatformError$$$UnknownError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QBluetoothDeviceDiscoveryAgent::<span class="name">Error</span></h3>
<p>Indicates all possible error conditions found during Bluetooth device discovery.</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>QBluetoothDeviceDiscoveryAgent::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No error has occurred.</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::PoweredOffError</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The Bluetooth adaptor is powered off, power it on before doing discovery.</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::InputOutputError</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Writing or reading from the device resulted in an error.</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::InvalidBluetoothAdapterError</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The passed local adapter address does not match the physical adapter address of any local Bluetooth device.</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::UnsupportedPlatformError</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Device discovery is not possible or implemented on the current platform. The error is set in response to a call to <a href="qbluetoothdevicediscoveryagent.html#start">start</a>(). An example for such cases are iOS versions below 5.0 which do not support Bluetooth device search at all. This value was introduced by Qt 5.5&#x2e;</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::UnknownError</code></td><td class="topAlign tblval"><code>100</code></td><td class="topAlign">An unknown error has occurred.</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$InquiryType$$$GeneralUnlimitedInquiry$$$LimitedInquiry -->
<h3 class="fn" id="InquiryType-enum"><a name="InquiryType-enum"></a>enum QBluetoothDeviceDiscoveryAgent::<span class="name">InquiryType</span></h3>
<p>This enum describes the inquiry type used while discovering 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>QBluetoothDeviceDiscoveryAgent::GeneralUnlimitedInquiry</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A general unlimited inquiry. Discovers all visible Bluetooth devices in the local vicinity.</td></tr>
<tr><td class="topAlign"><code>QBluetoothDeviceDiscoveryAgent::LimitedInquiry</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A limited inquiry discovers devices that are in limited inquiry mode.</td></tr>
</table></div>
<p>LimitedInquiry is not supported on all platforms. If it is requested on a platform that does not support it, GeneralUnlimitedInquiry will be used instead. Setting LimitedInquiry is useful for multi-player Bluetooth-based games that needs faster communication between the devices. The phone scans for devices in LimitedInquiry and Service Discovery is done on one or two devices to speed up the service scan. After the game has connected to the device it intended to, the device returns to GeneralUnlimitedInquiry.</p>
<!-- @@@InquiryType -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$inquiryType-prop$$$inquiryType$$$setInquiryTypeQBluetoothDeviceDiscoveryAgent::InquiryType -->
<h3 class="fn" id="inquiryType-prop"><a name="inquiryType-prop"></a><span class="name">inquiryType</span> : <span class="type"><a href="qbluetoothdevicediscoveryagent.html#InquiryType-enum">QBluetoothDeviceDiscoveryAgent::InquiryType</a></span></h3>
<p>This property holds type of inquiry scan to be used while discovering devices.</p>
<p>This property affects the type of inquiry scan which is performed while discovering devices.</p>
<p>By default, this property is set to <a href="qbluetoothdevicediscoveryagent.html#InquiryType-enum">GeneralUnlimitedInquiry</a>.</p>
<p>Not all platforms support <a href="qbluetoothdevicediscoveryagent.html#InquiryType-enum">LimitedInquiry</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QBluetoothDeviceDiscoveryAgent::InquiryType </td><td class="memItemRight bottomAlign"><span class="name"><b>inquiryType</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setInquiryType</b></span>(QBluetoothDeviceDiscoveryAgent::InquiryType <i>type</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qbluetoothdevicediscoveryagent.html#InquiryType-enum">InquiryType</a>.</p>
<!-- @@@inquiryType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QBluetoothDeviceDiscoveryAgent[overload1]$$$QBluetoothDeviceDiscoveryAgentQObject* -->
<h3 class="fn" id="QBluetoothDeviceDiscoveryAgent"><a name="QBluetoothDeviceDiscoveryAgent"></a>QBluetoothDeviceDiscoveryAgent::<span class="name">QBluetoothDeviceDiscoveryAgent</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a new Bluetooth device discovery agent with parent <i>parent</i>.</p>
<!-- @@@QBluetoothDeviceDiscoveryAgent -->
<!-- $$$QBluetoothDeviceDiscoveryAgent$$$QBluetoothDeviceDiscoveryAgentconstQBluetoothAddress&QObject* -->
<h3 class="fn" id="QBluetoothDeviceDiscoveryAgent-1"><a name="QBluetoothDeviceDiscoveryAgent-1"></a>QBluetoothDeviceDiscoveryAgent::<span class="name">QBluetoothDeviceDiscoveryAgent</span>(const <span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> &amp;<i>deviceAdapter</i>, <span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a new Bluetooth device discovery agent with <i>parent</i>.</p>
<p>It uses <i>deviceAdapter</i> for the device search. If <i>deviceAdapter</i> is default constructed the resulting <a href="qbluetoothdevicediscoveryagent.html">QBluetoothDeviceDiscoveryAgent</a> object will use the local default Bluetooth adapter.</p>
<p>If a <i>deviceAdapter</i> is specified that is not a local adapter <a href="qbluetoothdevicediscoveryagent.html#error">error</a>() will be set to <a href="qbluetoothdevicediscoveryagent.html#Error-enum">InvalidBluetoothAdapterError</a>. Therefore it is recommended to test the error flag immediately after using this constructor.</p>
<p><b>See also </b><a href="qbluetoothdevicediscoveryagent.html#error">error</a>().</p>
<!-- @@@QBluetoothDeviceDiscoveryAgent -->
<!-- $$$~QBluetoothDeviceDiscoveryAgent[overload1]$$$~QBluetoothDeviceDiscoveryAgent -->
<h3 class="fn" id="dtor.QBluetoothDeviceDiscoveryAgent"><a name="dtor.QBluetoothDeviceDiscoveryAgent"></a>QBluetoothDeviceDiscoveryAgent::<span class="name">~QBluetoothDeviceDiscoveryAgent</span>()</h3>
<p>Destructor for ~<a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a>()</p>
<!-- @@@~QBluetoothDeviceDiscoveryAgent -->
<!-- $$$canceled[overload1]$$$canceled -->
<h3 class="fn" id="canceled"><a name="canceled"></a><code>[signal] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">canceled</span>()</h3>
<p>This signal is emitted when device discovery is aborted by a call to <a href="qbluetoothdevicediscoveryagent.html#stop">stop</a>().</p>
<!-- @@@canceled -->
<!-- $$$deviceDiscovered[overload1]$$$deviceDiscoveredconstQBluetoothDeviceInfo& -->
<h3 class="fn" id="deviceDiscovered"><a name="deviceDiscovered"></a><code>[signal] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">deviceDiscovered</span>(const <span class="type"><a href="qbluetoothdeviceinfo.html">QBluetoothDeviceInfo</a></span> &amp;<i>info</i>)</h3>
<p>This signal is emitted when the Bluetooth device described by <i>info</i> is discovered.</p>
<p>The signal is emitted as soon as the most important device information has been collected. However, as long as the <a href="qbluetoothdevicediscoveryagent.html#finished">finished</a>() signal has not been emitted the information collection continues even for already discovered devices. This is particularly true for signal strength information (RSSI). If signal strength information is required it is advisable to retrieve the device information via <a href="qbluetoothdevicediscoveryagent.html#discoveredDevices">discoveredDevices</a>() once the discovery has finished. This will yield the most recent RSSI information.</p>
<p><b>See also </b><a href="qbluetoothdeviceinfo.html#rssi">QBluetoothDeviceInfo::rssi</a>().</p>
<!-- @@@deviceDiscovered -->
<!-- $$$discoveredDevices[overload1]$$$discoveredDevices -->
<h3 class="fn" id="discoveredDevices"><a name="discoveredDevices"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qbluetoothdeviceinfo.html">QBluetoothDeviceInfo</a></span>&gt; QBluetoothDeviceDiscoveryAgent::<span class="name">discoveredDevices</span>() const</h3>
<p>Returns a list of all discovered Bluetooth devices.</p>
<!-- @@@discoveredDevices -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn" id="error"><a name="error"></a><span class="type"><a href="qbluetoothdevicediscoveryagent.html#Error-enum">Error</a></span> QBluetoothDeviceDiscoveryAgent::<span class="name">error</span>() const</h3>
<p>Returns the last error.</p>
<!-- @@@error -->
<!-- $$$error$$$errorQBluetoothDeviceDiscoveryAgent::Error -->
<h3 class="fn" id="error-1"><a name="error-1"></a><code>[signal] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">error</span>(<span class="type"><a href="qbluetoothdevicediscoveryagent.html#Error-enum">QBluetoothDeviceDiscoveryAgent::Error</a></span> <i>error</i>)</h3>
<p>This signal is emitted when an <i>error</i> occurs during Bluetooth device discovery. The <i>error</i> parameter describes the error that occurred.</p>
<p><b>Note:</b> Signal <i>error</i> is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:<pre class="cpp">

  connect(bluetoothDeviceDiscoveryAgent<span class="operator">,</span> <span class="keyword">static_cast</span><span class="operator">&lt;</span><span class="type">void</span>(<span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span><span class="operator">::</span><span class="operator">*</span>)(<span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span><span class="operator">::</span>Error)<span class="operator">&gt;</span>(<span class="operator">&amp;</span><span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span><span class="operator">::</span>error)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type"><a href="qbluetoothdevicediscoveryagent.html#QBluetoothDeviceDiscoveryAgent">QBluetoothDeviceDiscoveryAgent</a></span><span class="operator">::</span>Error error){ <span class="comment">/* ... */</span> });

</pre>
<p><b>See also </b><a href="qbluetoothdevicediscoveryagent.html#error">error</a>() and <a href="qbluetoothdevicediscoveryagent.html#errorString">errorString</a>().</p>
<!-- @@@error -->
<!-- $$$errorString[overload1]$$$errorString -->
<h3 class="fn" id="errorString"><a name="errorString"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QBluetoothDeviceDiscoveryAgent::<span class="name">errorString</span>() const</h3>
<p>Returns a human-readable description of the last error.</p>
<!-- @@@errorString -->
<!-- $$$finished[overload1]$$$finished -->
<h3 class="fn" id="finished"><a name="finished"></a><code>[signal] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">finished</span>()</h3>
<p>This signal is emitted when Bluetooth device discovery completes. The signal is not going to be emitted if the device discovery finishes with an error.</p>
<!-- @@@finished -->
<!-- $$$isActive[overload1]$$$isActive -->
<h3 class="fn" id="isActive"><a name="isActive"></a><span class="type">bool</span> QBluetoothDeviceDiscoveryAgent::<span class="name">isActive</span>() const</h3>
<p>Returns true if the agent is currently discovering Bluetooth devices, otherwise returns false.</p>
<!-- @@@isActive -->
<!-- $$$start[overload1]$$$start -->
<h3 class="fn" id="start"><a name="start"></a><code>[slot] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">start</span>()</h3>
<p>Starts Bluetooth device discovery, if it is not already started.</p>
<p>The <a href="qbluetoothdevicediscoveryagent.html#deviceDiscovered">deviceDiscovered</a>() signal is emitted as each device is discovered. The <a href="qbluetoothdevicediscoveryagent.html#finished">finished</a>() signal is emitted once device discovery is complete.</p>
<!-- @@@start -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn" id="stop"><a name="stop"></a><code>[slot] </code><span class="type">void</span> QBluetoothDeviceDiscoveryAgent::<span class="name">stop</span>()</h3>
<p>Stops Bluetooth device discovery. The cancel() signal is emitted once the device discovery is canceled. <a href="qbluetoothdevicediscoveryagent.html#start">start</a>() maybe called before the cancel signal is received. Once <a href="qbluetoothdevicediscoveryagent.html#start">start</a>() has been called the cancel signal from the prior discovery will be discarded.</p>
<!-- @@@stop -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2016 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>