comparison ui/certificatelist.h @ 7:992c0ec57660

Add unit tests make CertificateList work.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 12 Feb 2014 16:52:27 +0000
parents 9849250f50f2
children 2ad9a96518e3
comparison
equal deleted inserted replaced
6:1f6455d46b30 7:992c0ec57660
1 1 #ifndef CERTIFICATELIST_H
2 2 #define CERTIFICATELIST_H
3 /** 3 /**
4 * This class handles a certificate list file. 4 * This class handles a certificate list file.
5 * It checks for the validity of that certificate 5 * It checks for the validity of that certificate
6 * list file and provides an API for working with that 6 * list file and provides an API for working with that
7 * file. 7 * file.
17 17
18 class QByteArray; 18 class QByteArray;
19 19
20 #include <QString> 20 #include <QString>
21 #include <QDate> 21 #include <QDate>
22 #include <QObject>
22 23
23 class CertificateList 24 #include "listutil.h"
25
26 class CertificateList : public QObject
24 { 27 {
25 Q_OBJECT 28 Q_OBJECT
26 29
27 public: 30 public:
28 CertificateList(wchar_t* fileName); 31 CertificateList(const char *fileName);
29 32
30 list_status_t getStatus(); 33 list_status_t getStatus() {return mStatus;}
34 bool isValid() {return mStatus == Valid;}
31 35
32 private: 36 private:
33 QString mFileName; 37 QString mFileName;
34 QByteArray *mFileContent; 38 QByteArray mFileContent;
35 ListStatus mStatus; 39 list_status_t mStatus;
36 QDate mDate; 40 QDate mDate;
37 } 41 };
38 42 #endif

http://wald.intevation.org/projects/trustbridge/