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.

68 lines
1.9 KiB

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