WRT::DownloadManager Class Reference

#include <mw/cwrt/downloadmanager.h>

Link against: WrtDownloadMgr.lib

class WRT::DownloadManager : public QObject, public QObject

The public APIs for managing the downloads.

Inherits from

  • WRT::DownloadManager
    Public Member Functions
    DownloadManager(const QString &)
    virtual ~DownloadManager()
    QVariant attribute(DownloadManagerAttribute)
    Download *createDownload(const QString &, DownloadType)
    Download *createDownload(QNetworkReply *)
    QList< Download * >currentDownloads()
    Download *findDownload(int)
    QList< Download * >findDownload(const QString &)
    intinitialize(bool)
    voidpauseAll()
    QNetworkProxy *proxy()
    voidremoveAll()
    voidremoveOne(Download *)
    intsetAttribute(DownloadManagerAttribute, const QVariant &)
    voidsetProxy(const QString &, int)
    voidstartAll()
    Public Signals
    voiddownloadManagerEvent(DownloadManagerEvent *)
    Inherited Attributes
    QObject::d_ptr
    QObject::objectName
    QObject::staticQtMetaObject
    Inherited Functions
    QObject::QObject(QObjectPrivate &,QObject *)
    QObject::blockSignals(bool)
    QObject::childEvent(QChildEvent *)
    QObject::children()const
    QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const
    QObject::connectNotify(const char *)
    QObject::customEvent(QEvent *)
    QObject::deleteLater
    QObject::destroyed
    QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &)
    QObject::disconnect(const QObject *,const char *)
    QObject::disconnect(const QObject *,const char *,const QObject *,const char *)
    QObject::disconnect(const char *,const QObject *,const char *)
    QObject::disconnectNotify(const char *)
    QObject::dumpObjectInfo()
    QObject::dumpObjectTree()
    QObject::dynamicPropertyNames()const
    QObject::event(QEvent *)
    QObject::eventFilter(QObject *,QEvent *)
    QObject::findChild(const QString &)const
    QObject::findChildren(const QRegExp &)const
    QObject::findChildren(const QString &)const
    QObject::inherits(const char *)const
    QObject::installEventFilter(QObject *)
    QObject::isWidgetType()const
    QObject::killTimer(int)
    QObject::moveToThread(QThread *)
    QObject::objectName()const
    QObject::parent()const
    QObject::property(const char *)const
    QObject::receivers(const char *)const
    QObject::registerUserData()
    QObject::removeEventFilter(QObject *)
    QObject::sender()const
    QObject::senderSignalIndex()const
    QObject::setObjectName(const QString &)
    QObject::setParent(QObject *)
    QObject::setProperty(const char *,const QVariant &)
    QObject::setUserData(uint,QObjectUserData *)
    QObject::signalsBlocked()const
    QObject::startTimer(int)
    QObject::thread()const
    QObject::timerEvent(QTimerEvent *)
    QObject::userData(uint)const
    QObject::~QObject()

    Detailed Description

    This class has the public APIs for managing the downloads

    Constructor & Destructor Documentation

    DownloadManager ( const QString & )

    DownloadManager(const QString &clientName)

    creates an instance of download manager clientName indicates the name of the client

    ~DownloadManager ( )

    ~DownloadManager()[virtual]

    destructor for the download manager

    Member Function Documentation

    attribute ( DownloadManagerAttribute )

    QVariant attribute(DownloadManagerAttributeattr)

    fetches download manager attribute attr indicates download manager attribute whos value to be returned

    createDownload ( const QString &, DownloadType )

    Download *createDownload(const QString &url,
    DownloadTypetype = Parallel
    )

    returns new download url indicates download url type indicates whether it is sequential or parallel download

    createDownload ( QNetworkReply * )

    Download *createDownload(QNetworkReply *reply)

    returns new download reply indicates network reply which is already initiated

    currentDownloads ( )

    QList< Download * >currentDownloads()

    returns all the current downloads

    downloadManagerEvent ( DownloadManagerEvent * )

    voiddownloadManagerEvent(DownloadManagerEvent *)[signal]

    findDownload ( int )

    Download *findDownload(intdlId)

    finds a download provided id if exists id indicates identifier for download

    findDownload ( const QString & )

    QList< Download * >findDownload(const QString &url)

    finds download with the matching URL url indicates url of the download

    initialize ( bool )

    intinitialize(boolbackgroundMode = false)

    initialises all the downloads which belongs to last download manager session

    pauseAll ( )

    voidpauseAll()

    pauses all the downloads which are in progress

    proxy ( )

    QNetworkProxy *proxy()

    returns the proxy used

    removeAll ( )

    voidremoveAll()

    cancels all the downloads

    removeOne ( Download * )

    voidremoveOne(Download *dl)

    cancels and removes the download dl indicates the download to be canceled and removed

    setAttribute ( DownloadManagerAttribute, const QVariant & )

    intsetAttribute(DownloadManagerAttributeattr,
    const QVariant &value
    )

    sets download manager attribute attr indicates download manager attribute value indicates value to be set

    setProxy ( const QString &, int )

    voidsetProxy(const QString &proxyServer,
    intport
    )

    sets the proxy proxyServer indicates proxy server name port indicates port number

    startAll ( )

    voidstartAll()

    resumes all the downloads which are paused