2013-04-22 17:11:45 +08:00
|
|
|
#include "ProtocolAds.h"
|
|
|
|
|
|
|
|
namespace cocos2d { namespace plugin {
|
|
|
|
|
|
|
|
ProtocolAds::ProtocolAds()
|
2013-04-27 17:29:20 +08:00
|
|
|
: m_pListener(NULL)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ProtocolAds::~ProtocolAds()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ProtocolAds::init()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::configDeveloperInfo(TAdsDeveloperInfo devInfo)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::showAds(AdsType type, int sizeEnum, AdsPos pos)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::hideAds(AdsType type)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::spendPoints(int points)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::setDebugMode(bool debug)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
// For the callbak methods
|
|
|
|
void ProtocolAds::setAdsListener(AdsListener* pListener)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
2013-04-27 17:29:20 +08:00
|
|
|
m_pListener = pListener;
|
2013-04-22 17:11:45 +08:00
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::onAdsResult(AdsResultCode code, const char* msg)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
if (m_pListener != NULL)
|
|
|
|
{
|
2013-04-27 17:29:20 +08:00
|
|
|
m_pListener->onAdsResult(code, msg);
|
2013-04-22 17:11:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-27 17:29:20 +08:00
|
|
|
void ProtocolAds::onPlayerGetPoints(int points)
|
2013-04-22 17:11:45 +08:00
|
|
|
{
|
|
|
|
if (m_pListener != NULL)
|
|
|
|
{
|
2013-04-27 17:29:20 +08:00
|
|
|
m_pListener->onPlayerGetPoints(this, points);
|
2013-04-22 17:11:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* ProtocolAds::getSDKVersion()
|
|
|
|
{
|
|
|
|
return "Subclass should override this interface";
|
|
|
|
}
|
|
|
|
|
|
|
|
}} //namespace cocos2d { namespace plugin {
|