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

QueueItem Class Reference

#include <queueitem.h>

Inheritance diagram for QueueItem:

FastAlloc< QueueItem >

List of all members.


Detailed Description

Represents an item in the transfer queue.

Definition at line 33 of file QueueItem.h.


Public Types

enum  FileFlags {
  FLAG_NORMAL = 0x00, FLAG_RESUME = 0x01, FLAG_USER_LIST = 0x02, FLAG_DIRECTORY_DOWNLOAD = 0x04,
  FLAG_CLIENT_VIEW = 0x08, FLAG_TEXT = 0x20, FLAG_EXISTS = 0x40, FLAG_MATCH_QUEUE = 0x80,
  FLAG_SOURCE_UTF8 = 0x100, FLAG_XML_BZLIST = 0x200
}
typedef List::iterator Iter
typedef vector< PtrList
typedef int MaskType
enum  Priority {
  DEFAULT = -1, PAUSED = 0, LOWEST, LOW,
  NORMAL, HIGH, HIGHEST, LAST
}
typedef QueueItemPtr
enum  Status { STATUS_WAITING, STATUS_RUNNING }
typedef StringMap::iterator StringIter
typedef map< string *, Ptr,
noCaseStringLess
StringMap
typedef UserMap::iterator UserIter
typedef UserListMap::iterator UserListIter

Public Member Functions

int countOnlineUsers () const
Source::Iter getBadSource (const User::Ptr &aUser)
Source::List & getBadSources ()
string getListName ()
void getOnlineUsers (User::List &l) const
string getSearchString () const
 GETSET (TTHValue *, tthRoot, TTH)
 GETSET (u_int32_t, added, Added)
 GETSET (Download *, currentDownload, CurrentDownload)
 GETSET (Source *, current, Current)
 GETSET (Priority, priority, Priority)
 GETSET (Status, status, Status)
 GETSET (int64_t, downloadedBytes, DownloadedBytes)
 GETSET (int64_t, size, Size)
 GETSET (string, target, Target)
Source::Iter getSource (const User::Ptr &aUser)
const string & getSourcePath (const User::Ptr &aUser)
Source::List & getSources ()
string getTargetFileName () const
const string & getTempTarget ()
typedef HASH_MAP_X (User::Ptr, List, User::HashFunction, equal_to< User::Ptr >, less< User::Ptr >) UserListMap
typedef HASH_MAP_X (User::Ptr, Ptr, User::HashFunction, equal_to< User::Ptr >, less< User::Ptr >) UserMap
bool hasOnlineUsers () const
bool isAnySet (MaskType aFlag) const
bool isBadSource (const User::Ptr &aUser, const string &aFile) const
bool isBadSource (const User::Ptr &aUser)
bool isBadSourceExcept (const User::Ptr &aUser, const string &aFile, Flags::MaskType exceptions) const
bool isSet (MaskType aFlag) const
bool isSource (const User::Ptr &aUser, const string &aFile) const
bool isSource (const User::Ptr &aUser)
 QueueItem (const QueueItem &rhs)
 QueueItem (const string &aTarget, int64_t aSize, Priority aPriority, int aFlag, int64_t aDownloadedBytes, u_int32_t aAdded, const TTHValue *tth)
void setCurrent (const User::Ptr &aUser)
void setFlag (MaskType aFlag)
void setTempTarget (const string &aTempTarget)
void unsetFlag (MaskType aFlag)

Static Public Member Functions

static void operator delete (void *m, size_t s)
static void operator delete (void *, void *)
static void * operator new (size_t, void *m)
static void * operator new (size_t s)

Public Attributes

int currentSource
 User ID of who we are downloading from.
qint64 downloadedBytes
 Number of bytes downloaded so far.
int id
 Internal ID.
int priority
 DC++ Priority.
qint64 size
 File size.
QList< int > sources
 List of other User IDs.
int status
 Transfer state.
QString target
 Target file name.
string tempTarget

Static Public Attributes

static FastCriticalSection cs

Private Member Functions

Source * addSource (const User::Ptr &aUser, const string &aPath)
QueueItemoperator= (const QueueItem &)
void removeSource (const User::Ptr &aUser, int reason)

Static Private Member Functions

static Source::ConstIter getSource (const User::Ptr &aUser, const string &aFile, const Source::List &lst)
static Source::Iter getSource (const User::Ptr &aUser, Source::List &lst)
static bool isSource (const User::Ptr &aUser, const string &aFile, const Source::List &lst)

Private Attributes

Source::List badSources
Source::List sources

Friends

class QueueManager

Classes

class  Source

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

Generated by  Doxygen 1.6.0   Back to index