Team Fortress 2 Source Code as on 22/4/2020
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.

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