UploadNode Class Reference

Upload Queue Node. This is a subclass of the QueueNode type that is used for upload requests in the queue. More...

#include <queuenode.h>

Inheritance diagram for UploadNode:

QueueNode List of all members.

Private 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.
CURLcode SetupCurlHandleForTransfer (CURL *pHandle)
 Setup Handle for Curl Transfer. This does the setup for an upload curl handler.
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

Detailed Description

Upload Queue Node. This is a subclass of the QueueNode type that is used for upload requests in the queue.


Member Function Documentation

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.

Parameters:
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.

Parameters:
nOffset The offset into the file to start operating at.
nOrigin The origin of the offset.
Todo:
Make sure that File::Seek() returns the same as libcurl expects.

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.

Parameters:
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.


Member Data Documentation

File* UploadNode::m_pcFile [private]

A pointer to the file that is being uploaded.


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 21:16:56 2008 for Transferrer by  doxygen 1.5.1