Logo Search packages:      
Sourcecode: jigdo version File versions

Download Class Reference

#include <download.hh>

List of all members.

Detailed Description

Class containing the state of a download. libwww must be properly initialised before usage (this happens in glibwww-init.cc).

The purpose of this class is a minimal API for downloading HTTP and FTP URLs. A few useful extra features are added by Job::SingleURL.

The Output object is e.g. a GtkSingleUrl for single-file downloads

Definition at line 39 of file download.hh.

Public Member Functions

void cont ()
 Download (const string &uri, Output *o)
bool failed () const
bool interrupted () const
Outputoutput () const
void pause ()
bool paused () const
bool pausedSoon () const
uint64 resumeOffset () const
void run ()
void setOutput (Output *o)
void setPragmaNoCache (bool pragmaNoCache)
void setResumeOffset (uint64 offset)
void stop ()
bool succeeded () const
const string & uri () const

Static Public Member Functions

static void init ()
static void uriJoin (string *dest, const string &base, const string &rel)

Private Types

enum  State {

Private Member Functions

void generateError (State newState=ERROR)
void pauseNow ()
bool resumeCheck ()

Static Private Member Functions

static int abort (HTStream *me, HTList *e)
static int activateRequestCallback (HTRequest *request)
static int afterFilter (HTRequest *request, HTResponse *response, void *param, int status)
static BOOL alertCallback (HTRequest *request, HTAlertOpcode op, int msgnum, const char *dfault, void *input, HTAlertPar *reply)
static int flush (HTStream *me)
static int free (HTStream *me)
static int putChar (HTStream *me, char c)
static int putString (HTStream *me, const char *s)
static int requestCallback (HTRequest *request, void *downloadObj)
static gboolean stopLater_callback (gpointer data)
static int write (HTStream *me, const char *s, int l)

Private Attributes

uint64 currentSize
bool insideNewData
HTRequest * request
bool resumeChecked
uint64 resumeOffsetVal
State state
unsigned stopLaterId
string uriVal
const HTStreamClass * vptr

Static Private Attributes

static string userAgent


class  Output

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

Generated by  Doxygen 1.6.0   Back to index