diff -r 6aeb7a756187 -r 3c88a81ff781 utilities/downloadmanager/inc/download.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/utilities/downloadmanager/inc/download.h Fri Oct 15 17:30:59 2010 -0400 @@ -0,0 +1,62 @@ +/** + This file is part of CWRT package ** + + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU (Lesser) General Public License as + published by the Free Software Foundation, version 2.1 of the License. + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + (Lesser) General Public License for more details. You should have + received a copy of the GNU (Lesser) General Public License along + with this program. If not, see . +*/ + +#ifndef DOWNLOAD_H +#define DOWNLOAD_H + +#include "dmcommon.h" +#include "downloadevent.h" +#include + +class DownloadManager; +class QNetworkReply; +class DownloadInfo; +class DownloadPrivate; + +typedef QList EventReceiverList; + +// class declaration +class Download : public QObject +{ + Q_OBJECT +public: + virtual ~Download() {}; + + // starts the download + virtual int start() = 0; + // id of the download + virtual int id() = 0; + // sets the attributes for the download + virtual int setAttribute(DownloadAttribute attr, const QVariant& value) = 0; + // fetches the attributes of download + virtual QVariant getAttribute(DownloadAttribute attr) = 0; + // pauses the download + virtual int pause() = 0; + // resumes the download + virtual int resume() = 0; + // cancels the download + virtual int cancel() = 0; + // registers the event listener + virtual void registerEventReceiver(QObject *receiver) = 0; + // unregisters the event listener + virtual void unregisterEventReceiver(QObject *receiver) = 0; + // returns the download manager + virtual DownloadManager *downloadManager() = 0; + // returns the list of child downloads + virtual void getChildren(QList& list) = 0; +}; + +#endif