A class to pull data from a list of files into an asynchronous device such as QProcess.
More...
|
| QtlFileDataPull (const QStringList &fileNames, int transferSize=DEFAULT_TRANSFER_SIZE, int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0) |
| Constructor using a list of files. More...
|
|
| QtlFileDataPull (const QtlFileSlicesPtrList &files=QtlFileSlicesPtrList(), int transferSize=DEFAULT_TRANSFER_SIZE, int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0) |
| Constructor using a list of file slices. More...
|
|
| QtlDataPull (int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0) |
| Constructor. More...
|
|
virtual | ~QtlDataPull () |
| Destructor. More...
|
|
bool | isStarted () const |
| Check if the data transfer is started. More...
|
|
QtlLogger * | log () const |
| Get the message logger. More...
|
|
bool | progressAvailable () const |
| Check if progress report is meaningful. More...
|
|
qint64 | pulledSize () const |
| Get the total size of all pulled data. More...
|
|
void | setAutoDelete (bool on) |
| Set automatic object deletion on transfer completion. More...
|
|
void | setMaxPulledSize (qint64 size) |
| Set the maximum number of bytes to pull. More...
|
|
void | setProgressIntervalInBytes (qint64 size) |
| Set the interval between two emissions of progress(). More...
|
|
void | setProgressMaxHint (qint64 size) |
| Set the probable ("hint") total size of the transfer. More...
|
|
|
bool | start (QIODevice *device) |
| Start to transfer data into the specified device. More...
|
|
bool | start (const QList< QIODevice *> &devices) |
| Start to transfer data into the several devices in parallel. More...
|
|
void | stop () |
| Force a premature stop of the data transfer. More...
|
|
void | stopCaller () |
| This slot stops the transfer on the device which sent the signal. More...
|
|
void | stopDevice (QIODevice *device) |
| Stop the transfer on the specified device. More...
|
|
void | completed (bool success) |
| Emitted when the transfer is completed on all devices. More...
|
|
void | deviceCompleted (QIODevice *device, bool success) |
| Emitted when the transfer is completed on one device. More...
|
|
void | progress (qint64 current, qint64 maximum) |
| Emitted when some progress in the data transfer is available. More...
|
|
void | started () |
| Emitted when the transfer is started. More...
|
|
A class to pull data from a list of files into an asynchronous device such as QProcess.
- See also
- QtlDataPull
◆ QtlFileDataPull() [1/2]
Constructor using a list of files.
Progress reporting is automatically enabled.
- Parameters
-
[in] | fileNames | List of files to transfer. They are concatenated on the destination. |
[in] | transferSize | Data transfer size in bytes. |
[in] | minBufferSize | The minimum buffer size is the lower limit of the buffered data. When the amount of data not yet written to the device is lower than this size, new data is pulled from the DVD. |
[in] | log | Optional message logger. |
[in] | parent | Optional parent object. |
◆ QtlFileDataPull() [2/2]
Constructor using a list of file slices.
Progress reporting is automatically enabled.
- Parameters
-
[in] | files | List of slices of files to transfer. They are concatenated on the destination. |
[in] | transferSize | Data transfer size in bytes. |
[in] | minBufferSize | The minimum buffer size is the lower limit of the buffered data. When the amount of data not yet written to the device is lower than this size, new data is pulled from the DVD. |
[in] | log | Optional message logger. |
[in] | parent | Optional parent object. |
◆ initializeTransfer()
bool QtlFileDataPull::initializeTransfer |
( |
| ) |
|
|
protectedvirtual |
Initialize the transfer.
Reimplemented from QtlDataPull.
- Returns
- True on success, false on error.
Reimplemented from QtlDataPull.
◆ needTransfer()
bool QtlFileDataPull::needTransfer |
( |
qint64 |
maxSize | ) |
|
|
protectedvirtual |
Invoked when more data is needed.
Reimplemented from QtlDataPull.
- Parameters
-
[in] | maxSize | Maximum size in bytes of the requested transfer. |
- Returns
- True on success, false on error.
Implements QtlDataPull.
◆ cleanupTransfer()
void QtlFileDataPull::cleanupTransfer |
( |
bool |
clean | ) |
|
|
protectedvirtual |
Cleanup the transfer.
Reimplemented from QtlDataPull.
- Parameters
-
[in] | clean | If true, this is a clean termination. |
Reimplemented from QtlDataPull.
◆ toFileSlicesList()
Convert a list of file names into a list of file slices.
- Parameters
-
[in] | fileNames | List of file names. |
- Returns
- A list of file slices.
◆ DEFAULT_TRANSFER_SIZE
const int QtlFileDataPull::DEFAULT_TRANSFER_SIZE = 1024 * 1024 |
|
static |
Default transfer size in bytes (1 MB).
◆ _files
◆ _current
QtlFileSlicesPtrList::ConstIterator QtlFileDataPull::_current |
|
private |
◆ _buffer
The documentation for this class was generated from the following files: