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.

91 lines
3.8 KiB

  1. //====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: interface to steam.dll, for bridging steam2 data into steam3 client
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAM2BRIDGE_H
  7. #define ISTEAM2BRIDGE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #ifdef CreateProcess
  12. #undef CreateProcess
  13. #endif
  14. //-----------------------------------------------------------------------------
  15. // Purpose: bridge functions to steam.dll
  16. //-----------------------------------------------------------------------------
  17. class ISteam2Bridge
  18. {
  19. public:
  20. virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0;
  21. virtual void SetAccountName( const char *pchAccountName ) = 0;
  22. virtual bool SetPassword( const char *pchPassword ) = 0;
  23. virtual void SetAccountCreationTime( RTime32 rt ) = 0;
  24. virtual bool CreateProcess( void *lpVACBlob, uint cbBlobSize, const char *lpApplicationName, char *lpCommandLine, uint32 dwCreationFlags, void *lpEnvironment, char *lpCurrentDirectory, uint32 nGameID ) = 0;
  25. virtual EUniverse GetConnectedUniverse() = 0;
  26. virtual const char *GetIPCountry() = 0;
  27. virtual uint32 GetNumLicenses() = 0;
  28. virtual int32 GetLicensePackageID( uint32 nLicenseIndex ) = 0;
  29. virtual uint32 GetLicenseTimeCreated( uint32 nLicenseIndex ) = 0;
  30. virtual uint32 GetLicenseTimeNextProcess( uint32 nLicenseIndex ) = 0;
  31. virtual int32 GetLicenseMinuteLimit( uint32 nLicenseIndex ) = 0;
  32. virtual int32 GetLicenseMinutesUsed( uint32 nLicenseIndex ) = 0;
  33. virtual EPaymentMethod GetLicensePaymentMethod( uint32 nLicenseIndex ) = 0;
  34. virtual uint32 GetLicenseFlags( uint32 nLicenseIndex ) = 0;
  35. virtual const char * GetLicensePurchaseCountryCode( uint32 nLicenseIndex ) = 0;
  36. virtual void SetOfflineMode( bool bOffline ) = 0;
  37. virtual uint64 GetCurrentSessionToken() = 0;
  38. virtual void SetCellID( CellID_t cellID ) = 0;
  39. virtual void SetSteam2FullASTicket( uint8 *pubTicket, int cubTicket ) = 0;
  40. virtual bool BUpdateAppOwnershipTicket( uint32 nAppID, bool bOnlyUpdateIfStale ) = 0;
  41. // Gets the length of the current ticket for the given appid, 0 means no ticket available
  42. virtual uint32 GetAppOwnershipTicketLength( uint32 nAppID ) = 0;
  43. // Gets the data for the app ownership ticket for a given appid. Returns the length of the buffer
  44. // which was used, or 0 if the buffer was too small to contain the ticket (and signature which is always on the end).
  45. virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength ) = 0;
  46. virtual bool GetAppDecryptionKey( uint32 nDepotID, void *pvBuffer, uint32 cbBufferLength ) = 0; // this is for depots
  47. virtual const char *GetPlatformName( bool *bIs64Bit ) = 0;
  48. virtual int32 GetSteam2FullASTicket( uint8 *pubTicket, int cubTicket ) = 0;
  49. };
  50. #define STEAM2BRIDGE_INTERFACE_VERSION "STEAM2BRIDGE_INTERFACE_VERSION002"
  51. #ifndef ICLIENTUSER_H
  52. //-----------------------------------------------------------------------------
  53. // Purpose: Signaled whenever licenses change
  54. //-----------------------------------------------------------------------------
  55. struct LicensesUpdated_t
  56. {
  57. enum { k_iCallback = k_iSteamUserCallbacks + 25 };
  58. };
  59. //-----------------------------------------------------------------------------
  60. // Purpose: Status of a Steam-launched application lifetime
  61. //-----------------------------------------------------------------------------
  62. struct AppLifetimeNotice_t
  63. {
  64. enum { k_iCallback = k_iSteamUserCallbacks + 30 };
  65. int32 m_nAppID; // AppID - subset of gameid, left in for backcompat to steam2 listener.
  66. int32 m_nInstanceID; // Instance ID of this App
  67. bool m_bExiting; // launched if false, exiting if true
  68. CGameID m_gameID; // the full game id, Steam2 doesn't see this
  69. };
  70. #endif
  71. #endif // ISTEAM2BRIDGE_H