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.

520 lines
20 KiB

  1. //====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: Main interface for loading and accessing Steamworks API's from the
  4. // Steam client.
  5. // For most uses, this code is wrapped inside of SteamAPI_Init()
  6. //=============================================================================
  7. #ifndef ISTEAMCLIENT_H
  8. #define ISTEAMCLIENT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "steamtypes.h"
  13. #include "steamclientpublic.h"
  14. // Define compile time assert macros to let us validate the structure sizes.
  15. #define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
  16. #ifndef REFERENCE
  17. #define REFERENCE(arg) ((void)arg)
  18. #endif
  19. #if defined(STEAM_API_EXPORTS) && !defined(API_GEN)
  20. #define STEAM_PRIVATE_API( ... ) __VA_ARGS__
  21. #elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
  22. #define STEAM_PRIVATE_API( ... )
  23. #else
  24. #define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
  25. #endif
  26. #if defined(__linux__) || defined(__APPLE__)
  27. // The 32-bit version of gcc has the alignment requirement for uint64 and double set to
  28. // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
  29. // The 64-bit version of gcc has the alignment requirement for these types set to
  30. // 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
  31. // The 64-bit structure packing has to match the 32-bit structure packing for each platform.
  32. #define VALVE_CALLBACK_PACK_SMALL
  33. #else
  34. #define VALVE_CALLBACK_PACK_LARGE
  35. #endif
  36. #if defined( VALVE_CALLBACK_PACK_SMALL )
  37. #pragma pack( push, 4 )
  38. #elif defined( VALVE_CALLBACK_PACK_LARGE )
  39. #pragma pack( push, 8 )
  40. #else
  41. #error ???
  42. #endif
  43. typedef struct ValvePackingSentinel_t
  44. {
  45. uint32 m_u32;
  46. uint64 m_u64;
  47. uint16 m_u16;
  48. double m_d;
  49. } ValvePackingSentinel_t;
  50. #pragma pack( pop )
  51. #if defined(VALVE_CALLBACK_PACK_SMALL)
  52. VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 )
  53. #elif defined(VALVE_CALLBACK_PACK_LARGE)
  54. VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 32 )
  55. #else
  56. #error ???
  57. #endif
  58. // handle to a communication pipe to the Steam client
  59. typedef int32 HSteamPipe;
  60. // handle to single instance of a steam user
  61. typedef int32 HSteamUser;
  62. // function prototype
  63. #if defined( POSIX )
  64. #define __cdecl
  65. #endif
  66. extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
  67. extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum );
  68. #if defined( __SNC__ )
  69. #pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor
  70. #endif
  71. // interface predec
  72. class ISteamUser;
  73. class ISteamGameServer;
  74. class ISteamFriends;
  75. class ISteamUtils;
  76. class ISteamMatchmaking;
  77. class ISteamContentServer;
  78. class ISteamMatchmakingServers;
  79. class ISteamUserStats;
  80. class ISteamApps;
  81. class ISteamNetworking;
  82. class ISteamRemoteStorage;
  83. class ISteamScreenshots;
  84. class ISteamMusic;
  85. class ISteamMusicRemote;
  86. class ISteamGameServerStats;
  87. class ISteamPS3OverlayRender;
  88. class ISteamHTTP;
  89. class ISteamUnifiedMessages;
  90. class ISteamController;
  91. class ISteamUGC;
  92. class ISteamAppList;
  93. class ISteamHTMLSurface;
  94. class ISteamInventory;
  95. class ISteamVideo;
  96. //-----------------------------------------------------------------------------
  97. // Purpose: Interface to creating a new steam instance, or to
  98. // connect to an existing steam instance, whether it's in a
  99. // different process or is local.
  100. //
  101. // For most scenarios this is all handled automatically via SteamAPI_Init().
  102. // You'll only need these APIs if you have a more complex versioning scheme,
  103. // or if you want to implement a multiplexed gameserver where a single process
  104. // is handling multiple games at once with independent gameserver SteamIDs.
  105. //-----------------------------------------------------------------------------
  106. class ISteamClient
  107. {
  108. public:
  109. // Creates a communication pipe to the Steam client.
  110. // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
  111. virtual HSteamPipe CreateSteamPipe() = 0;
  112. // Releases a previously created communications pipe
  113. // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
  114. virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0;
  115. // connects to an existing global user, failing if none exists
  116. // used by the game to coordinate with the steamUI
  117. // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
  118. virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
  119. // used by game servers, create a steam user that won't be shared with anyone else
  120. // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
  121. virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0;
  122. // removes an allocated user
  123. // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
  124. virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
  125. // retrieves the ISteamUser interface associated with the handle
  126. virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  127. // retrieves the ISteamGameServer interface associated with the handle
  128. virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  129. // set the local IP and Port to bind to
  130. // this must be set before CreateLocalUser()
  131. virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0;
  132. // returns the ISteamFriends interface
  133. virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  134. // returns the ISteamUtils interface
  135. virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  136. // returns the ISteamMatchmaking interface
  137. virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  138. // returns the ISteamMatchmakingServers interface
  139. virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  140. // returns the a generic interface
  141. virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  142. // returns the ISteamUserStats interface
  143. virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  144. // returns the ISteamGameServerStats interface
  145. virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  146. // returns apps interface
  147. virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  148. // networking
  149. virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  150. // remote storage
  151. virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  152. // user screenshots
  153. virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  154. // Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
  155. STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
  156. // returns the number of IPC calls made since the last time this function was called
  157. // Used for perf debugging so you can understand how many IPC calls your game makes per frame
  158. // Every IPC call is at minimum a thread context switch if not a process one so you want to rate
  159. // control how often you do them.
  160. virtual uint32 GetIPCCallCount() = 0;
  161. // API warning handling
  162. // 'int' is the severity; 0 for msg, 1 for warning
  163. // 'const char *' is the text of the message
  164. // callbacks will occur directly after the API function is called that generated the warning or message.
  165. virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
  166. // Trigger global shutdown for the DLL
  167. virtual bool BShutdownIfAllPipesClosed() = 0;
  168. // Expose HTTP interface
  169. virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  170. // Exposes the ISteamUnifiedMessages interface
  171. virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  172. // Exposes the ISteamController interface
  173. virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  174. // Exposes the ISteamUGC interface
  175. virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  176. // returns app list interface, only available on specially registered apps
  177. virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  178. // Music Player
  179. virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  180. // Music Player Remote
  181. virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
  182. // html page display
  183. virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
  184. // Helper functions for internal Steam usage
  185. STEAM_PRIVATE_API( virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
  186. STEAM_PRIVATE_API( virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
  187. STEAM_PRIVATE_API( virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; )
  188. // inventory
  189. virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  190. // Video
  191. virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
  192. };
  193. #define STEAMCLIENT_INTERFACE_VERSION "SteamClient017"
  194. //-----------------------------------------------------------------------------
  195. // Purpose: Base values for callback identifiers, each callback must
  196. // have a unique ID.
  197. //-----------------------------------------------------------------------------
  198. enum { k_iSteamUserCallbacks = 100 };
  199. enum { k_iSteamGameServerCallbacks = 200 };
  200. enum { k_iSteamFriendsCallbacks = 300 };
  201. enum { k_iSteamBillingCallbacks = 400 };
  202. enum { k_iSteamMatchmakingCallbacks = 500 };
  203. enum { k_iSteamContentServerCallbacks = 600 };
  204. enum { k_iSteamUtilsCallbacks = 700 };
  205. enum { k_iClientFriendsCallbacks = 800 };
  206. enum { k_iClientUserCallbacks = 900 };
  207. enum { k_iSteamAppsCallbacks = 1000 };
  208. enum { k_iSteamUserStatsCallbacks = 1100 };
  209. enum { k_iSteamNetworkingCallbacks = 1200 };
  210. enum { k_iClientRemoteStorageCallbacks = 1300 };
  211. enum { k_iClientDepotBuilderCallbacks = 1400 };
  212. enum { k_iSteamGameServerItemsCallbacks = 1500 };
  213. enum { k_iClientUtilsCallbacks = 1600 };
  214. enum { k_iSteamGameCoordinatorCallbacks = 1700 };
  215. enum { k_iSteamGameServerStatsCallbacks = 1800 };
  216. enum { k_iSteam2AsyncCallbacks = 1900 };
  217. enum { k_iSteamGameStatsCallbacks = 2000 };
  218. enum { k_iClientHTTPCallbacks = 2100 };
  219. enum { k_iClientScreenshotsCallbacks = 2200 };
  220. enum { k_iSteamScreenshotsCallbacks = 2300 };
  221. enum { k_iClientAudioCallbacks = 2400 };
  222. enum { k_iClientUnifiedMessagesCallbacks = 2500 };
  223. enum { k_iSteamStreamLauncherCallbacks = 2600 };
  224. enum { k_iClientControllerCallbacks = 2700 };
  225. enum { k_iSteamControllerCallbacks = 2800 };
  226. enum { k_iClientParentalSettingsCallbacks = 2900 };
  227. enum { k_iClientDeviceAuthCallbacks = 3000 };
  228. enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
  229. enum { k_iClientMusicCallbacks = 3200 };
  230. enum { k_iClientRemoteClientManagerCallbacks = 3300 };
  231. enum { k_iClientUGCCallbacks = 3400 };
  232. enum { k_iSteamStreamClientCallbacks = 3500 };
  233. enum { k_IClientProductBuilderCallbacks = 3600 };
  234. enum { k_iClientShortcutsCallbacks = 3700 };
  235. enum { k_iClientRemoteControlManagerCallbacks = 3800 };
  236. enum { k_iSteamAppListCallbacks = 3900 };
  237. enum { k_iSteamMusicCallbacks = 4000 };
  238. enum { k_iSteamMusicRemoteCallbacks = 4100 };
  239. enum { k_iClientVRCallbacks = 4200 };
  240. enum { k_iClientGameNotificationCallbacks = 4300 };
  241. enum { k_iSteamGameNotificationCallbacks = 4400 };
  242. enum { k_iSteamHTMLSurfaceCallbacks = 4500 };
  243. enum { k_iClientVideoCallbacks = 4600 };
  244. enum { k_iClientInventoryCallbacks = 4700 };
  245. enum { k_iClientBluetoothManagerCallbacks = 4800 };
  246. //-----------------------------------------------------------------------------
  247. // The CALLBACK macros are for client side callback logging enabled with
  248. // log_callback <first callnbackID> <last callbackID>
  249. // Do not change any of these.
  250. //-----------------------------------------------------------------------------
  251. #ifdef STEAM_CALLBACK_INSPECTION_ENABLED
  252. #define DEFINE_CALLBACK( callbackname, callbackid ) \
  253. struct callbackname { \
  254. typedef callbackname SteamCallback_t; \
  255. enum { k_iCallback = callbackid }; \
  256. static callbackname *GetNullPointer() { return 0; } \
  257. static const char *GetCallbackName() { return #callbackname; } \
  258. static uint32 GetCallbackID() { return callbackname::k_iCallback; }
  259. #define CALLBACK_MEMBER( varidx, vartype, varname ) \
  260. public: vartype varname ; \
  261. static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \
  262. varOffset = (unsigned int)(size_t)&GetNullPointer()->varname; \
  263. varSize = sizeof( vartype ); \
  264. varCount = 1; \
  265. *pszName = #varname; *pszType = #vartype; }
  266. #define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) \
  267. public: vartype varname [ varcount ]; \
  268. static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \
  269. varOffset = (unsigned int)(size_t)&GetNullPointer()->varname[0]; \
  270. varSize = sizeof( vartype ); \
  271. varCount = varcount; \
  272. *pszName = #varname; *pszType = #vartype; }
  273. #define END_CALLBACK_INTERNAL_BEGIN( numvars ) \
  274. static uint32 GetNumMemberVariables() { return numvars; } \
  275. static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \
  276. switch ( index ) { default : return false;
  277. #define END_CALLBACK_INTERNAL_SWITCH( varidx ) case varidx : GetMemberVar_##varidx( varOffset, varSize, varCount, pszName, pszType ); return true;
  278. #define END_CALLBACK_INTERNAL_END() }; } };
  279. #define END_DEFINE_CALLBACK_0() \
  280. static uint32 GetNumMemberVariables() { return 0; } \
  281. static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { REFERENCE( pszType ); REFERENCE( pszName ); REFERENCE( varCount ); REFERENCE( varSize ); REFERENCE( varOffset ); REFERENCE( index ); return false; } \
  282. };
  283. #else
  284. #define DEFINE_CALLBACK( callbackname, callbackid ) struct callbackname { typedef callbackname SteamCallback_t; enum { k_iCallback = callbackid };
  285. #define CALLBACK_MEMBER( varidx, vartype, varname ) public: vartype varname ;
  286. #define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) public: vartype varname [ varcount ];
  287. #define END_CALLBACK_INTERNAL_BEGIN( numvars )
  288. #define END_CALLBACK_INTERNAL_SWITCH( varidx )
  289. #define END_CALLBACK_INTERNAL_END() };
  290. #define END_DEFINE_CALLBACK_0() };
  291. #endif
  292. #define END_DEFINE_CALLBACK_1() \
  293. END_CALLBACK_INTERNAL_BEGIN( 1 ) \
  294. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  295. END_CALLBACK_INTERNAL_END()
  296. #define END_DEFINE_CALLBACK_2() \
  297. END_CALLBACK_INTERNAL_BEGIN( 2 ) \
  298. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  299. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  300. END_CALLBACK_INTERNAL_END()
  301. #define END_DEFINE_CALLBACK_3() \
  302. END_CALLBACK_INTERNAL_BEGIN( 3 ) \
  303. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  304. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  305. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  306. END_CALLBACK_INTERNAL_END()
  307. #define END_DEFINE_CALLBACK_4() \
  308. END_CALLBACK_INTERNAL_BEGIN( 4 ) \
  309. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  310. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  311. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  312. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  313. END_CALLBACK_INTERNAL_END()
  314. #define END_DEFINE_CALLBACK_5() \
  315. END_CALLBACK_INTERNAL_BEGIN( 4 ) \
  316. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  317. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  318. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  319. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  320. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  321. END_CALLBACK_INTERNAL_END()
  322. #define END_DEFINE_CALLBACK_6() \
  323. END_CALLBACK_INTERNAL_BEGIN( 6 ) \
  324. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  325. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  326. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  327. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  328. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  329. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  330. END_CALLBACK_INTERNAL_END()
  331. #define END_DEFINE_CALLBACK_7() \
  332. END_CALLBACK_INTERNAL_BEGIN( 7 ) \
  333. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  334. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  335. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  336. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  337. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  338. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  339. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  340. END_CALLBACK_INTERNAL_END()
  341. #define END_DEFINE_CALLBACK_8() \
  342. END_CALLBACK_INTERNAL_BEGIN( 8 ) \
  343. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  344. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  345. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  346. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  347. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  348. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  349. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  350. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  351. END_CALLBACK_INTERNAL_END()
  352. #define END_DEFINE_CALLBACK_9() \
  353. END_CALLBACK_INTERNAL_BEGIN( 9 ) \
  354. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  355. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  356. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  357. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  358. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  359. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  360. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  361. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  362. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  363. END_CALLBACK_INTERNAL_END()
  364. #define END_DEFINE_CALLBACK_10() \
  365. END_CALLBACK_INTERNAL_BEGIN( 10 ) \
  366. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  367. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  368. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  369. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  370. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  371. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  372. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  373. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  374. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  375. END_CALLBACK_INTERNAL_SWITCH( 9 ) \
  376. END_CALLBACK_INTERNAL_END()
  377. #define END_DEFINE_CALLBACK_11() \
  378. END_CALLBACK_INTERNAL_BEGIN( 11 ) \
  379. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  380. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  381. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  382. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  383. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  384. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  385. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  386. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  387. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  388. END_CALLBACK_INTERNAL_SWITCH( 9 ) \
  389. END_CALLBACK_INTERNAL_SWITCH( 10 ) \
  390. END_CALLBACK_INTERNAL_END()
  391. #define END_DEFINE_CALLBACK_12() \
  392. END_CALLBACK_INTERNAL_BEGIN( 12 ) \
  393. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  394. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  395. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  396. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  397. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  398. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  399. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  400. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  401. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  402. END_CALLBACK_INTERNAL_SWITCH( 9 ) \
  403. END_CALLBACK_INTERNAL_SWITCH( 10 ) \
  404. END_CALLBACK_INTERNAL_SWITCH( 11 ) \
  405. END_CALLBACK_INTERNAL_END()
  406. #define END_DEFINE_CALLBACK_13() \
  407. END_CALLBACK_INTERNAL_BEGIN( 13 ) \
  408. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  409. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  410. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  411. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  412. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  413. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  414. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  415. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  416. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  417. END_CALLBACK_INTERNAL_SWITCH( 9 ) \
  418. END_CALLBACK_INTERNAL_SWITCH( 10 ) \
  419. END_CALLBACK_INTERNAL_SWITCH( 11 ) \
  420. END_CALLBACK_INTERNAL_SWITCH( 12 ) \
  421. END_CALLBACK_INTERNAL_END()
  422. #define END_DEFINE_CALLBACK_14() \
  423. END_CALLBACK_INTERNAL_BEGIN( 14 ) \
  424. END_CALLBACK_INTERNAL_SWITCH( 0 ) \
  425. END_CALLBACK_INTERNAL_SWITCH( 1 ) \
  426. END_CALLBACK_INTERNAL_SWITCH( 2 ) \
  427. END_CALLBACK_INTERNAL_SWITCH( 3 ) \
  428. END_CALLBACK_INTERNAL_SWITCH( 4 ) \
  429. END_CALLBACK_INTERNAL_SWITCH( 5 ) \
  430. END_CALLBACK_INTERNAL_SWITCH( 6 ) \
  431. END_CALLBACK_INTERNAL_SWITCH( 7 ) \
  432. END_CALLBACK_INTERNAL_SWITCH( 8 ) \
  433. END_CALLBACK_INTERNAL_SWITCH( 9 ) \
  434. END_CALLBACK_INTERNAL_SWITCH( 10 ) \
  435. END_CALLBACK_INTERNAL_SWITCH( 11 ) \
  436. END_CALLBACK_INTERNAL_SWITCH( 12 ) \
  437. END_CALLBACK_INTERNAL_SWITCH( 13 ) \
  438. END_CALLBACK_INTERNAL_END()
  439. #endif // ISTEAMCLIENT_H