comparison src/versiontester.h @ 491:1d90cd7a1c5f

Add tester for newer version
author Chris Cannam
date Thu, 18 Aug 2011 13:15:38 +0100
parents
children 533519ebc0cb
comparison
equal deleted inserted replaced
489:86cdaa346e59 491:1d90cd7a1c5f
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 EasyMercurial
5
6 Based on hgExplorer by Jari Korhonen
7 Copyright (c) 2010 Jari Korhonen
8 Copyright (c) 2011 Chris Cannam
9 Copyright (c) 2011 Queen Mary, University of London
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #ifndef _VERSION_TESTER_H_
19 #define _VERSION_TESTER_H_
20
21 #include <QStringList>
22 #include <QString>
23 #include <QObject>
24
25 class QHttpResponseHeader;
26
27 class VersionTester : public QObject
28 {
29 Q_OBJECT
30
31 public:
32 VersionTester(QString hostname, QString versionFilePath, QString myVersion);
33 virtual ~VersionTester();
34
35 static bool isVersionNewerThan(QString, QString);
36
37 signals:
38 void newerVersionAvailable(QString);
39
40 protected slots:
41 void httpResponseHeaderReceived(const QHttpResponseHeader &);
42 void httpDone(bool);
43
44 private:
45 bool m_httpFailed;
46 QString m_myVersion;
47 };
48
49 #endif
50