<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qbluetooth.cpp --> <title>QBluetooth Namespace | Qt Bluetooth 5.11</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 ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtbluetooth-index.html">Qt Bluetooth</a></td><td >QBluetooth Namespace</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 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="#types">Types</a></li> <li class="level1"><a href="#functions">Functions</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">QBluetooth Namespace</h1> <!-- $$$QBluetooth-brief --> <p>The <a href="qbluetooth.html">QBluetooth</a> namespace provides classes and functions related to Bluetooth. <a href="#details">More...</a></p> <!-- @@@QBluetooth --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QBluetooth></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> </ul> <a name="types"></a> <h2 id="types">Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#AttAccessConstraint-enum">AttAccessConstraint</a></b> { AttAuthorizationRequired, AttAuthenticationRequired, AttEncryptionRequired }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#AttAccessConstraint-enum">AttAccessConstraints</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#QLowEnergyHandle-typedef">QLowEnergyHandle</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#Security-enum">Security</a></b> { NoSecurity, Authorization, Authentication, Encryption, Secure }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#Security-enum">SecurityFlags</a></b></td></tr> </table></div> <a name="functions"></a> <h2 id="functions">Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> QFlags<SecurityFlags::enum_type> </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c">operator|</a></b>(SecurityFlags::enum_type <i>f1</i>, SecurityFlags::enum_type <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QFlags<SecurityFlags::enum_type> </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-1">operator|</a></b>(SecurityFlags::enum_type <i>f1</i>, QFlags<SecurityFlags::enum_type> <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QIncompatibleFlag </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-2">operator|</a></b>(SecurityFlags::enum_type <i>f1</i>, int <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QFlags<AttAccessConstraints::enum_type> </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-3">operator|</a></b>(AttAccessConstraints::enum_type <i>f1</i>, AttAccessConstraints::enum_type <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QFlags<AttAccessConstraints::enum_type> </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-4">operator|</a></b>(AttAccessConstraints::enum_type <i>f1</i>, QFlags<AttAccessConstraints::enum_type> <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QIncompatibleFlag </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-5">operator|</a></b>(AttAccessConstraints::enum_type <i>f1</i>, int <i>f2</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qbluetooth.html#operator-7c-6">operator|</a></b>(<i>int</i>, <i>int</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QBluetooth-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qbluetooth.html">QBluetooth</a> namespace provides classes and functions related to Bluetooth.</p> </div> <!-- @@@QBluetooth --> <div class="types"> <h2>Type Documentation</h2> <!-- $$$AttAccessConstraint$$$AttAuthorizationRequired$$$AttAuthenticationRequired$$$AttEncryptionRequired --> <h3 class="flags" id="AttAccessConstraint-enum"><a name="AttAccessConstraint-enum"></a>enum QBluetooth::<span class="name">AttAccessConstraint</span><br/>flags QBluetooth::<span class="name">AttAccessConstraints</span></h3> <p>This enum describes the possible requirements for reading or writing an ATT attribute.</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>QBluetooth::AttAuthorizationRequired</code></td><td class="topAlign tblval"><code>0x1</code></td><td class="topAlign">The client needs authorization from the ATT server to access the attribute.</td></tr> <tr><td class="topAlign"><code>QBluetooth::AttAuthenticationRequired</code></td><td class="topAlign tblval"><code>0x2</code></td><td class="topAlign">The client needs to be authenticated to access the attribute.</td></tr> <tr><td class="topAlign"><code>QBluetooth::AttEncryptionRequired</code></td><td class="topAlign tblval"><code>0x4</code></td><td class="topAlign">The attribute can only be accessed if the connection is encrypted.</td></tr> </table></div> <p>This enum was introduced or modified in Qt 5.7.</p> <p>The AttAccessConstraints type is a typedef for <a href="../qtcore/qflags.html">QFlags</a><AttAccessConstraint>. It stores an OR combination of AttAccessConstraint values.</p> <!-- @@@AttAccessConstraint --> <!-- $$$QLowEnergyHandle --> <h3 class="fn" id="QLowEnergyHandle-typedef"><a name="QLowEnergyHandle-typedef"></a>typedef <span class="name">QLowEnergyHandle</span></h3> <p>Typedef for Bluetooth Low Energy ATT attribute handles.</p> <p>This typedef was introduced in Qt 5.4.</p> <!-- @@@QLowEnergyHandle --> <!-- $$$Security$$$NoSecurity$$$Authorization$$$Authentication$$$Encryption$$$Secure --> <h3 class="flags" id="Security-enum"><a name="Security-enum"></a>enum QBluetooth::<span class="name">Security</span><br/>flags QBluetooth::<span class="name">SecurityFlags</span></h3> <p>This enum describe the security requirements of a Bluetooth service.</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>QBluetooth::NoSecurity</code></td><td class="topAlign tblval"><code>0x00</code></td><td class="topAlign">The service does not require any security.</td></tr> <tr><td class="topAlign"><code>QBluetooth::Authorization</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">The service requires authorization by the user, unless the device is Authorized-Paired.</td></tr> <tr><td class="topAlign"><code>QBluetooth::Authentication</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">The service requires authentication. Device must be paired, and the user is prompted on connection unless the device is Authorized-Paired.</td></tr> <tr><td class="topAlign"><code>QBluetooth::Encryption</code></td><td class="topAlign tblval"><code>0x04</code></td><td class="topAlign">The service requires the communication link to be encrypted. This requires the device to be paired.</td></tr> <tr><td class="topAlign"><code>QBluetooth::Secure</code></td><td class="topAlign tblval"><code>0x08</code></td><td class="topAlign">The service requires the communication link to be secure. Simple Pairing from Bluetooth 2.1 or greater is required. Legacy pairing is not permitted.</td></tr> </table></div> <p>The SecurityFlags type is a typedef for <a href="../qtcore/qflags.html">QFlags</a><Security>. It stores an OR combination of Security values.</p> <!-- @@@Security --> </div> <div class="func"> <h2>Function Documentation</h2> <!-- $$$operator|[overload1]$$$operator|SecurityFlags::enum_typeSecurityFlags::enum_type --> <h3 class="fn" id="operator-7c"><a name="operator-7c"></a><span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">SecurityFlags::enum_type</span>> QBluetooth::<span class="name">operator|</span>(<span class="type">SecurityFlags::enum_type</span> <i>f1</i>, <span class="type">SecurityFlags::enum_type</span> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|SecurityFlags::enum_typeQFlags<SecurityFlags::enum_type> --> <h3 class="fn" id="operator-7c-1"><a name="operator-7c-1"></a><span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">SecurityFlags::enum_type</span>> QBluetooth::<span class="name">operator|</span>(<span class="type">SecurityFlags::enum_type</span> <i>f1</i>, <span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">SecurityFlags::enum_type</span>> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|SecurityFlags::enum_typeint --> <h3 class="fn" id="operator-7c-2"><a name="operator-7c-2"></a><span class="type"><a href="../qtcore/qincompatibleflag.html">QIncompatibleFlag</a></span> QBluetooth::<span class="name">operator|</span>(<span class="type">SecurityFlags::enum_type</span> <i>f1</i>, <span class="type">int</span> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|AttAccessConstraints::enum_typeAttAccessConstraints::enum_type --> <h3 class="fn" id="operator-7c-3"><a name="operator-7c-3"></a><span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">AttAccessConstraints::enum_type</span>> QBluetooth::<span class="name">operator|</span>(<span class="type">AttAccessConstraints::enum_type</span> <i>f1</i>, <span class="type">AttAccessConstraints::enum_type</span> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|AttAccessConstraints::enum_typeQFlags<AttAccessConstraints::enum_type> --> <h3 class="fn" id="operator-7c-4"><a name="operator-7c-4"></a><span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">AttAccessConstraints::enum_type</span>> QBluetooth::<span class="name">operator|</span>(<span class="type">AttAccessConstraints::enum_type</span> <i>f1</i>, <span class="type"><a href="../qtcore/qflags.html">QFlags</a></span><<span class="type">AttAccessConstraints::enum_type</span>> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|AttAccessConstraints::enum_typeint --> <h3 class="fn" id="operator-7c-5"><a name="operator-7c-5"></a><span class="type"><a href="../qtcore/qincompatibleflag.html">QIncompatibleFlag</a></span> QBluetooth::<span class="name">operator|</span>(<span class="type">AttAccessConstraints::enum_type</span> <i>f1</i>, <span class="type">int</span> <i>f2</i>)</h3> <!-- @@@operator| --> <!-- $$$operator|$$$operator|intint --> <h3 class="fn" id="operator-7c-6"><a name="operator-7c-6"></a><span class="type">int</span> QBluetooth::<span class="name">operator|</span>(<i>int</i>, <i>int</i>)</h3> <!-- @@@operator| --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 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>