UBSoftwareUpdateController.h 1.59 KB
Newer Older
Claudio Valerio's avatar
Claudio Valerio committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

/*
 * UBSoftwareUpdateController.h
 *
 *  Created on: May 11, 2009
 *      Author: Jerome Marchaud
 */

//#ifndef UBSOFTWAREUPDATECONTROLLER_H_
//#define UBSOFTWAREUPDATECONTROLLER_H_

//#include <QObject>
//#include <QUrl>

//class UBVersion;
//class UBSoftwareUpdate;
//class UBHttpGet;

//class UBSoftwareUpdateController : public QObject
//{
//    Q_OBJECT;

//    public:
//        UBSoftwareUpdateController(QObject *parent = 0);
//        virtual ~UBSoftwareUpdateController();

//        void beginRssDownload(const QUrl &url);
//        void beginInstallerDownload(const QUrl &url);

//        static const UBSoftwareUpdate* searchForMoreRecentAndAsStableSoftwareUpdate(const UBVersion &installedVersion,
//                const QList<UBSoftwareUpdate *> &softwareUpdates);

//    signals:
//        void softwareUpdateAvailable(const UBVersion &installedVersion, const UBSoftwareUpdate &softwareUpdate);
//        void noSoftwareUpdateAvailable();
//        void failedToRetrieveSoftwareUpdateInfo();

//    private slots:
//        void rssDownloadFinished(bool success, const QByteArray &payload);
//        void installerDownloadProgress(qint64 receivedBytes, qint64 bytesTotal);
//        void installerDownloadFinished(bool success, QUrl sourceUrl, QString header, QByteArray data);

//    private:
//        // Helpers
//        void parseRss(const QByteArray &rssContent);

//        UBHttpGet *mHttp;
//        qreal mLastDisplayedProgress;

//        static const int sMinDisplayedDownloadedSizeInBytes;
//        static const qreal sProgressPercentageStep;
//};

//#endif // UBSOFTWAREUPDATECONTROLLER_H_