#include <queuenode.h>
Inheritance diagram for UploadNode:
Public Member Functions | |
UploadNode (Server *pcServer, const String &zLocalPath, const String &zRemotePath, int nID) | |
UploadNode Constructor. Sets the initial upload file location to null. | |
~UploadNode () | |
UploadNode Deconstructor. Frees the pointer to the upload file. | |
Private Member Functions | |
CURLcode | AttachToHandle (CURL *pHandle) |
Setup Handle for Curl Transfer. This does the setup for an upload curl handler. | |
CURLcode | RemoveFromHandle (CURL *pHandle) |
Remove any settings from the curl handle set in AttachToHandle(). | |
size_t | Read (void *pBuf, size_t nSize) |
Read from file. This performs the read from the file and returns the size read. | |
int | Seek (curl_off_t nOffset, int nOrigin) |
Seek into the upload 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) |
Progress Bar Update. This just outputs progress information to the terminal. | |
Private Attributes | |
File * | m_pcFile |
Friends | |
class | TransferThread |
size_t UploadNode::Read | ( | void * | pBuf, | |
size_t | nSize | |||
) | [private, virtual] |
Read from file. This performs the read from the file and returns the size read.
pBuf | A pointer to a location that the data can be read into. | |
nSize | The amount of data to be read. |
Reimplemented from QueueNode.
int UploadNode::Seek | ( | curl_off_t | nOffset, | |
int | nOrigin | |||
) | [private, virtual] |
Seek into the upload 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 UploadNode::ProgressBar | ( | double | fDownTotal, | |
double | fDownNow, | |||
double | fUpTotal, | |||
double | fUpNow | |||
) | [private, virtual] |
Progress Bar Update. 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* UploadNode::m_pcFile [private] |
A pointer to the file that is being uploaded.