Counter Strike : Global Offensive Source Code
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.

56 lines
2.0 KiB

  1. //========= Copyright (c), Valve LLC, 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. /**
  13. * Yielding call that attempts to find a leaderboard by name, creating one if necessary.
  14. * @param pName
  15. * @param eLeaderboardSortMethod
  16. * @param eLeaderboardDisplayType
  17. * @param bCreateIfNotFound
  18. * @return 0 if the leaderboard was not found, > 0 otherwise
  19. */
  20. uint32 Leaderboard_YieldingFind( const char *pName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType, bool bCreateIfNotFound );
  21. /**
  22. * Yielding call that attempts to set the score for the steamID in the leaderboard.
  23. * @param unLeaderboardID
  24. * @param steamID
  25. * @param eLeaderboardUploadScoreMethod
  26. * @param score
  27. * @param pDetails
  28. * @param unDetailsLength
  29. * @return true if successful, false otherwise.
  30. */
  31. bool Leaderboard_YieldingSetScore( uint32 unLeaderboardID, const CSteamID &steamID, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int score, uint8* pDetails = 0, uint32 unDetailsLength = 0 );
  32. /**
  33. * @param pKVOutput
  34. * @return true if successful, false otherwise.
  35. */
  36. bool Leaderboard_YieldingGetLeaderboardsForGame( KeyValuesAD* pKVOutput );
  37. /**
  38. * Yielding call that attempts to get leaderboard entries by leaderboard name
  39. * @param unRangeStart
  40. * @param unRangeEnd
  41. * @param pSteamID
  42. * @param unLeaderboardID
  43. * @param eDataRequestType
  44. * @param pKVOutput
  45. * @return number of entries found from specified range.
  46. */
  47. bool Leaderbaord_YieldingGetLeaderboardEntries( int32 nRangeStart, int32 nRangeEnd, CSteamID* pSteamID, int32 unLeaderboardID, ELeaderboardDataRequest eDataRequestType, KeyValuesAD* pKVOutput );
  48. }; // namespace GCSDK
  49. #endif // GCLEADERBOARDAPI_H