/usr/share/qt5/doc/qtbluetooth/qbluetoothtransfermanager.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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qbluetoothtransfermanager.cpp -->
<title>QBluetoothTransferManager 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 >QBluetoothTransferManager</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-functions">Public Functions</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">QBluetoothTransferManager Class</h1>
<!-- $$$QBluetoothTransferManager-brief -->
<p>The <a href="qbluetoothtransfermanager.html">QBluetoothTransferManager</a> class transfers data to another device using Object Push Profile (OPP). <a href="#details">More...</a></p>
<!-- @@@QBluetoothTransferManager -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QBluetoothTransferManager></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="qbluetoothtransfermanager-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="qbluetoothtransfermanager.html#QBluetoothTransferManager">QBluetoothTransferManager</a></b>(QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qbluetoothtransfermanager.html#dtor.QBluetoothTransferManager">~QBluetoothTransferManager</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBluetoothTransferReply *</td><td class="memItemRight bottomAlign"><b><a href="qbluetoothtransfermanager.html#put">put</a></b>(const QBluetoothTransferRequest &<i>request</i>, QIODevice *<i>data</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="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="qbluetoothtransfermanager.html#finished">finished</a></b>(QBluetoothTransferReply *<i>reply</i>)</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 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<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>
<!-- $$$QBluetoothTransferManager-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qbluetoothtransfermanager.html">QBluetoothTransferManager</a> class transfers data to another device using Object Push Profile (OPP).</p>
<p><a href="qbluetoothtransfermanager.html">QBluetoothTransferManager</a> uses OBEX to send put commands to remote devices. A typical OBEX transfer is initialized as follows:</p>
<pre class="cpp">
<span class="comment">// Create a transfer manager</span>
<span class="type"><a href="qbluetoothtransfermanager.html#QBluetoothTransferManager">QBluetoothTransferManager</a></span> <span class="operator">*</span>transferManager <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qbluetoothtransfermanager.html#QBluetoothTransferManager">QBluetoothTransferManager</a></span>(<span class="keyword">this</span>);
<span class="comment">// Create the transfer request and file to be sent</span>
<span class="type"><a href="qbluetoothaddress.html">QBluetoothAddress</a></span> remoteAddress(<span class="string">"00:11:22:33:44:55:66"</span>);
<span class="type"><a href="qbluetoothtransferrequest.html">QBluetoothTransferRequest</a></span> request(remoteAddress);
<span class="type"><a href="../qtcore/qfile.html">QFile</a></span> <span class="operator">*</span>file <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="../qtcore/qfile.html">QFile</a></span>(<span class="string">"testfile.txt"</span>);
<span class="comment">// Ask the transfer manager to send it</span>
<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span> <span class="operator">*</span>reply <span class="operator">=</span> transferManager<span class="operator">-</span><span class="operator">></span>put(request<span class="operator">,</span> file);
<span class="keyword">if</span> (reply<span class="operator">-</span><span class="operator">></span>error() <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span><span class="operator">::</span>NoError) {
<span class="comment">// Connect to the reply's signals to be informed about the status and do cleanups when done</span>
<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span><span class="operator">::</span>connect(reply<span class="operator">,</span> SIGNAL(finished(<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span><span class="operator">*</span>))<span class="operator">,</span>
<span class="keyword">this</span><span class="operator">,</span> SLOT(transferFinished(<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span><span class="operator">*</span>)));
<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span><span class="operator">::</span>connect(reply<span class="operator">,</span> SIGNAL(error(<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span><span class="operator">::</span>TransferError))<span class="operator">,</span>
<span class="keyword">this</span><span class="operator">,</span> SLOT(error(<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span><span class="operator">::</span>TransferError)));
} <span class="keyword">else</span> {
<a href="../qtcore/qtglobal.html#qWarning">qWarning</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Cannot push testfile.txt:"</span> <span class="operator"><</span><span class="operator"><</span> reply<span class="operator">-</span><span class="operator">></span>errorString();
}
</pre>
<p>Note that this API is not currently supported on Android.</p>
</div>
<!-- @@@QBluetoothTransferManager -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QBluetoothTransferManager[overload1]$$$QBluetoothTransferManagerQObject* -->
<h3 class="fn" id="QBluetoothTransferManager"><a name="QBluetoothTransferManager"></a>QBluetoothTransferManager::<span class="name">QBluetoothTransferManager</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a new <a href="qbluetoothtransfermanager.html">QBluetoothTransferManager</a> with <i>parent</i>.</p>
<!-- @@@QBluetoothTransferManager -->
<!-- $$$~QBluetoothTransferManager[overload1]$$$~QBluetoothTransferManager -->
<h3 class="fn" id="dtor.QBluetoothTransferManager"><a name="dtor.QBluetoothTransferManager"></a>QBluetoothTransferManager::<span class="name">~QBluetoothTransferManager</span>()</h3>
<p>Destroys the <a href="qbluetoothtransfermanager.html">QBluetoothTransferManager</a>.</p>
<!-- @@@~QBluetoothTransferManager -->
<!-- $$$finished[overload1]$$$finishedQBluetoothTransferReply* -->
<h3 class="fn" id="finished"><a name="finished"></a><code>[signal] </code><span class="type">void</span> QBluetoothTransferManager::<span class="name">finished</span>(<span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span> *<i>reply</i>)</h3>
<p>This signal is emitted when the transfer for <i>reply</i> finishes.</p>
<!-- @@@finished -->
<!-- $$$put[overload1]$$$putconstQBluetoothTransferRequest&QIODevice* -->
<h3 class="fn" id="put"><a name="put"></a><span class="type"><a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a></span> *QBluetoothTransferManager::<span class="name">put</span>(const <span class="type"><a href="qbluetoothtransferrequest.html">QBluetoothTransferRequest</a></span> &<i>request</i>, <span class="type"><a href="../qtcore/qiodevice.html">QIODevice</a></span> *<i>data</i>)</h3>
<p>Sends the contents of <i>data</i> to the remote device identified by <i>request</i>, and returns a new <a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a> that can be used to track the request's progress. <i>data</i> must remain valid until the <a href="qbluetoothtransfermanager.html#finished">finished</a>() signal is emitted.</p>
<p>The returned <a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a> object must be immediately checked for its <a href="qbluetoothtransferreply.html#error">error()</a> state. This is required in case this function detects an error during the initialization of the <a href="qbluetoothtransferreply.html">QBluetoothTransferReply</a>. In such cases <a href="qbluetoothtransferreply.html#isFinished">QBluetoothTransferReply::isFinished</a>() returns <code>true</code> as well.</p>
<p>If the platform does not support the Object Push profile, this function will return <code>0</code>.</p>
<!-- @@@put -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</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>
|