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.
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#ifndef EETSENDER_H
|
|
#define EETSENDER_H
|
|
|
|
#include <QObject>
|
|
|
|
#include "eetcpp_global.h"
|
|
#include "eetrequest.h"
|
|
#include "eettemplate.h"
|
|
#include "eetresult.h"
|
|
|
|
#define PRODUCTION_URL "https://prod.eet.cz/eet/services/EETServiceSOAP/v3"
|
|
#define PLAYGROUND_URL "https://pg.eet.cz/eet/services/EETServiceSOAP/v3"
|
|
|
|
class QNetworkAccessManager;
|
|
class QNetworkReply;
|
|
|
|
class EETCPPSHARED_EXPORT EetSender : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit EetSender(QObject *parent = 0);
|
|
|
|
void sendRequest(EetRequest *request);
|
|
void setupSigner(const QString &certPath, const QString &passwd);
|
|
|
|
void setCheckSignature(bool checkSignature);
|
|
bool checkSignature() const;
|
|
|
|
void setPlayground(bool pg);
|
|
|
|
EetResult *resut() const;
|
|
|
|
private:
|
|
static const QString ms_nsDef;
|
|
EetSigner *m_signer;
|
|
QNetworkAccessManager *m_manager;
|
|
bool m_checkSignature;
|
|
EetResult *m_resut;
|
|
QString m_serviceUrl;
|
|
|
|
bool verifySignature(const QByteArray &repData);
|
|
|
|
private slots:
|
|
void replyFinished(QNetworkReply *reply);
|
|
|
|
signals:
|
|
void sendFinished(EetResult *result);
|
|
|
|
public slots:
|
|
};
|
|
|
|
#endif // EETSENDER_H
|