Logo Search packages:      
Sourcecode: jigdo version File versions

Job::SingleUrl Class Reference

#include <single-url.hh>

Inheritance diagram for Job::SingleUrl:

Job::DataSource Download::Output Job::MakeImageDl::JigdoDownload

List of all members.

Detailed Description

Class which handles downloading a HTTP or FTP URL. It is a layer on top of Download and provides some additional functionality:

This one will forever remain single since there are no single parties around here and it's rather shy. TODO: If you pity it too much, implement a MarriedUrl.

Definition at line 51 of file single-url.hh.

Public Member Functions

virtual void cont ()
int currentTry () const
BfstreamCounted * destStream () const
bool failed () const
virtual const string & location () const
virtual void pause ()
virtual bool paused () const
virtual const Progress * progress () const
bool resumePossible () const
bool resuming () const
virtual void run ()
void setDestination (BfstreamCounted *destStream, uint64 destOffset, uint64 destEndOffset)
void setNoResumePossible ()
void setPragmaNoCache (bool pragmaNoCache)
void setResumeOffset (uint64 resumeOffset)
 SingleUrl (DataSource::IO *ioPtr, const string &uri)
void stop ()
bool succeeded () const

Public Attributes

IOPtr< IOio

Static Public Attributes

static const int MAX_TRIES = 20
static const int RESUME_DELAY = 3000
static const unsigned RESUME_SIZE = 16*1024

Private Member Functions

virtual void download_data (const byte *data, unsigned size, uint64 currentSize)
virtual void download_dataSize (uint64 n)
virtual void download_failed (string *message)
virtual void download_message (string *message)
virtual void download_succeeded ()
void resumeFailed ()
bool writeToDestStream (uint64 off, const byte *data, unsigned size)

Private Attributes

uint64 destEndOff
uint64 destOff
SmartPtr< BfstreamCounted > destStreamVal
Download download
bool haveDestination
bool havePragmaNoCache
bool haveResumeOffset
Progress progressVal
unsigned resumeLeft
int tries

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

Generated by  Doxygen 1.6.0   Back to index