VMCPlugin/plugins/CC/CCDummy.h

69 lines
2.1 KiB
C++

#ifndef CCDUMMY_H
#define CCDUMMY_H
#include <QObject>
#include "CCInterface.h"
#include "ATBAPPplugin.h"
class CCDummy : public QObject,
public CCInterface
{
Q_OBJECT
Q_INTERFACES(ATBAPPplugin)
Q_INTERFACES(CCInterface)
public:
CCDummy(QObject *parent = 0);
~CCDummy();
// interface:
nsCCInterface::PLUGIN_STATE initCCInterfacePlugin(QObject *healthEventReceiver, const QSettings & settings);
nsCCInterface::PLUGIN_STATE getState();
quint32 getLastError();
const QString & getLastErrorDescription();
// return a plugin description in JSON or XML
const QString & getPluginInfo();
public slots:
void requestReset();
void requestStartTransaction(quint32 amount);
void requestCancelTransaction();
void requestRevertTransaction();
void requestConfirmTransaction();
void requestDayClose();
void requestCardInfo();
void requestPreAuthTransaction(quint32 amount);
void requestCancelPreAuthTransaction(QString & receiptNumber);
void requestBookTotalTransaction(quint32 amount, QString & receiptNumber);
void wakeupCC();
void sleepCC();
signals:
void sendStartTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendCancelTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendRevertTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendConfirmTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendDayCloseResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendCardInfoResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendPreAuthTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendCancelPreAuthTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
void sendBookTotalTransactionResult(nsCCInterface::RESULT_STATE resultState, QString & result);
private:
quint32 errorCode;
QString errorCodeString;
QString errorDescription;
QString pluginInfo;
nsCCInterface::PLUGIN_STATE pluginState;
};
#endif // CCDUMMY_H