DirListNode Class Reference

Directory Listing Queue Node. This is a subclass of the QueueNode type that is used for directory listing requests in the queue. More...

#include <queuenode.h>

Inheritance diagram for DirListNode:

QueueNode List of all members.

Private Member Functions

 DirListNode (Server *pcServer, const String &zRemotePath, Handler *pcTarget, int nID)
 Default constructor for DirListNode. This initializes the target of the directory listing and makes note that this is starting the listing.
 ~DirListNode ()
 Default deconstructor for DirListNode.
CURLcode AttachToHandle (CURL *pHandle)
 Setup the Curl handle for the directory listing.
size_t Write (void *pBuf, size_t nSize)
 Write the data into the data buffer. This "writes" the data coming from the remote server into the RemoteNode objects. These are then passed to RemoteIconView to display to the user.
int ProgressBar (double fDownTotal, double fDownNow, double fUpTotal, double fUpNow)
 Update the Progress bar for the node. This just outputs progress information to the terminal.

Private Attributes

Handler * m_pcTarget
bool m_bInitial
String m_zLastLineFragment
 Stores anything after last line ending with '
'. This is used for when the read operation did read up to the new line. It is used to continue reading from the output of Curl.

Friends

class TransferThread

Detailed Description

Directory Listing Queue Node. This is a subclass of the QueueNode type that is used for directory listing requests in the queue.


Member Function Documentation

size_t DirListNode::Write ( void *  pBuf,
size_t  nSize 
) [private, virtual]

Write the data into the data buffer. This "writes" the data coming from the remote server into the RemoteNode objects. These are then passed to RemoteIconView to display to the user.

Warning:
The RemoteNode vector that is sent is assumed to be deleted by the RemoteIconView that calls for the update when it is done processing.
Bug:
Generated nodes do not have proper permissions due to a deficiency in how ftpparse operates.
Todo:
The dirlist parsing might be better in Server, but we need to do it here because we need to save any fragments of the last line.
Todo:
Fix up initial, final flags that are sent to the RemoteIconView. Maybe remove them. Currently the 'final' flag isn't being sent.

Reimplemented from QueueNode.

int DirListNode::ProgressBar ( double  fDownTotal,
double  fDownNow,
double  fUpTotal,
double  fUpNow 
) [private, virtual]

Update the Progress bar for the node. 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

Handler* DirListNode::m_pcTarget [private]

The target location to send the directory listing to.

bool DirListNode::m_bInitial [private]

Whether or not this is the initial phase of the directory listing download.


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 17:23:14 2009 for Transferrer by  doxygen 1.5.1