VMCPlugin/plugins/CC/CCDummy.cpp

148 lines
2.0 KiB
C++

#include "CCDummy.h"
#include <QDebug>
using namespace nsCCInterface;
const std::string CCInterfacePluginInfoString = R"(
{
"PluginName": "CCDummy",
"Version": "1.0",
"git-describe": "",
}
)";
CCDummy::CCDummy(QObject *parent) :
QObject(parent),
errorCode(1),
errorDescription(""),
pluginState(PLUGIN_STATE::NOT_INITIALIZED)
{
this->pluginInfo = QString::fromUtf8(CCInterfacePluginInfoString.c_str());
}
CCDummy::~CCDummy()
{
}
PLUGIN_STATE CCDummy::initCCInterfacePlugin(QObject *healthEventReceiver, const QSettings & settings)
{
Q_UNUSED(healthEventReceiver)
qDebug() << "called CCDummy::initCalculatePricePlugin()";
qDebug() << " pluginName from setting is: " << settings.value("PLUGINS/CCPlugin", "").toString();
this->pluginState = PLUGIN_STATE::INITIALIZED;
return this->pluginState;
}
void CCDummy::requestReset()
{
}
void CCDummy::requestStartTransaction(quint32 amount)
{
Q_UNUSED(amount)
}
void CCDummy::requestCancelTransaction()
{
}
void CCDummy::requestRevertTransaction()
{
}
void CCDummy::requestConfirmTransaction()
{
}
void CCDummy::requestDayClose()
{
}
void CCDummy::requestCardInfo()
{
}
void CCDummy::requestPreAuthTransaction(quint32 amount)
{
Q_UNUSED(amount);
}
void CCDummy::requestCancelPreAuthTransaction(QString & receiptNumber)
{
Q_UNUSED(receiptNumber);
}
void CCDummy::requestBookTotalTransaction(quint32 amount, QString & receiptNumber)
{
Q_UNUSED(amount)
Q_UNUSED(receiptNumber)
}
void CCDummy::wakeupCC()
{
}
void CCDummy::sleepCC()
{
}
/************************************************************************************************
* Mandatory plugin methods
*
*/
PLUGIN_STATE CCDummy::getState()
{
return this->pluginState;
}
quint32 CCDummy::getLastError()
{
return this->errorCode;
}
const QString & CCDummy::getLastErrorDescription()
{
return this->errorDescription;
}
const QString & CCDummy::getPluginInfo()
{
return pluginInfo;
}