Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: API to interact with Steam leaderboards on the GC.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef GCLEADERBOARDAPI_H
  8. #define GCLEADERBOARDAPI_H
  9. namespace GCSDK
  10. {
  11. class CGCBase;
  12. enum { kInvalidLeaderboardID = 0 };
  13. /**
  14. * Yielding call that attempts to find a leaderboard by name, creating one if necessary.
  15. * @param pName
  16. * @param eLeaderboardSortMethod
  17. * @param eLeaderboardDisplayType
  18. * @param bCreateIfNotFound
  19. * @return 0 if the leaderboard was not found, > 0 otherwise
  20. */
  21. uint32 Leaderboard_YieldingFind( const char *pName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType, bool bCreateIfNotFound );
  22. /**
  23. * Yielding call that attempts to set the score for the steamID in the leaderboard.
  24. * @param unLeaderboardID
  25. * @param steamID
  26. * @param eLeaderboardUploadScoreMethod
  27. * @param score
  28. * @param pDetails
  29. * @param unDetailsLength
  30. * @return true if successful, false otherwise.
  31. */
  32. bool Leaderboard_YieldingSetScore( uint32 unLeaderboardID, const CSteamID &steamID, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int score );
  33. }; // namespace GCSDK
  34. #endif // GCLEADERBOARDAPI_H