jigdo API

Job::CachedUrl Class Reference

Spool data from cache file. More...

#include <cached-url.hh>

Inheritance diagram for Job::CachedUrl:

Job::DataSource NoCopy

List of all members.


Public Member Functions

 CachedUrl (const string &filename, uint64 prio)
 Create object, but don't start outputting data yet - use run() to do that.
virtual ~CachedUrl ()
virtual void run ()
 Start delivering data.
virtual bool paused () const
 Is the download currently paused? From DataSource.
virtual void pause ()
 Pause the download.
virtual void cont ()
 Continue downloading.
virtual const Progressprogress () const
 Return the internal progress object.
virtual const string & location () const
 Return the URL used to download the data.

Friends

struct Cmp

Classes

struct  Cmp

Detailed Description

Spool data from cache file.

Constructor & Destructor Documentation

CachedUrl::CachedUrl ( const string &  filename,
uint64  prio 
)

Create object, but don't start outputting data yet - use run() to do that.

Parameters:
filename File to spool from
prio "Priority" - if >1 CachedUrls are running, the ones with lower prio get spooled first.

References Assert, and Progress::setDataSize().

CachedUrl::~CachedUrl (  )  [virtual]


Member Function Documentation

void CachedUrl::run (  )  [virtual]

Start delivering data.

Implements Job::DataSource.

References cont(), Progress::dataSize(), debug, Job::DataSource::io, and IOSOURCE_SEND.

bool CachedUrl::paused (  )  const [virtual]

Is the download currently paused? From DataSource.

Implements Job::DataSource.

void CachedUrl::pause (  )  [virtual]

Pause the download.

From DataSource.

Implements Job::DataSource.

void CachedUrl::cont (  )  [virtual]

Continue downloading.

From DataSource.

Implements Job::DataSource.

References debug.

Referenced by run().

const Progress * CachedUrl::progress (  )  const [virtual]

Return the internal progress object.

From DataSource.

Implements Job::DataSource.

const string & CachedUrl::location (  )  const [virtual]

Return the URL used to download the data.

From DataSource.

Implements Job::DataSource.


Friends And Related Function Documentation

friend struct Cmp [friend]


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

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