You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
960 B
C++

#ifndef EETTEMPLATE_H
#define EETTEMPLATE_H
#include <QObject>
#include <QString>
#include <QMap>
#include "eetrequest.h"
#include "eetsigner.h"
#define BODY_TEMPLATE ":/res/template_body.txt"
#define REQUEST_TEMPLATE ":/res/template_request.txt"
#define SIGNATURE_TEMPLATE ":/res/template_signature.txt"
class EetResult;
class EetTemplate : public QObject
{
Q_OBJECT
public:
explicit EetTemplate(QObject *parent = 0);
EetTemplate(const QString &tmp, QObject *parent = 0);
QString fillTemplate(EetRequest *request);
QString fillTemplate(QMap<QString, QString> map);
void setSigner(EetSigner *signer) { m_signer = signer; }
void setResult(EetResult *result);
signals:
public slots:
private:
QString m_template;
QString fillTemplateInternal(EetRequest *request, QMap<QString, QString> *map);
QString getPkpString(EetRequest *request);
EetSigner *m_signer;
EetResult *m_result;
};
#endif // EETTEMPLATE_H