TransferReceipt Class Reference
The TransferReceipt class tracks FileSystemOperator ftp operations and results.
More...
#include <common/filesystemoperator.h>
List of all member functions.
Public Members
Signals
void
listing ( const QValueList<QUrlInfo> & listing, TransferReceipt * thisPtr )
void
progress ( int bytesDone, int bytesTotal, QNetworkOperation * op, TransferReceipt * thisPtr )
void
finished ( TransferReceipt * thisPtr )
void
pdaMessage ( const QString & call, const QByteArray & data )
Protected Members
bool
match ( QNetworkOperation * op ) const
void
finished ( QNetworkOperation * op )
void
setOperations ( QNetworkOperation * op1, QNetworkOperation * op2 )
Detailed Description
The TransferReceipt class tracks FileSystemOperator ftp operations and results.
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 information
about what the transfer operation was by calling the operationType() method. The associated file and a possible
additional argument can also be gotten. The receipt also defines the success or error of the transfer.
The FileSystemOperator is the only class that can create TransferReceipts.
See also Qtopia Desktop Classes.
Member Type Documentation
TransferReceipt::OperationType
This enum type defines the possible types of network operations
that can have receipts.
The type can be:
- TransferReceipt::Retrieve
- TransferReceipt::Send
- TransferReceipt::List
- TransferReceipt::Remove
- TransferReceipt::RSync
Member Function Documentation
const QString & TransferReceipt::arg () const
Returns the argument string of the transfer operation.
QNetworkProtocol::Error TransferReceipt::error () const
Returns the error type if an error has occoured.
See also QNetworkProtocol.
FileType TransferReceipt::fileType () const
Returns the type of the file beiong transfered.
enum FileType { Setting=0, AppData, Documents, Other };
const QString & TransferReceipt::filename () const
Returns the name of the file (no path) being transfered.
It's the local file for send and the remote file for receive operations.
void TransferReceipt::finished ( TransferReceipt * thisPtr ) [signal]
This signal is emittied when the ftp operation is finished.
The thisPtr pointer is a pointer to the TransferRecept object.
bool TransferReceipt::finished () const [protected]
Returns TRUE if the receipt indicates the operation is complete.
void TransferReceipt::finished ( QNetworkOperation * op ) [protected]
Called when op completes.
int TransferReceipt::getTotalBytesTransferred ()
Returns the total number of bytes transfered during this transfer operation.
void TransferReceipt::listing ( const QValueList<QUrlInfo> & listing, TransferReceipt * thisPtr ) [signal]
This signal is emitted when part of a listing operation is done.
The thisPtr pointer is a pointer to the TransferRecept object.
The listing QValueList of QUrlInfo objects contains the directory listing.
bool TransferReceipt::match ( QNetworkOperation * op ) const [protected]
Returns TRUE if op is one of the operations in the receipt.
const QString & TransferReceipt::name () const
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.
bool TransferReceipt::op1Finished () const
Returns TRUE if transfer operation one is done.
bool TransferReceipt::op2Finished () const
Returns TRUE if transfer operation two is done.
void TransferReceipt::operationCreated ( TransferReceipt * thisPtr ) [signal]
This signal is emitted when the ftp operation has actually been started.
The thisPtr pointer is a pointer to the TransferRecept object.
OperationType TransferReceipt::operationType () const
Returns the type of transfer operation associated with this TransferReceipt.
enum OperationType { Retrieve=0, Send, List, Remove, RSync };
void TransferReceipt::pdaMessage ( const QString & call, const QByteArray & data ) [signal]
This signal is emitted when a QCop message from the Qtopia device arrives.
call is the method called, data a QByteArray of argument data.
void TransferReceipt::progress ( int bytesDone, int bytesTotal, QNetworkOperation * op, TransferReceipt * thisPtr ) [signal]
This signal is emitted when transfer progress was made.
bytesDone is the number of bytes done, bytesTotal is the total number of bytes
to be transfered. op is a pointer to the QNetworkOperation in charge of the transfer.
The thisPtr pointer is a pointer to the TransferRecept object.
void TransferReceipt::setOperation ( QNetworkOperation * op ) [protected]
Sets the receipt operation to op.
void TransferReceipt::setOperations ( QNetworkOperation * op1, QNetworkOperation * op2 ) [protected]
Sets the receipt operations to op1 and op2.
bool TransferReceipt::succeeded () const
Returns TRUE if the transfer operation is done and succeeded.
This file is part of the Qtopia platform,
copyright © 1995-2004
Trolltech, all rights reserved.
| Copyright © 2001-2004 Trolltech
| Trademarks
| Qtopia version 2.0.1
|