Can handle transferring a file in blocks over connection adapter. More...
#include <file_transfer_entry.hpp>
Public Member Functions | |
| bool | done () const |
| Has the transfer finished. | |
| FileTransferEntry (const string &uri, vector< char > &buffer, unsigned int handle, weak_ptr< OutputSessionClass > session, unsigned int blockSize, unsigned int timeout_ms) | |
| Constructor. | |
| unsigned int | handle () const |
| Get the identification handle of this transfer. | |
| bool | matches (const string &uri, shared_ptr< OutputSessionClass > session) const |
| Do the given arguments match this transfer. | |
| void | progress () |
| Progress the transfer by sending one block. | |
| virtual | ~FileTransferEntry () |
| dtor | |
Protected Attributes | |
| unsigned int | m_blockIndex |
| The index of the block that is to be sent. | |
| unsigned int | m_blockSize |
| How big is one single block that is transferred on one go (last block may be smaller) | |
| vector< char > | m_buf |
| Contains the whole data to send. | |
| unsigned int | m_handle |
| Unique identifier for the file so it can be identified by both parties of the transfer (sender and receiver) when there are several blocks. | |
| vector< char >::iterator | m_pos |
| The position on the buffer that has been sent. | |
| unsigned int | m_remainingSize |
| How many bytes there is still left in the file to be transferred. | |
| weak_ptr< OutputSessionClass > | m_session |
| The output which does the actual sending. | |
| unsigned int | m_timeout_ms |
| The server will inform the client how long to wait for the entire transaction to complete. | |
| string | m_uri |
| The path to the file to be transferred. | |
Can handle transferring a file in blocks over connection adapter.
|
inline |
Constructor.
| uri | Identifies the file |
| buffer | Contains the data to send |
| handle | Identifies the file transfer when there are multiple blocks being sent |
| session | Implements the actual output used to send |
| blockSize | How big is one single block that is transferred on one go |
| timeout_ms | The server will inform the client how long to wait for the entire transaction to complete |
|
inlinevirtual |
dtor
|
inline |
Has the transfer finished.
|
inline |
Get the identification handle of this transfer.
|
inline |
Do the given arguments match this transfer.
| uri | Identify the file |
| session | The session which does the transfer |
|
inline |
Progress the transfer by sending one block.
|
protected |
The index of the block that is to be sent.
|
protected |
How big is one single block that is transferred on one go (last block may be smaller)
|
protected |
Contains the whole data to send.
|
protected |
Unique identifier for the file so it can be identified by both parties of the transfer (sender and receiver) when there are several blocks.
|
protected |
The position on the buffer that has been sent.
|
protected |
How many bytes there is still left in the file to be transferred.
|
protected |
The output which does the actual sending.
|
protected |
The server will inform the client how long to wait for the entire transaction to complete.
|
protected |
The path to the file to be transferred.