Sophie

Sophie

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

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" />
<!-- qlowenergydescriptor.cpp -->
  <title>QLowEnergyDescriptor 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 >QLowEnergyDescriptor</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-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-variables">Protected Variables</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">QLowEnergyDescriptor Class</h1>
<!-- $$$QLowEnergyDescriptor-brief -->
<p>The <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> class stores information about the Bluetooth Low Energy descriptor. <a href="#details">More...</a></p>
<!-- @@@QLowEnergyDescriptor -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QLowEnergyDescriptor&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.4</td></tr></table></div><ul>
<li><a href="qlowenergydescriptor-members.html">List of all members, including inherited members</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="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#QLowEnergyDescriptor-1">QLowEnergyDescriptor</a></b>(const QLowEnergyDescriptor &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#dtor.QLowEnergyDescriptor">~QLowEnergyDescriptor</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLowEnergyHandle </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#handle">handle</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#name">name</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothUuid::DescriptorType </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#type">type</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothUuid </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#uuid">uuid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#value">value</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#operator-not-eq">operator!=</a></b>(const QLowEnergyDescriptor &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLowEnergyDescriptor &amp;</td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#operator-eq">operator=</a></b>(const QLowEnergyDescriptor &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#operator-eq-eq">operator==</a></b>(const QLowEnergyDescriptor &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="protected-variables"></a>
<h2 id="protected-variables">Protected Variables</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QSharedPointer&lt;QLowEnergyServicePrivate&gt; </td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#d_ptr-var">d_ptr</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLowEnergyDescriptorPrivate *</td><td class="memItemRight bottomAlign"><b><a href="qlowenergydescriptor.html#data-var">data</a></b></td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QLowEnergyDescriptor-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> class stores information about the Bluetooth Low Energy descriptor.</p>
<p><a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> provides information about a Bluetooth Low Energy descriptor's <a href="qlowenergydescriptor.html#name">name</a>(), <a href="qlowenergydescriptor.html#uuid">uuid</a>(), <a href="qlowenergydescriptor.html#value">value</a>() and <a href="qlowenergydescriptor.html#handle">handle</a>(). Descriptors are encapsulated by Bluetooth Low Energy characteristics and provide additional contextual information about the characteristic (data format, notification activation and so on).</p>
<p>The descriptor value may be written via the <a href="qlowenergyservice.html">QLowEnergyService</a> instance that manages the service to which this descriptor belongs. The <a href="qlowenergyservice.html#writeDescriptor">QLowEnergyService::writeDescriptor</a>() function writes the new value. The <a href="qlowenergyservice.html#descriptorWritten">QLowEnergyService::descriptorWritten</a>() signal is emitted upon success. The cached <a href="qlowenergydescriptor.html#value">value</a>() of this object is updated accordingly.</p>
</div>
<p><b>See also </b><a href="qlowenergyservice.html">QLowEnergyService</a> and <a href="qlowenergycharacteristic.html">QLowEnergyCharacteristic</a>.</p>
<!-- @@@QLowEnergyDescriptor -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QLowEnergyDescriptor[overload1]$$$QLowEnergyDescriptor -->
<h3 class="fn" id="QLowEnergyDescriptor"><a name="QLowEnergyDescriptor"></a>QLowEnergyDescriptor::<span class="name">QLowEnergyDescriptor</span>()</h3>
<p>Construct a new <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a>. A default-constructed instance of this class is always invalid.</p>
<!-- @@@QLowEnergyDescriptor -->
<!-- $$$QLowEnergyDescriptor$$$QLowEnergyDescriptorconstQLowEnergyDescriptor& -->
<h3 class="fn" id="QLowEnergyDescriptor-1"><a name="QLowEnergyDescriptor-1"></a>QLowEnergyDescriptor::<span class="name">QLowEnergyDescriptor</span>(const <span class="type"><a href="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></span> &amp;<i>other</i>)</h3>
<p>Construct a new <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> that is a copy of <i>other</i>.</p>
<p>The two copies continue to share the same underlying data which does not detach upon write.</p>
<!-- @@@QLowEnergyDescriptor -->
<!-- $$$~QLowEnergyDescriptor[overload1]$$$~QLowEnergyDescriptor -->
<h3 class="fn" id="dtor.QLowEnergyDescriptor"><a name="dtor.QLowEnergyDescriptor"></a>QLowEnergyDescriptor::<span class="name">~QLowEnergyDescriptor</span>()</h3>
<p>Destroys the <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> object.</p>
<!-- @@@~QLowEnergyDescriptor -->
<!-- $$$handle[overload1]$$$handle -->
<h3 class="fn" id="handle"><a name="handle"></a><span class="type"><a href="qbluetooth.html#QLowEnergyHandle-typedef">QLowEnergyHandle</a></span> QLowEnergyDescriptor::<span class="name">handle</span>() const</h3>
<p>Returns the handle of the descriptor or <code>0</code> if the handle cannot be accessed on the platform or the descriptor is invalid.</p>
<p><b>Note: </b>On macOS and iOS handles can differ from 0, but these values have no special meaning outside of internal/private API.</p><!-- @@@handle -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QLowEnergyDescriptor::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if the <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> object is valid, otherwise returns <code>false</code>.</p>
<p>An invalid descriptor instance is not associated with any service (default-constructed) or the associated service is no longer valid due to a disconnect from the underlying Bluetooth Low Energy device, for example. Once the object is invalid it cannot become valid anymore.</p>
<p><b>Note: </b>If a <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> instance turns invalid due to a disconnect from the underlying device, the information encapsulated by the current instance remains as it was at the time of the disconnect. Therefore it can be retrieved after the disconnect event.</p><!-- @@@isValid -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn" id="name"><a name="name"></a><span class="type">QString</span> QLowEnergyDescriptor::<span class="name">name</span>() const</h3>
<p>Returns the human-readable name of the descriptor.</p>
<p>The name is based on the descriptor's <a href="qlowenergydescriptor.html#type">type</a>(). The complete list of descriptor types can be found under <a href="https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx">Bluetooth.org Descriptors</a>.</p>
<p>The returned string is empty if the <a href="qlowenergydescriptor.html#type">type</a>() is unknown.</p>
<p><b>See also </b><a href="qlowenergydescriptor.html#type">type</a>() and <a href="qbluetoothuuid.html#descriptorToString">QBluetoothUuid::descriptorToString</a>().</p>
<!-- @@@name -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type"><a href="qbluetoothuuid.html#DescriptorType-enum">QBluetoothUuid::DescriptorType</a></span> QLowEnergyDescriptor::<span class="name">type</span>() const</h3>
<p>Returns the type of the descriptor.</p>
<p><b>See also </b><a href="qlowenergydescriptor.html#name">name</a>().</p>
<!-- @@@type -->
<!-- $$$uuid[overload1]$$$uuid -->
<h3 class="fn" id="uuid"><a name="uuid"></a><span class="type"><a href="qbluetoothuuid.html">QBluetoothUuid</a></span> QLowEnergyDescriptor::<span class="name">uuid</span>() const</h3>
<p>Returns the UUID of this descriptor if <a href="qlowenergydescriptor.html#isValid">isValid</a>() returns <code>true</code>; otherwise a null UUID.</p>
<!-- @@@uuid -->
<!-- $$$value[overload1]$$$value -->
<h3 class="fn" id="value"><a name="value"></a><span class="type">QByteArray</span> QLowEnergyDescriptor::<span class="name">value</span>() const</h3>
<p>Returns the cached value of the descriptor.</p>
<p>The cached descriptor value may be updated using <a href="qlowenergyservice.html#writeDescriptor">QLowEnergyService::writeDescriptor</a>() or <a href="qlowenergyservice.html#readDescriptor">QLowEnergyService::readDescriptor</a>().</p>
<!-- @@@value -->
<!-- $$$operator!=[overload1]$$$operator!=constQLowEnergyDescriptor& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QLowEnergyDescriptor::<span class="name">operator!=</span>(const <span class="type"><a href="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if <i>other</i> is not equal to this <a href="qlowenergycharacteristic.html">QLowEnergyCharacteristic</a>; otherwise <code>false</code>.</p>
<p>Two <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> instances are considered to be equal if they refer to the same descriptor on the same remote Bluetooth Low Energy device or both instances have been default-constructed.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQLowEnergyDescriptor& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></span> &amp;QLowEnergyDescriptor::<span class="name">operator=</span>(const <span class="type"><a href="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></span> &amp;<i>other</i>)</h3>
<p>Makes a copy of <i>other</i> and assigns it to this <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> object. The two copies continue to share the same service and controller details.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQLowEnergyDescriptor& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QLowEnergyDescriptor::<span class="name">operator==</span>(const <span class="type"><a href="qlowenergydescriptor.html#QLowEnergyDescriptor">QLowEnergyDescriptor</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if <i>other</i> is equal to this <a href="qlowenergycharacteristic.html">QLowEnergyCharacteristic</a>; otherwise <code>false</code>.</p>
<p>Two <a href="qlowenergydescriptor.html">QLowEnergyDescriptor</a> instances are considered to be equal if they refer to the same descriptor on the same remote Bluetooth Low Energy device or both instances have been default-constructed.</p>
<!-- @@@operator== -->
</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>