/usr/share/qt5/doc/qtversit/qversitreader.html is in qtpim5-doc-html 5.0~git20140515~29475884-0ubuntu24~7.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qversitreader.cpp -->
<title>QVersitReader Class | Qt 5.0</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.0</td><td >QVersitReader</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.0.0 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="#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">QVersitReader Class</h1>
<!-- $$$QVersitReader-brief -->
<p>The <a href="qversitreader.html">QVersitReader</a> class provides an interface for reading versit documents such as vCards from a Stream. <a href="#details">More...</a></p>
<!-- @@@QVersitReader -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QVersitReader></span>
</td></tr></table></div><ul>
<li><a href="qversitreader-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="qversitreader.html#Error-enum">Error</a></b> { NoError, UnspecifiedError, IOError, OutOfMemoryError, NotReadyError, ParseError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#State-enum">State</a></b> { InactiveState, ActiveState, CanceledState, FinishedState }</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="qversitreader.html#QVersitReader">QVersitReader</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#QVersitReader-1">QVersitReader</a></b>(QIODevice *<i>inputDevice</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#QVersitReader-2">QVersitReader</a></b>(const QByteArray &<i>inputData</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#dtor.QVersitReader">~QVersitReader</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCodec *</td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#defaultCodec">defaultCodec</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice *</td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#device">device</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QVersitDocument> </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#results">results</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#setData">setData</a></b>(const QByteArray &<i>inputData</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#setDefaultCodec">setDefaultCodec</a></b>(QTextCodec *<i>codec</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#setDevice">setDevice</a></b>(QIODevice *<i>device</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#state">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#waitForFinished">waitForFinished</a></b>(int <i>msec</i> = -1)</td></tr>
</table></div>
<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="qversitreader.html#cancel">cancel</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#startReading">startReading</a></b>()</td></tr>
</table></div>
<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="qversitreader.html#resultsAvailable">resultsAvailable</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitreader.html#stateChanged">stateChanged</a></b>(QVersitReader::State <i>state</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QVersitReader-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qversitreader.html">QVersitReader</a> class provides an interface for reading versit documents such as vCards from a Stream.</p>
<p><a href="qversitreader.html">QVersitReader</a> concatenation of Versit documents such as vCards from a text stream and returns a list of <a href="qversitdocument.html">QVersitDocument</a> instances. <a href="qversitreader.html">QVersitReader</a> supports reading from an abstract I/O device which can be, for example, a file or a memory buffer. The reading can be done asynchronously, and the <a href="qversitreader.html#waitForFinished">waitForFinished</a>() function can be used to make a blocking read.</p>
</div>
<p><b>See also </b><a href="qversitdocument.html">QVersitDocument</a>.</p>
<!-- @@@QVersitReader -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$UnspecifiedError$$$IOError$$$OutOfMemoryError$$$NotReadyError$$$ParseError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QVersitReader::<span class="name">Error</span></h3>
<p>This enum specifies an error that occurred during the most recent operation:</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>QVersitReader::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The most recent operation was successful</td></tr>
<tr><td class="topAlign"><code>QVersitReader::UnspecifiedError</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The most recent operation failed for an undocumented reason</td></tr>
<tr><td class="topAlign"><code>QVersitReader::IOError</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The most recent operation failed because of a problem with the device</td></tr>
<tr><td class="topAlign"><code>QVersitReader::OutOfMemoryError</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The most recent operation failed due to running out of memory</td></tr>
<tr><td class="topAlign"><code>QVersitReader::NotReadyError</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The most recent operation failed because there is an operation in progress</td></tr>
<tr><td class="topAlign"><code>QVersitReader::ParseError</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The most recent operation failed because the input was malformed</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$State$$$InactiveState$$$ActiveState$$$CanceledState$$$FinishedState -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QVersitReader::<span class="name">State</span></h3>
<p>Enumerates the various states that a reader may be in at any given time</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>QVersitReader::InactiveState</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Read operation not yet started</td></tr>
<tr><td class="topAlign"><code>QVersitReader::ActiveState</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Read operation started, not yet finished</td></tr>
<tr><td class="topAlign"><code>QVersitReader::CanceledState</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Read operation is finished due to cancellation</td></tr>
<tr><td class="topAlign"><code>QVersitReader::FinishedState</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Read operation successfully completed</td></tr>
</table></div>
<!-- @@@State -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QVersitReader[overload1]$$$QVersitReader -->
<h3 class="fn" id="QVersitReader"><a name="QVersitReader"></a>QVersitReader::<span class="name">QVersitReader</span>()</h3>
<p>Constructs a new reader.</p>
<!-- @@@QVersitReader -->
<!-- $$$QVersitReader$$$QVersitReaderQIODevice* -->
<h3 class="fn" id="QVersitReader-1"><a name="QVersitReader-1"></a>QVersitReader::<span class="name">QVersitReader</span>(<span class="type">QIODevice</span> *<i>inputDevice</i>)</h3>
<p>Constructs a new reader that reads from <i>inputDevice</i>.</p>
<!-- @@@QVersitReader -->
<!-- $$$QVersitReader$$$QVersitReaderconstQByteArray& -->
<h3 class="fn" id="QVersitReader-2"><a name="QVersitReader-2"></a>QVersitReader::<span class="name">QVersitReader</span>(const <span class="type">QByteArray</span> &<i>inputData</i>)</h3>
<p>Constructs a new reader that reads from <i>inputData</i>.</p>
<!-- @@@QVersitReader -->
<!-- $$$~QVersitReader[overload1]$$$~QVersitReader -->
<h3 class="fn" id="dtor.QVersitReader"><a name="dtor.QVersitReader"></a>QVersitReader::<span class="name">~QVersitReader</span>()</h3>
<p>Frees the memory used by the reader. Waits until a pending asynchronous reading has been completed.</p>
<!-- @@@~QVersitReader -->
<!-- $$$cancel[overload1]$$$cancel -->
<h3 class="fn" id="cancel"><a name="cancel"></a><code>[slot] </code><span class="type">void</span> QVersitReader::<span class="name">cancel</span>()</h3>
<p>Attempts to asynchronously cancel the read request.</p>
<!-- @@@cancel -->
<!-- $$$defaultCodec[overload1]$$$defaultCodec -->
<h3 class="fn" id="defaultCodec"><a name="defaultCodec"></a><span class="type">QTextCodec</span> *QVersitReader::<span class="name">defaultCodec</span>() const</h3>
<p>Returns the codec the reader uses when parsing the input stream. If the codec is null, this denotes that the reader will try to detect the codec from the input.</p>
<p><b>See also </b><a href="qversitreader.html#setDefaultCodec">setDefaultCodec</a>().</p>
<!-- @@@defaultCodec -->
<!-- $$$device[overload1]$$$device -->
<h3 class="fn" id="device"><a name="device"></a><span class="type">QIODevice</span> *QVersitReader::<span class="name">device</span>() const</h3>
<p>Returns the device used for reading input, or 0 if no device has been set (or if the input source was set with <a href="qversitreader.html#setData">setData</a>().</p>
<p><b>See also </b><a href="qversitreader.html#setDevice">setDevice</a>().</p>
<!-- @@@device -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn" id="error"><a name="error"></a><span class="type"><a href="qversitreader.html#Error-enum">Error</a></span> QVersitReader::<span class="name">error</span>() const</h3>
<p>Returns the error encountered by the last operation.</p>
<!-- @@@error -->
<!-- $$$results[overload1]$$$results -->
<h3 class="fn" id="results"><a name="results"></a><span class="type">QList</span><<span class="type"><a href="qversitdocument.html">QVersitDocument</a></span>> QVersitReader::<span class="name">results</span>() const</h3>
<p>Returns the reading result. Even if there was an error or reading has not completed, a partial list of results may be returned.</p>
<!-- @@@results -->
<!-- $$$resultsAvailable[overload1]$$$resultsAvailable -->
<h3 class="fn" id="resultsAvailable"><a name="resultsAvailable"></a><code>[signal] </code><span class="type">void</span> QVersitReader::<span class="name">resultsAvailable</span>()</h3>
<p>The signal is emitted by the reader as it reads from the device when it has made more Versit documents available.</p>
<!-- @@@resultsAvailable -->
<!-- $$$setData[overload1]$$$setDataconstQByteArray& -->
<h3 class="fn" id="setData"><a name="setData"></a><span class="type">void</span> QVersitReader::<span class="name">setData</span>(const <span class="type">QByteArray</span> &<i>inputData</i>)</h3>
<p>Sets the data to read from to the byte array input source, <i>inputData</i>. This overrides any device set with <a href="qversitreader.html#setDevice">setDevice</a>().</p>
<!-- @@@setData -->
<!-- $$$setDefaultCodec[overload1]$$$setDefaultCodecQTextCodec* -->
<h3 class="fn" id="setDefaultCodec"><a name="setDefaultCodec"></a><span class="type">void</span> QVersitReader::<span class="name">setDefaultCodec</span>(<span class="type">QTextCodec</span> *<i>codec</i>)</h3>
<p>Sets <i>codec</i> as the codec for the reader to use when parsing the input stream to. This codec is not used for values where the CHARSET Versit parameter occurs. If the codec is null, this denotes that the reader will try to detect the codec from the input. The codec autodetection algorithm can detect UTF-8, UTF-16 or UTF-32. If the input is in some 8-bit codec, it will fall back to using the system locale's codec.</p>
<p><b>See also </b><a href="qversitreader.html#defaultCodec">defaultCodec</a>().</p>
<!-- @@@setDefaultCodec -->
<!-- $$$setDevice[overload1]$$$setDeviceQIODevice* -->
<h3 class="fn" id="setDevice"><a name="setDevice"></a><span class="type">void</span> QVersitReader::<span class="name">setDevice</span>(<span class="type">QIODevice</span> *<i>device</i>)</h3>
<p>Sets the device used for reading the input to be the given <i>device</i>. Does not take ownership of the device. This overrides any byte array input source set with <a href="qversitreader.html#setData">setData</a>().</p>
<p>The caller must ensure that <i>device</i> remains valid for the lifetime of this <a href="qversitreader.html">QVersitReader</a> object.</p>
<p><b>See also </b><a href="qversitreader.html#device">device</a>().</p>
<!-- @@@setDevice -->
<!-- $$$startReading[overload1]$$$startReading -->
<h3 class="fn" id="startReading"><a name="startReading"></a><code>[slot] </code><span class="type">bool</span> QVersitReader::<span class="name">startReading</span>()</h3>
<p>Starts reading the input asynchronously. Returns false if the input device has not been set or opened or if there is another asynchronous read operation already pending. Signal <a href="qversitreader.html#stateChanged">stateChanged</a>() is emitted with parameter <a href="qversitreader.html#State-enum">FinishedState</a> when the reading has finished.</p>
<p>The device must be already open. The client is responsible for closing it when finished.</p>
<!-- @@@startReading -->
<!-- $$$state[overload1]$$$state -->
<h3 class="fn" id="state"><a name="state"></a><span class="type"><a href="qversitreader.html#State-enum">State</a></span> QVersitReader::<span class="name">state</span>() const</h3>
<p>Returns the state of the reader.</p>
<!-- @@@state -->
<!-- $$$stateChanged[overload1]$$$stateChangedQVersitReader::State -->
<h3 class="fn" id="stateChanged"><a name="stateChanged"></a><code>[signal] </code><span class="type">void</span> QVersitReader::<span class="name">stateChanged</span>(<span class="type"><a href="qversitreader.html#State-enum">QVersitReader::State</a></span> <i>state</i>)</h3>
<p>The signal is emitted by the reader when its state has changed (eg. when it has finished reading from the device). <i>state</i> is the new state of the reader.</p>
<!-- @@@stateChanged -->
<!-- $$$waitForFinished[overload1]$$$waitForFinishedint -->
<h3 class="fn" id="waitForFinished"><a name="waitForFinished"></a><span class="type">bool</span> QVersitReader::<span class="name">waitForFinished</span>(<span class="type">int</span> <i>msec</i> = -1)</h3>
<p>If the state is <a href="qversitreader.html#State-enum">ActiveState</a>, blocks until the reader has finished reading or <i>msec</i> milliseconds has elapsed, returning true if it successfully finishes or is cancelled by the user. If <i>msec</i> is negative or zero, the function blocks until the writer has finished, regardless of how long it takes. If the state is <a href="qversitreader.html#State-enum">FinishedState</a>, returns true immediately. Otherwise, returns false immediately.</p>
<!-- @@@waitForFinished -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 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>
|