axmol/plugin/protocols/platform/ios/ProtocolIAP.cpp

55 lines
918 B
C++
Raw Normal View History

#include "ProtocolIAP.h"
namespace cocos2d { namespace plugin {
bool ProtocolIAP::m_bPaying = false;
ProtocolIAP::ProtocolIAP()
2013-04-27 17:29:20 +08:00
: m_pListener(NULL)
{
}
ProtocolIAP::~ProtocolIAP()
{
}
bool ProtocolIAP::init()
{
return true;
}
2013-04-27 17:29:20 +08:00
void ProtocolIAP::configDeveloperInfo(TIAPDeveloperInfo devInfo)
{
}
void ProtocolIAP::payForProduct(TProductInfo info)
{
}
void ProtocolIAP::setResultListener(PayResultListener* pListener)
{
m_pListener = pListener;
}
2013-04-27 17:29:20 +08:00
void ProtocolIAP::onPayResult(PayResultCode ret, const char* msg)
{
m_bPaying = false;
if (m_pListener)
{
2013-04-27 17:29:20 +08:00
m_pListener->onPayResult(ret, msg, m_curInfo);
}
m_curInfo.clear();
}
const char* ProtocolIAP::getSDKVersion()
{
return "Subclass should override this interface";
}
void ProtocolIAP::setDebugMode(bool debug)
{
}
}} //namespace cocos2d { namespace plugin {