/*
 *  Copyright (C) 2007-2008 CMM Sigma Andrzej Chmielowiec <cmmsigma@cmmsigma.eu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#ifndef CERTIFICATE_H
#define CERTIFICATE_H

#include <QTreeWidgetItem>
#include <QDateTime>
#include "Subject.h"

class Certificate: public QTreeWidgetItem, public Subject
{
public:
	void setState(const QString &state);
	void setSerial(const QString &serial);
	void setFileName(const QString &name);
	void setText(const QString &text);
	void setSubject(const QString &subj);
	void setNotBefore(QString time);
	void setNotAfter(QString time);
	void setRevocationDate(QString time);
	void setRevocationReason(QString reason);
	
	QString state();
	int serial();
	QString fileName();
	QString text();
	QString subject();
	QString signatureAlgorithm();
	QDateTime notBefore();
	QDateTime notAfter();
	QDateTime revocationDate();
	QString revocationReason();
	
private:
	QString mState;
	int mSerial;
	QString mFileName;
	QString mText;
	QDateTime mNotBefore;
	QDateTime mNotAfter;
	QDateTime mRevocationDate;
	QString mRevocationReason;
	QString mSigAlg;
	
};

#endif
