I am trying to get App42 to work with Marmalade. When I call GameService::GetAllGames and pass in my callback function, the callback function is never performing. Is there some sort of update function or event trigger function that I need to call to get all of the callback functions to work? I attached my code. Let me know you see anything that is wrong. For right now I am just doing everything inside the Leaderboards::Initialize(); That initialize is being called somewhere else.
class Leaderboards
{
private:
static GameService* gameService;
static ScoreBoardService* scoreboardService;
static ScoreService* scoreService;
static RewardService* rewardService;
public:
Leaderboards();
~Leaderboards();
static void Initialize();
static void Update();
static void Connect();
static void Shutdown();
};
class CApp42Callback : public IApp42Callback
{
public:
CApp42Callback(){;}
void onResult(App42Result* _result);
};
Leaderboards::Leaderboards()
{
}
Leaderboards::~Leaderboards()
{
}
void Leaderboards::Initialize()
{
GameService::Initialize(APP_WARP_API_KEY, APP_WARP_SECRET_KEY);
gameService = GameService::GetInstance();
CApp42Callback* authGameCallback = NULL;
GameService::GetInstance()->GetAllGames(authGameCallback);
gameService->GetAllGames(authGameCallback);
if(authGameCallback)
{
delete authGameCallback;
authGameCallback = NULL;
}
}
void Leaderboards::Update()
{
}
void Leaderboards::Connect()
{
}
void Leaderboards::Shutdown()
{
}
void CApp42Callback::onResult(App42Result* _result)
{
IwDebugTraceLinePrintf("GameResult::body is %s", _result->getBody().c_str());
bool thisThing = true;
thisThing = false;
}