//////////////////////////////////////////////////////////////////////////////
//
// Asura_PC_SteamworksAchievements.h
//
// Copyright (c) 2009 Rebellion. All rights reserved.
//
// Description:
//
//     Asura wrapper class for steam achievements
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef ASURA_PC_STEAMWORKSACHIEVEMENTS_H___
#define ASURA_PC_STEAMWORKSACHIEVEMENTS_H___ 1

#ifdef ASURA_USE_REWARDS
#ifdef ASURA_PC_SUPPORT_STEAMWORKS

#include "Network/Steamworks/Asura_PC_Steamworks.h"

class Asura_PC_SteamworksAchievements
{
public:
	static void Initialise();
	static void Shutdown();

	static bool IsInitComplete();

	static const char* Project_ConvertReward(u_int uRewardIndex); //project function to map independent reward index to achievement name. return null if no achievment mapped (non-pc reward)

	static void AchievementProgress(const char* szName, u_int uProgress, u_int uTarget);	//Wrapper for SDK code to report achievement progress

	static void UnlockAchievement(const char* szName);	//Wrapper for SDK code to unlock a reward.

	static void LockAchievement(const char* szName);	//Wrapper for SDK code to lock a reward. Mainly for debug use, I doubt we'd want to do this in a release title

	static bool IsAchievementUnlocked(const char* szName);	//Possibly wrapper for SDK code to query if a reward is unlocked, but this is time consuming for some platforms, so the list will need to be enumerated and stored at initialisation.

private:
	static Asura_PC_Steam_Callback< UserAchievementStored_t > s_xCallback_AchievementStored;
	static void Callback_AchievementStored ( const UserAchievementStored_t* const pxParam );
};

#endif // #ifdef ASURA_PC_SUPPORT_STEAMWORKS
#endif // #ifdef ASURA_USE_REWARDS

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

#endif // #ifndef ASURA_PC_STEAMWORKSACHIEVEMENTS_H___
