#include <queuenode.h>
Inheritance diagram for DownloadNode:
Private Member Functions | |
DownloadNode (Server *pcServer, const String &zLocalPath, const String &zRemotePath, int nID) | |
DownloadNode Constructor. Sets the initial download file location to null. | |
~DownloadNode () | |
DownloadNode Deconstructor. This frees up the file pointer m_pcFile if necessary. | |
CURLcode | SetupCurlHandleForTransfer (CURL *pHandle) |
Setup Function for Curl Transfer. Does the setup for Curl so that it can properly transfer a file. | |
size_t | Write (void *pBuf, size_t nSize) |
Write to file. This performs the actual writing of data to the file. | |
int | Seek (curl_off_t nOffset, int nOrigin) |
Performs a seek operation on the file. Seek into a particular position in the file so curl can begin operating from there. | |
int | ProgressBar (double fDownTotal, double fDownNow, double fUpTotal, double fUpNow) |
Updates the progress bar. This just outputs progress information to the terminal. | |
Private Attributes | |
File * | m_pcFile |
Friends | |
class | TransferThread |
size_t DownloadNode::Write | ( | void * | pBuf, | |
size_t | nSize | |||
) | [private, virtual] |
Write to file. This performs the actual writing of data to the file.
pBuf | The data to write to the file. | |
nSize | The size of the data being written. |
Reimplemented from QueueNode.
int DownloadNode::Seek | ( | curl_off_t | nOffset, | |
int | nOrigin | |||
) | [private, virtual] |
Performs a seek operation on the file. Seek into a particular position in the file so curl can begin operating from there.
nOffset | The offset into the file to start operating at. | |
nOrigin | The origin of the offset. |
Reimplemented from QueueNode.
int DownloadNode::ProgressBar | ( | double | fDownTotal, | |
double | fDownNow, | |||
double | fUpTotal, | |||
double | fUpNow | |||
) | [private, virtual] |
Updates the progress bar. This just outputs progress information to the terminal.
fDownTotal | Total bytes to be downloaded. | |
fDownNow | Total bytes downloaded so far. | |
fUpTotal | Total bytes to upload. | |
fUpNow | Total bytes uploaded at the moment. |
Reimplemented from QueueNode.
File* DownloadNode::m_pcFile [private] |
A pointer to the file that is being downloaded.