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.

63 lines
2.4 KiB

  1. //====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: interface to app data in Steam
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMAPPLIST_H
  7. #define ISTEAMAPPLIST_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "isteamclient.h"
  12. #include "steamtypes.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose: This is a restricted interface that can only be used by previously approved apps,
  15. // contact your Steam Account Manager if you believe you need access to this API.
  16. // This interface lets you detect installed apps for the local Steam client, useful for debugging tools
  17. // to offer lists of apps to debug via Steam.
  18. //-----------------------------------------------------------------------------
  19. class ISteamAppList
  20. {
  21. public:
  22. virtual uint32 GetNumInstalledApps() = 0;
  23. virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
  24. virtual int GetAppName( AppId_t nAppID, OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found
  25. virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found
  26. virtual int GetAppBuildId( AppId_t nAppID ) = 0; // return the buildid of this app, may change at any time based on backend updates to the game
  27. };
  28. #define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
  29. // callbacks
  30. #if defined( VALVE_CALLBACK_PACK_SMALL )
  31. #pragma pack( push, 4 )
  32. #elif defined( VALVE_CALLBACK_PACK_LARGE )
  33. #pragma pack( push, 8 )
  34. #else
  35. #error isteamclient.h must be included
  36. #endif
  37. //---------------------------------------------------------------------------------
  38. // Purpose: Sent when a new app is installed
  39. //---------------------------------------------------------------------------------
  40. DEFINE_CALLBACK( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
  41. CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
  42. END_DEFINE_CALLBACK_1()
  43. //---------------------------------------------------------------------------------
  44. // Purpose: Sent when an app is uninstalled
  45. //---------------------------------------------------------------------------------
  46. DEFINE_CALLBACK( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
  47. CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
  48. END_DEFINE_CALLBACK_1()
  49. #pragma pack( pop )
  50. #endif // ISTEAMAPPLIST_H