PERS_FILE_XFER Class Reference

#include <pers_file_xfer.h>

Collaboration diagram for PERS_FILE_XFER:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PERS_FILE_XFER ()
 ~PERS_FILE_XFER ()
int init (FILE_INFO *, bool is_file_upload)
bool poll ()
void transient_failure (int)
void permanent_failure (int)
void abort ()
int write (MIOFILE &fout)
int parse (MIOFILE &fin)
int create_xfer ()
int start_xfer ()
void suspend ()

Public Attributes

bool is_upload
double next_request_time
 time to next retry the file request
double time_so_far
double last_time
double last_bytes_xferred
bool pers_xfer_done
FILE_XFERfxp
 nonzero if file xfer in progress
FILE_INFOfip


Detailed Description

PERS_FILE_XFER represents a "persistent file transfer", i.e. a long-term effort to upload or download a file. This may consist of several "episodes", which are HTTP operations to a particular server. PERS_FILE_XFER manages

The FILE_INFO has a list of URLs. For download, the object attempts to download the file from any combination of the URLs. For upload, try to upload the file in its entirety to one of the URLs. a PERS_FILE_XFER is created and added to pers_file_xfer_set 1) when read from the client state file in (FILE_INFO::parse(), CLIENT_STATE::parse_state_file() 2) when a FILE_INFO is ready to transfer in CLIENT_STATE::handle_pers_file_xfers() a PERS_FILE_XFER p is removed from pers_file_xfer_set and freed 1) when p->pers_xfer_done is true in CLIENT_STATE::handle_pers_file_xfers() A FILE_XFER is created and added to file_xfer_set and linked from PFX 1) in PERS_FILE_XFER::start_xfer() A FILE_XFER is erased from file_xfer_set, unlinked from PFX and freed 1) when the FILE_XFER is done, in PERS_FILE_XFER::poll() PERS_FILE_XFER::check_giveup() 2) user request, in PERS_FILE_XFER::abort() PERS_FILE_XFER::suspend() 3) if the FILE_XFER_SET::insert() fails PERS_FILE_XFER::start_xfer() NOTE: when this is done, pers_xfer_done is set

pointers: PERS_FILE_XFER -> FILE_XFER set in PERS_FILE_XFER::start_xfer() zeroed (see above) PERS_FILE_XFER -> FILE_INFO set in PERS_FILE_XFER::init() FILE_INFO -> PERS_FILE_XFER set in FILE_INFO::parse(), CLIENT_STATE::handle_pers_file_xfers() zeroed in PERS_FILE_XFER destructor


Constructor & Destructor Documentation

PERS_FILE_XFER::PERS_FILE_XFER (  ) 

PERS_FILE_XFER::~PERS_FILE_XFER (  ) 


Member Function Documentation

int PERS_FILE_XFER::init ( FILE_INFO f,
bool  is_file_upload 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool PERS_FILE_XFER::poll (  ) 

Here is the call graph for this function:

void PERS_FILE_XFER::transient_failure ( int  retval  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void PERS_FILE_XFER::permanent_failure ( int  retval  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void PERS_FILE_XFER::abort (  ) 

Here is the call graph for this function:

int PERS_FILE_XFER::write ( MIOFILE fout  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

int PERS_FILE_XFER::parse ( MIOFILE fin  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

int PERS_FILE_XFER::create_xfer (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

int PERS_FILE_XFER::start_xfer (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void PERS_FILE_XFER::suspend (  ) 

Here is the call graph for this function:


Member Data Documentation

time to next retry the file request

Total time there's been an active FILE_XFER for this PFX Currently not used for anything; not meaningful for throughput because could include repeated transfer

when the above was last updated. Defined only while a transfer is active

Save how much is transferred when transfer isn't active, used to display progress in GUI.

nonzero if file xfer in progress


The documentation for this class was generated from the following files:

Generated on Mon Oct 6 10:46:08 2008 for BOINC by  doxygen 1.5.6