📄 transferreceipt.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/qtopiadesktop/common/filesystemoperator.cpp:64 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>TransferReceipt Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font> <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="137"> <tr> <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td> <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td> </tr> </table></td></tr></table><h1 align=center>TransferReceipt Class Reference</h1><p>The TransferReceipt class tracks FileSystemOperator ftp operations and results.<a href="#details">More...</a><p><tt>#include <<a href="filesystemoperator-h.html">common/filesystemoperator.h</a>></tt><p><a href="transferreceipt-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>enum <a href="#OperationType-enum"><b>OperationType</b></a> { Retrieve = 0, Send, List, Remove, RSync }</div></li><li><div class=fn>OperationType <a href="#operationType"><b>operationType</b></a> () const</div></li><li><div class=fn>enum <b>FileType</b> { Setting = 0, AppData, Documents, Other }</div></li><li><div class=fn>FileType <a href="#fileType"><b>fileType</b></a> () const</div></li><li><div class=fn>const QString & <a href="#filename"><b>filename</b></a> () const</div></li><li><div class=fn>const QString & <a href="#name"><b>name</b></a> () const</div></li><li><div class=fn>const QString & <a href="#arg"><b>arg</b></a> () const</div></li><li><div class=fn>bool <a href="#succeeded"><b>succeeded</b></a> () const</div></li><li><div class=fn>QNetworkProtocol::Error <a href="#error"><b>error</b></a> () const</div></li><li><div class=fn>bool <a href="#op1Finished"><b>op1Finished</b></a> () const</div></li><li><div class=fn>bool <a href="#op2Finished"><b>op2Finished</b></a> () const</div></li><li><div class=fn>int <a href="#getTotalBytesTransferred"><b>getTotalBytesTransferred</b></a> ()</div></li></ul><h2>Signals</h2><ul><li><div class=fn>void <a href="#operationCreated"><b>operationCreated</b></a> ( TransferReceipt * thisPtr )</div></li><li><div class=fn>void <a href="#listing"><b>listing</b></a> ( const QValueList<QUrlInfo> & listing, TransferReceipt * thisPtr )</div></li><li><div class=fn>void <a href="#progress"><b>progress</b></a> ( int bytesDone, int bytesTotal, QNetworkOperation * op, TransferReceipt * thisPtr )</div></li><li><div class=fn>void <a href="#finished"><b>finished</b></a> ( TransferReceipt * thisPtr )</div></li><li><div class=fn>void <a href="#pdaMessage"><b>pdaMessage</b></a> ( const QString & call, const QByteArray & data )</div></li></ul><h2>Protected Members</h2><ul><li><div class=fn>bool <a href="#match"><b>match</b></a> ( QNetworkOperation * op ) const</div></li><li><div class=fn>bool <a href="#finished-2"><b>finished</b></a> () const</div></li><li><div class=fn>void <a href="#finished-3"><b>finished</b></a> ( QNetworkOperation * op )</div></li><li><div class=fn>void <a href="#setOperation"><b>setOperation</b></a> ( QNetworkOperation * op )</div></li><li><div class=fn>void <a href="#setOperations"><b>setOperations</b></a> ( QNetworkOperation * op1, QNetworkOperation * op2 )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The TransferReceipt class tracks <a href="filesystemoperator.html">FileSystemOperator</a> ftp operations and results.<p> The TransferReceipt is useful to inform the caller when an FileSystemOperator ftp operation is finshed.The caller can connect to the TransferReceipt signals to find out when a certain operation is completed.It also gives the caller informationabout what the transfer operation was by calling the <a href="#operationType">operationType</a>() method. The associated file and a possibleadditional argument can also be gotten. The receipt also defines the success or error of the transfer.<p> The FileSystemOperator is the only class that can create TransferReceipts.<p>See also <a href="qtopiadesktop.html">Qtopia Desktop Classes</a>.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="OperationType-enum"></a>TransferReceipt::OperationType</h3> <p> This enum type defines the possible types of network operationsthat can have receipts.<p> The type can be:<ul><li><tt>TransferReceipt::Retrieve</tt><li><tt>TransferReceipt::Send</tt><li><tt>TransferReceipt::List</tt><li><tt>TransferReceipt::Remove</tt><li><tt>TransferReceipt::RSync</tt></ul><hr><h2>Member Function Documentation</h2><h3 class=fn>const QString & <a name="arg"></a>TransferReceipt::arg () const</h3> <p> Returns the argument string of the transfer operation.<h3 class=fn>QNetworkProtocol::Error <a name="error"></a>TransferReceipt::error () const</h3> <p> Returns the error type if an error has occoured.<p>See also QNetworkProtocol.<h3 class=fn>FileType <a name="fileType"></a>TransferReceipt::fileType () const</h3> <p> Returns the type of the file beiong transfered.enum FileType { Setting=0, AppData, Documents, Other };<h3 class=fn>const QString & <a name="filename"></a>TransferReceipt::filename () const</h3> <p> Returns the name of the file (no path) being transfered.It's the local file for send and the remote file for receive operations.<h3 class=fn>void <a name="finished"></a>TransferReceipt::finished ( <a href="transferreceipt.html">TransferReceipt</a> * thisPtr )<tt> [signal]</tt></h3> <p> This signal is emittied when the ftp operation is finished.The <em>thisPtr</em> pointer is a pointer to the TransferRecept object.<h3 class=fn>bool <a name="finished-2"></a>TransferReceipt::finished () const<tt> [protected]</tt></h3>Returns TRUE if the receipt indicates the operation is complete.<h3 class=fn>void <a name="finished-3"></a>TransferReceipt::finished ( QNetworkOperation * op )<tt> [protected]</tt></h3>Called when <em>op</em> completes.<h3 class=fn>int <a name="getTotalBytesTransferred"></a>TransferReceipt::getTotalBytesTransferred ()</h3>Returns the total number of bytes transfered during this transfer operation.<h3 class=fn>void <a name="listing"></a>TransferReceipt::listing ( const QValueList<QUrlInfo> & listing, <a href="transferreceipt.html">TransferReceipt</a> * thisPtr )<tt> [signal]</tt></h3> <p> This signal is emitted when part of a listing operation is done.The <em>thisPtr</em> pointer is a pointer to the TransferRecept object.The <em>listing</em> QValueList of QUrlInfo objects contains the directory listing.<p> <h3 class=fn>bool <a name="match"></a>TransferReceipt::match ( QNetworkOperation * op ) const<tt> [protected]</tt></h3>Returns TRUE if <em>op</em> is one of the operations in the receipt.<h3 class=fn>const QString & <a name="name"></a>TransferReceipt::name () const</h3> <p> Returns the base name (no file extension) of the file being transfered.It's the local file for send and the remote file for receive operations.<h3 class=fn>bool <a name="op1Finished"></a>TransferReceipt::op1Finished () const</h3>Returns TRUE if transfer operation one is done.<h3 class=fn>bool <a name="op2Finished"></a>TransferReceipt::op2Finished () const</h3>Returns TRUE if transfer operation two is done.<h3 class=fn>void <a name="operationCreated"></a>TransferReceipt::operationCreated ( <a href="transferreceipt.html">TransferReceipt</a> * thisPtr )<tt> [signal]</tt></h3> <p> This signal is emitted when the ftp operation has actually been started.The <em>thisPtr</em> pointer is a pointer to the TransferRecept object.<h3 class=fn><a href="transferreceipt.html#OperationType-enum">OperationType</a> <a name="operationType"></a>TransferReceipt::operationType () const</h3> <p> Returns the type of transfer operation associated with this TransferReceipt.enum OperationType { Retrieve=0, Send, List, Remove, RSync };<h3 class=fn>void <a name="pdaMessage"></a>TransferReceipt::pdaMessage ( const QString & call, const QByteArray & data )<tt> [signal]</tt></h3> <p> This signal is emitted when a QCop message from the Qtopia device arrives.<em>call</em> is the method called, <em>data</em> a QByteArray of argument data.<h3 class=fn>void <a name="progress"></a>TransferReceipt::progress ( int bytesDone, int bytesTotal, QNetworkOperation * op, <a href="transferreceipt.html">TransferReceipt</a> * thisPtr )<tt> [signal]</tt></h3> <p> This signal is emitted when transfer progress was made.<em>bytesDone</em> is the number of bytes done, <em>bytesTotal</em> is the total number of bytesto be transfered. <em>op</em> is a pointer to the QNetworkOperation in charge of the transfer.The <em>thisPtr</em> pointer is a pointer to the TransferRecept object.<h3 class=fn>void <a name="setOperation"></a>TransferReceipt::setOperation ( QNetworkOperation * op )<tt> [protected]</tt></h3>Sets the receipt operation to <em>op</em>.<h3 class=fn>void <a name="setOperations"></a>TransferReceipt::setOperations ( QNetworkOperation * op1, QNetworkOperation * op2 )<tt> [protected]</tt></h3>Sets the receipt operations to <em>op1</em> and <em>op2</em>.<h3 class=fn>bool <a name="succeeded"></a>TransferReceipt::succeeded () const</h3>Returns TRUE if the transfer operation is done and succeeded.<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright © 1995-2004<a href="http://www.trolltech.com/">Trolltech</a>, all rights reserved.<p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright © 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -