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

8 years ago
#ifndef EETTEMPLATE_H
#define EETTEMPLATE_H
#include <QObject>
#include <QString>
#include <QMap>
#include "eetrequest.h"
#include "eetsigner.h"
8 years ago
#define BODY_TEMPLATE ":/res/template_body.txt"
#define REQUEST_TEMPLATE ":/res/template_request.txt"
#define SIGNATURE_TEMPLATE ":/res/template_signature.txt"
class EetResult;
8 years ago
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);
8 years ago
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;
8 years ago
};
#endif // EETTEMPLATE_H