VersionTester.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version. See the file
12  COPYING included with this distribution for more information.
13 */
14 
15 /*
16  This is a modified version of a source file from the
17  Rosegarden MIDI and audio sequencer and notation editor.
18  This file copyright 2000-2009 Chris Cannam.
19 */
20 
21 #ifndef SV_VERSION_TESTER_H
22 #define SV_VERSION_TESTER_H
23 
24 #include <QStringList>
25 #include <QString>
26 #include <QObject>
27 #include <QNetworkReply>
28 
29 class QNetworkAccessManager;
30 
31 class VersionTester : public QObject
32 {
33  Q_OBJECT
34 
35 public:
36  VersionTester(QString hostname, QString versionFilePath, QString myVersion);
37  virtual ~VersionTester();
38 
39  static bool isVersionNewerThan(QString, QString);
40 
41 signals:
42  void newerVersionAvailable(QString);
43 
44 protected slots:
45  void finished();
46  void error(QNetworkReply::NetworkError);
47 
48 private:
49  QString m_myVersion;
50  QNetworkReply *m_reply;
52  QNetworkAccessManager *m_nm;
53 };
54 
55 #endif
56 
static bool isVersionNewerThan(QString, QString)
QString m_myVersion
Definition: VersionTester.h:49
virtual ~VersionTester()
void newerVersionAvailable(QString)
void error(QNetworkReply::NetworkError)
QNetworkAccessManager * m_nm
Definition: VersionTester.h:52
VersionTester(QString hostname, QString versionFilePath, QString myVersion)
QNetworkReply * m_reply
Definition: VersionTester.h:50