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.

62 lines
1.8 KiB

  1. //====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: interface to steam for game servers
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMCONTENTSERVER_H
  7. #define ISTEAMCONTENTSERVER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. //-----------------------------------------------------------------------------
  12. // Purpose: Functions for authenticating users via Steam to download content
  13. //-----------------------------------------------------------------------------
  14. class ISteamContentServer
  15. {
  16. public:
  17. // connection functions
  18. virtual void LogOn( uint32 uContentServerID ) = 0;
  19. virtual void LogOff() = 0;
  20. virtual bool BLoggedOn() = 0;
  21. // user authentication functions
  22. virtual bool SendClientContentAuthRequest( CSteamID steamID, uint32 uContentID, uint64 ulSessionToken, bool bTokenPresent ) = 0;
  23. // Check a Steam3-created content ticket. Does not need to connect to Steam3 to validate it,
  24. // so this is a backup for when the above call is not available (disconnected).
  25. virtual bool BCheckTicket( CSteamID steamID, uint32 uContentID, const void *pvTicketData, uint32 cubTicketLength ) = 0;
  26. // some sort of status stuff here eventually
  27. };
  28. #define STEAMCONTENTSERVER_INTERFACE_VERSION "SteamContentServer002"
  29. // callbacks
  30. #pragma pack( push, 8 )
  31. // client has been approved to download the content
  32. struct CSClientApprove_t
  33. {
  34. enum { k_iCallback = k_iSteamContentServerCallbacks + 1 };
  35. CSteamID m_SteamID;
  36. uint32 m_uContentID;
  37. };
  38. // client has been denied to connection to this game server
  39. struct CSClientDeny_t
  40. {
  41. enum { k_iCallback = k_iSteamContentServerCallbacks + 2 };
  42. CSteamID m_SteamID;
  43. uint32 m_uContentID;
  44. EDenyReason m_eDenyReason;
  45. };
  46. #pragma pack( pop )
  47. #endif // ISTEAMGAMESERVER_H