jigdo API

Job::DataSource::IO Class Reference

User interaction for DataSource. More...

#include <datasource.hh>

Inheritance diagram for Job::DataSource::IO:

Job::IO IListBase GtkSingleUrl Job::JigdoIO Job::MakeImageDl::Child Job::MakeImageDl::JigdoDownload

List of all members.


Public Member Functions

virtual void job_deleted ()=0
 Called by the job when it is deleted.
virtual void job_succeeded ()=0
 Called when the job has successfully completed its task.
virtual void job_failed (const string &message)=0
 Called when the job fails.
virtual void job_message (const string &message)=0
 Informational message.
virtual void dataSource_dataSize (uint64 n)=0
 Called as soon as the size of the downloaded data is known.
virtual void dataSource_data (const byte *data, unsigned size, uint64 currentSize)=0
 Called during download whenever data arrives, with the data that just arrived.

Detailed Description

User interaction for DataSource.

Instances of derived classes are attached to any DataSources that the MakeImageDl creates.


Member Function Documentation

virtual void Job::DataSource::IO::job_deleted (  )  [pure virtual]

Called by the job when it is deleted.

If the IO object considers itself owned by its job, it can delete itself.

Implements Job::IO.

virtual void Job::DataSource::IO::job_succeeded (  )  [pure virtual]

Called when the job has successfully completed its task.

Implements Job::IO.

virtual void Job::DataSource::IO::job_failed ( const string &  message  )  [pure virtual]

Called when the job fails.

The only remaining action after getting this is to delete the job object.

Implements Job::IO.

virtual void Job::DataSource::IO::job_message ( const string &  message  )  [pure virtual]

Informational message.

Implements Job::IO.

virtual void Job::DataSource::IO::dataSource_dataSize ( uint64  n  )  [pure virtual]

Called as soon as the size of the downloaded data is known.

May not be called at all if the size is unknown. Problem with libwww: Returns size as long int - 2 GB size limit!

virtual void Job::DataSource::IO::dataSource_data ( const byte *  data,
unsigned  size,
uint64  currentSize 
) [pure virtual]

Called during download whenever data arrives, with the data that just arrived.

You can write the data to a file, copy it away etc. currentSize is the offset into the downloaded data (including the "size" new bytes) - useful for "x% done" messages.


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

Generated on Tue Sep 23 14:27:43 2008 for jigdo by  doxygen 1.5.6