Logo Search packages:      
Sourcecode: dc-qt version File versions  Download package

Download Class Reference

#include <DownloadManager.h>

Inheritance diagram for Download:

List of all members.


Detailed Description

Comes as an argument in the DownloadManagerListener functions. Use it to retrieve information about the ongoing transfer.

Definition at line 41 of file DownloadManager.h.


Public Types

enum  {
  FLAG_USER_LIST = 0x01, FLAG_RESUME = 0x02, FLAG_ROLLBACK = 0x04, FLAG_ZDOWNLOAD = 0x08,
  FLAG_CALC_CRC32 = 0x10, FLAG_CRC32_OK = 0x20, FLAG_ANTI_FRAG = 0x40, FLAG_UTF8 = 0x80,
  FLAG_TREE_DOWNLOAD = 0x100, FLAG_TREE_TRIED = 0x200, FLAG_PARTIAL_LIST = 0x400
}
enum  { AVG_PERIOD = 30000 }
typedef CalcOutputStream
< CRC32Filter, true > 
CrcOS
typedef List::iterator Iter
typedef vector< PtrList
typedef int MaskType
typedef DownloadPtr

Public Member Functions

void addPos (int64_t aBytes, int64_t aActual)
 Download (QueueItem *qi) throw ()
int64_t getActual () const
int64_t getAverageSpeed () const
int64_t getBytesLeft () const
AdcCommand getCommand (bool zlib, bool tthf)
string getDownloadTarget ()
string & getPFS ()
int64_t getPos () const
int64_t getSecondsLeft ()
 GETSET (int64_t, runningAverage, RunningAverage)
 GETSET (u_int32_t, lastTick, LastTick)
 GETSET (u_int32_t, start, Start)
 GETSET (UserConnection *, userConnection, UserConnection)
 GETSET (bool, treeValid, TreeValid)
 GETSET (TTHValue *, tth, TTH)
 GETSET (CrcOS *, crcCalc, CrcCalc)
 GETSET (OutputStream *, file, File)
 GETSET (string, tempTarget, TempTarget)
 GETSET (string, target, Target)
 GETSET (string, source, Source)
int64_t getSize () const
int64_t getStartPos () const
string getTargetFileName ()
TigerTreegetTigerTree ()
int64_t getTotal () const
bool isAnySet (MaskType aFlag) const
bool isSet (MaskType aFlag) const
void resetPos ()
void setFlag (MaskType aFlag)
void setPos (int64_t aPos)
void setSize (const string &aSize)
void setSize (int64_t aSize)
void setStartPos (int64_t aPos)
void unsetFlag (MaskType aFlag)
void updateRunningAverage ()

Static Public Attributes

static const string ANTI_FRAG_EXT = ".antifrag"

Private Member Functions

 Download (const Download &)
Downloadoperator= (const Download &)

Private Attributes

string pfs
TigerTree tt

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

Generated by  Doxygen 1.6.0   Back to index