svapp
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. See the file 00012 COPYING included with this distribution for more information. 00013 */ 00014 00015 /* 00016 This is a modified version of a source file from the 00017 Rosegarden MIDI and audio sequencer and notation editor. 00018 This file copyright 2000-2009 Chris Cannam. 00019 */ 00020 00021 #ifndef _VERSION_TESTER_H_ 00022 #define _VERSION_TESTER_H_ 00023 00024 #include <QStringList> 00025 #include <QString> 00026 #include <QObject> 00027 #include <QNetworkReply> 00028 00029 class QNetworkAccessManager; 00030 00031 class VersionTester : public QObject 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 VersionTester(QString hostname, QString versionFilePath, QString myVersion); 00037 virtual ~VersionTester(); 00038 00039 static bool isVersionNewerThan(QString, QString); 00040 00041 signals: 00042 void newerVersionAvailable(QString); 00043 00044 protected slots: 00045 void finished(); 00046 void error(QNetworkReply::NetworkError); 00047 00048 private: 00049 QString m_myVersion; 00050 QNetworkReply *m_reply; 00051 bool m_httpFailed; 00052 QNetworkAccessManager *m_nm; 00053 }; 00054 00055 #endif 00056