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.

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