From 167bfadb32a8a0e4a9a2740aa8e9530831df715f Mon Sep 17 00:00:00 2001 From: Rat43 <> Date: Wed, 2 Oct 2019 14:51:55 +0200 Subject: [PATCH] Pushing source files. A Steam offline emulator that allows you to play Steam games in SinglePlayer. --- src/Bridge.h | 129 + src/CSteamCallbacks.cpp | 103 + src/CSteamCallbacks.h | 45 + src/ColdManager.cpp | 2346 +++++++++++++++++ src/ColdManager.h | 43 + src/INI example/ColdAPI.ini | 52 + src/InterfacesEmulation/PublicConnector.h | 169 ++ src/InterfacesEmulation/SteamAppList001.h | 30 + src/InterfacesEmulation/SteamAppTicket001.h | 33 + src/InterfacesEmulation/SteamApps001.h | 13 + src/InterfacesEmulation/SteamApps002.h | 37 + src/InterfacesEmulation/SteamApps003.h | 42 + src/InterfacesEmulation/SteamApps004.h | 71 + src/InterfacesEmulation/SteamApps005.h | 98 + src/InterfacesEmulation/SteamApps006.h | 112 + src/InterfacesEmulation/SteamApps007.h | 116 + src/InterfacesEmulation/SteamApps008.h | 139 + src/InterfacesEmulation/SteamBilling001.h | 41 + src/InterfacesEmulation/SteamBilling002.h | 198 ++ src/InterfacesEmulation/SteamClient006.h | 112 + src/InterfacesEmulation/SteamClient007.h | 117 + src/InterfacesEmulation/SteamClient008.h | 112 + src/InterfacesEmulation/SteamClient009.h | 118 + src/InterfacesEmulation/SteamClient010.h | 129 + src/InterfacesEmulation/SteamClient011.h | 133 + src/InterfacesEmulation/SteamClient012.h | 147 ++ src/InterfacesEmulation/SteamClient013.h | 163 ++ src/InterfacesEmulation/SteamClient014.h | 168 ++ src/InterfacesEmulation/SteamClient015.h | 173 ++ src/InterfacesEmulation/SteamClient016.h | 191 ++ src/InterfacesEmulation/SteamClient017.h | 196 ++ src/InterfacesEmulation/SteamClient018.h | 206 ++ src/InterfacesEmulation/SteamClient019.h | 211 ++ .../SteamContentServer001.h | 26 + .../SteamContentServer002.h | 32 + src/InterfacesEmulation/SteamController001.h | 35 + src/InterfacesEmulation/SteamController002.h | 47 + src/InterfacesEmulation/SteamController003.h | 94 + src/InterfacesEmulation/SteamController004.h | 123 + src/InterfacesEmulation/SteamController005.h | 143 + src/InterfacesEmulation/SteamController006.h | 166 ++ src/InterfacesEmulation/SteamController007.h | 176 ++ src/InterfacesEmulation/SteamFriends001.h | 133 + src/InterfacesEmulation/SteamFriends002.h | 145 + src/InterfacesEmulation/SteamFriends003.h | 102 + src/InterfacesEmulation/SteamFriends004.h | 106 + src/InterfacesEmulation/SteamFriends005.h | 124 + src/InterfacesEmulation/SteamFriends006.h | 132 + src/InterfacesEmulation/SteamFriends007.h | 141 + src/InterfacesEmulation/SteamFriends008.h | 171 ++ src/InterfacesEmulation/SteamFriends009.h | 214 ++ src/InterfacesEmulation/SteamFriends010.h | 274 ++ src/InterfacesEmulation/SteamFriends011.h | 293 ++ src/InterfacesEmulation/SteamFriends012.h | 294 +++ src/InterfacesEmulation/SteamFriends013.h | 293 ++ src/InterfacesEmulation/SteamFriends014.h | 269 ++ src/InterfacesEmulation/SteamFriends015.h | 291 ++ src/InterfacesEmulation/SteamFriends016.h | 304 +++ src/InterfacesEmulation/SteamFriends017.h | 304 +++ .../SteamGameCoordinator001.h | 24 + src/InterfacesEmulation/SteamGameSearch001.h | 75 + src/InterfacesEmulation/SteamGameServer002.h | 123 + src/InterfacesEmulation/SteamGameServer003.h | 103 + src/InterfacesEmulation/SteamGameServer004.h | 89 + src/InterfacesEmulation/SteamGameServer005.h | 93 + src/InterfacesEmulation/SteamGameServer006.h | 93 + src/InterfacesEmulation/SteamGameServer007.h | 98 + src/InterfacesEmulation/SteamGameServer008.h | 103 + src/InterfacesEmulation/SteamGameServer009.h | 113 + src/InterfacesEmulation/SteamGameServer010.h | 136 + src/InterfacesEmulation/SteamGameServer011.h | 250 ++ src/InterfacesEmulation/SteamGameServer012.h | 251 ++ .../SteamGameServerStats001.h | 51 + src/InterfacesEmulation/SteamHTMLSurface002.h | 164 ++ src/InterfacesEmulation/SteamHTMLSurface003.h | 169 ++ src/InterfacesEmulation/SteamHTMLSurface004.h | 172 ++ src/InterfacesEmulation/SteamHTMLSurface005.h | 177 ++ src/InterfacesEmulation/SteamHTTP001.h | 80 + src/InterfacesEmulation/SteamHTTP002.h | 131 + src/InterfacesEmulation/SteamHTTP003.h | 130 + src/InterfacesEmulation/SteamInput001.h | 176 ++ src/InterfacesEmulation/SteamInventory001.h | 132 + src/InterfacesEmulation/SteamInventory002.h | 217 ++ src/InterfacesEmulation/SteamInventory003.h | 242 ++ src/InterfacesEmulation/SteamMatchmaking001.h | 135 + src/InterfacesEmulation/SteamMatchmaking002.h | 122 + src/InterfacesEmulation/SteamMatchmaking003.h | 165 ++ src/InterfacesEmulation/SteamMatchmaking004.h | 158 ++ src/InterfacesEmulation/SteamMatchmaking005.h | 184 ++ src/InterfacesEmulation/SteamMatchmaking006.h | 170 ++ src/InterfacesEmulation/SteamMatchmaking007.h | 199 ++ src/InterfacesEmulation/SteamMatchmaking008.h | 207 ++ src/InterfacesEmulation/SteamMatchmaking009.h | 217 ++ .../SteamMatchmakingServers001.h | 84 + .../SteamMatchmakingServers002.h | 89 + src/InterfacesEmulation/SteamMusic001.h | 48 + src/InterfacesEmulation/SteamMusicRemote001.h | 141 + src/InterfacesEmulation/SteamNetworking001.h | 66 + src/InterfacesEmulation/SteamNetworking002.h | 76 + src/InterfacesEmulation/SteamNetworking003.h | 107 + src/InterfacesEmulation/SteamNetworking004.h | 107 + src/InterfacesEmulation/SteamNetworking005.h | 116 + .../SteamParentalSettings001.h | 34 + src/InterfacesEmulation/SteamParties002.h | 63 + src/InterfacesEmulation/SteamRemotePlay001.h | 37 + .../SteamRemoteStorage001.h | 122 + .../SteamRemoteStorage002.h | 111 + .../SteamRemoteStorage003.h | 251 ++ .../SteamRemoteStorage004.h | 257 ++ .../SteamRemoteStorage005.h | 295 +++ .../SteamRemoteStorage006.h | 363 +++ .../SteamRemoteStorage007.h | 362 +++ .../SteamRemoteStorage008.h | 380 +++ .../SteamRemoteStorage009.h | 379 +++ .../SteamRemoteStorage010.h | 385 +++ .../SteamRemoteStorage011.h | 384 +++ .../SteamRemoteStorage012.h | 384 +++ .../SteamRemoteStorage013.h | 401 +++ .../SteamRemoteStorage014.h | 448 ++++ src/InterfacesEmulation/SteamScreenshots001.h | 36 + src/InterfacesEmulation/SteamScreenshots002.h | 41 + src/InterfacesEmulation/SteamScreenshots003.h | 51 + src/InterfacesEmulation/SteamUGC001.h | 71 + src/InterfacesEmulation/SteamUGC002.h | 145 + src/InterfacesEmulation/SteamUGC003.h | 145 + src/InterfacesEmulation/SteamUGC004.h | 156 ++ src/InterfacesEmulation/SteamUGC005.h | 209 ++ src/InterfacesEmulation/SteamUGC007.h | 259 ++ src/InterfacesEmulation/SteamUGC008.h | 292 ++ src/InterfacesEmulation/SteamUGC009.h | 296 +++ src/InterfacesEmulation/SteamUGC010.h | 338 +++ src/InterfacesEmulation/SteamUGC012.h | 346 +++ src/InterfacesEmulation/SteamUGC013.h | 344 +++ .../SteamUnifiedMessages001.h | 31 + src/InterfacesEmulation/SteamUser004.h | 129 + src/InterfacesEmulation/SteamUser005.h | 188 ++ src/InterfacesEmulation/SteamUser006.h | 64 + src/InterfacesEmulation/SteamUser007.h | 69 + src/InterfacesEmulation/SteamUser008.h | 43 + src/InterfacesEmulation/SteamUser009.h | 43 + src/InterfacesEmulation/SteamUser010.h | 38 + src/InterfacesEmulation/SteamUser011.h | 66 + src/InterfacesEmulation/SteamUser012.h | 90 + src/InterfacesEmulation/SteamUser013.h | 100 + src/InterfacesEmulation/SteamUser014.h | 127 + src/InterfacesEmulation/SteamUser015.h | 133 + src/InterfacesEmulation/SteamUser016.h | 133 + src/InterfacesEmulation/SteamUser017.h | 143 + src/InterfacesEmulation/SteamUser018.h | 149 ++ src/InterfacesEmulation/SteamUser019.h | 169 ++ src/InterfacesEmulation/SteamUser020.h | 173 ++ src/InterfacesEmulation/SteamUserStats001.h | 130 + src/InterfacesEmulation/SteamUserStats002.h | 111 + src/InterfacesEmulation/SteamUserStats003.h | 91 + src/InterfacesEmulation/SteamUserStats004.h | 127 + src/InterfacesEmulation/SteamUserStats005.h | 170 ++ src/InterfacesEmulation/SteamUserStats006.h | 178 ++ src/InterfacesEmulation/SteamUserStats007.h | 186 ++ src/InterfacesEmulation/SteamUserStats008.h | 192 ++ src/InterfacesEmulation/SteamUserStats009.h | 197 ++ src/InterfacesEmulation/SteamUserStats010.h | 263 ++ src/InterfacesEmulation/SteamUserStats011.h | 273 ++ src/InterfacesEmulation/SteamUtils001.h | 28 + src/InterfacesEmulation/SteamUtils002.h | 74 + src/InterfacesEmulation/SteamUtils003.h | 91 + src/InterfacesEmulation/SteamUtils004.h | 96 + src/InterfacesEmulation/SteamUtils005.h | 119 + src/InterfacesEmulation/SteamUtils006.h | 129 + src/InterfacesEmulation/SteamUtils007.h | 134 + src/InterfacesEmulation/SteamUtils008.h | 145 + src/InterfacesEmulation/SteamUtils009.h | 155 ++ src/InterfacesEmulation/SteamVideo001.h | 16 + src/InterfacesEmulation/SteamVideo002.h | 25 + src/SteamStubBypass/SteamStub.cpp | 272 ++ src/SteamStubBypass/SteamStub.h | 8 + src/Steam_data.cpp | 307 +++ src/Steam_data.h | 92 + src/dllmain.cpp | 30 + src/public SDK/AppListCommon.h | 41 + src/public SDK/AppTicketCommon.h | 25 + src/public SDK/AppsCommon.h | 372 +++ src/public SDK/BillingCommon.h | 236 ++ src/public SDK/BridgeCommon.h | 26 + src/public SDK/CCallback.h | 264 ++ src/public SDK/CGameID.h | 254 ++ src/public SDK/CSteamAPIContext.h | 183 ++ src/public SDK/CSteamID.h | 595 +++++ src/public SDK/ClientCommon.h | 73 + src/public SDK/ContentServerCommon.h | 59 + src/public SDK/ControllerCommon.h | 295 +++ src/public SDK/EBeginAuthSessionResult.h | 47 + src/public SDK/ECurrencyCode.h | 38 + src/public SDK/EResult.h | 130 + .../ESteamAppUpdateStatsQueryType.h | 32 + src/public SDK/ESteamBufferMethod.h | 30 + src/public SDK/ESteamError.h | 93 + src/public SDK/ESteamFindFilter.h | 30 + src/public SDK/ESteamNotify.h | 41 + src/public SDK/ESteamPaymentCardType.h | 33 + src/public SDK/ESteamSeekMethod.h | 32 + src/public SDK/ESteamServerType.h | 34 + .../ESteamSubscriptionBillingInfoType.h | 34 + src/public SDK/ESteamSubscriptionStatus.h | 45 + src/public SDK/EUserHasLicenseForAppResult.h | 41 + src/public SDK/EVoiceResult.h | 39 + src/public SDK/EnumString.h | 186 ++ src/public SDK/FriendGameInfo.h | 38 + src/public SDK/FriendsCommon.h | 1018 +++++++ src/public SDK/GameCoordinatorCommon.h | 715 +++++ src/public SDK/GameServerCommon.h | 201 ++ src/public SDK/GameServerStatsCommon.h | 65 + src/public SDK/GameStatsCommon.h | 72 + src/public SDK/HTMLSurfaceCommon.h | 379 +++ src/public SDK/HTTPCommon.h | 169 ++ src/public SDK/IClientAppManager.h | 109 + src/public SDK/IClientApps.h | 53 + src/public SDK/IClientAudio.h | 105 + src/public SDK/IClientBilling.h | 94 + src/public SDK/IClientConfigStore.h | 57 + src/public SDK/IClientContentServer.h | 50 + src/public SDK/IClientDepotBuilder.h | 82 + src/public SDK/IClientDeviceAuth.h | 36 + src/public SDK/IClientEngine.h | 132 + src/public SDK/IClientFriends.h | 386 +++ src/public SDK/IClientGameCoordinator.h | 37 + src/public SDK/IClientGameServer.h | 239 ++ src/public SDK/IClientGameServerStats.h | 56 + src/public SDK/IClientGameStats.h | 56 + src/public SDK/IClientHTTP.h | 108 + src/public SDK/IClientInventory.h | 259 ++ src/public SDK/IClientMasterServerUpdater.h | 102 + src/public SDK/IClientMatchmaking.h | 95 + src/public SDK/IClientMatchmakingServers.h | 58 + src/public SDK/IClientMusic.h | 107 + src/public SDK/IClientNetworkDeviceManager.h | 64 + src/public SDK/IClientNetworking.h | 155 ++ src/public SDK/IClientProductBuilder.h | 39 + src/public SDK/IClientRemoteStorage.h | 145 + src/public SDK/IClientScreenshots.h | 72 + src/public SDK/IClientShortcuts.h | 59 + src/public SDK/IClientStreamClient.h | 40 + src/public SDK/IClientStreamLauncher.h | 33 + src/public SDK/IClientUGC.h | 66 + src/public SDK/IClientUnifiedMessages.h | 37 + src/public SDK/IClientUser.h | 329 +++ src/public SDK/IClientUserStats.h | 221 ++ src/public SDK/IClientUtils.h | 104 + src/public SDK/ISteam003.h | 159 ++ src/public SDK/ISteam004.h | 168 ++ src/public SDK/ISteam005.h | 177 ++ src/public SDK/ISteam006.h | 195 ++ src/public SDK/ISteam2Bridge001.h | 54 + src/public SDK/ISteam2Bridge002.h | 75 + src/public SDK/ISteamAppList001.h | 45 + src/public SDK/ISteamAppTicket001.h | 38 + src/public SDK/ISteamApps001.h | 39 + src/public SDK/ISteamApps002.h | 45 + src/public SDK/ISteamApps003.h | 47 + src/public SDK/ISteamApps004.h | 70 + src/public SDK/ISteamApps005.h | 86 + src/public SDK/ISteamApps006.h | 97 + src/public SDK/ISteamApps007.h | 100 + src/public SDK/ISteamApps008.h | 100 + src/public SDK/ISteamBilling001.h | 56 + src/public SDK/ISteamBilling002.h | 106 + src/public SDK/ISteamClient006.h | 110 + src/public SDK/ISteamClient007.h | 113 + src/public SDK/ISteamClient008.h | 110 + src/public SDK/ISteamClient009.h | 118 + src/public SDK/ISteamClient010.h | 127 + src/public SDK/ISteamClient011.h | 133 + src/public SDK/ISteamClient012.h | 137 + src/public SDK/ISteamClient013.h | 134 + src/public SDK/ISteamClient014.h | 143 + src/public SDK/ISteamClient015.h | 146 + src/public SDK/ISteamClient016.h | 154 ++ src/public SDK/ISteamClient017.h | 163 ++ src/public SDK/ISteamClient018.h | 154 ++ src/public SDK/ISteamClient019.h | 157 ++ src/public SDK/ISteamContentServer001.h | 38 + src/public SDK/ISteamContentServer002.h | 40 + src/public SDK/ISteamController001.h | 56 + src/public SDK/ISteamController002.h | 31 + src/public SDK/ISteamController003.h | 90 + src/public SDK/ISteamController004.h | 82 + src/public SDK/ISteamController005.h | 93 + src/public SDK/ISteamController006.h | 104 + src/public SDK/ISteamController007.h | 130 + src/public SDK/ISteamFriends001.h | 106 + src/public SDK/ISteamFriends002.h | 100 + src/public SDK/ISteamFriends003.h | 104 + src/public SDK/ISteamFriends004.h | 99 + src/public SDK/ISteamFriends005.h | 123 + src/public SDK/ISteamFriends006.h | 130 + src/public SDK/ISteamFriends007.h | 138 + src/public SDK/ISteamFriends008.h | 166 ++ src/public SDK/ISteamFriends009.h | 197 ++ src/public SDK/ISteamFriends010.h | 214 ++ src/public SDK/ISteamFriends011.h | 233 ++ src/public SDK/ISteamFriends012.h | 228 ++ src/public SDK/ISteamFriends013.h | 241 ++ src/public SDK/ISteamFriends014.h | 244 ++ src/public SDK/ISteamFriends015.h | 258 ++ src/public SDK/ISteamFriends016.h | 242 ++ src/public SDK/ISteamFriends017.h | 257 ++ src/public SDK/ISteamGameCoordinator001.h | 48 + src/public SDK/ISteamGameSearch001.h | 70 + src/public SDK/ISteamGameServer002.h | 132 + src/public SDK/ISteamGameServer003.h | 99 + src/public SDK/ISteamGameServer004.h | 105 + src/public SDK/ISteamGameServer005.h | 110 + src/public SDK/ISteamGameServer006.h | 106 + src/public SDK/ISteamGameServer007.h | 109 + src/public SDK/ISteamGameServer008.h | 119 + src/public SDK/ISteamGameServer009.h | 130 + src/public SDK/ISteamGameServer010.h | 146 + src/public SDK/ISteamGameServer011.h | 267 ++ src/public SDK/ISteamGameServer012.h | 264 ++ src/public SDK/ISteamGameServerStats001.h | 66 + src/public SDK/ISteamGameStats001.h | 50 + src/public SDK/ISteamHTMLSurface002.h | 136 + src/public SDK/ISteamHTMLSurface003.h | 138 + src/public SDK/ISteamHTMLSurface004.h | 121 + src/public SDK/ISteamHTMLSurface005.h | 187 ++ src/public SDK/ISteamHTTP001.h | 103 + src/public SDK/ISteamHTTP002.h | 143 + src/public SDK/ISteamHTTP003.h | 138 + src/public SDK/ISteamImput001.h | 618 +++++ src/public SDK/ISteamInventory001.h | 276 ++ src/public SDK/ISteamInventory002.h | 312 +++ src/public SDK/ISteamInventory003.h | 315 +++ src/public SDK/ISteamMasterServerUpdater001.h | 109 + src/public SDK/ISteamMatchmaking001.h | 97 + src/public SDK/ISteamMatchmaking002.h | 144 + src/public SDK/ISteamMatchmaking003.h | 174 ++ src/public SDK/ISteamMatchmaking004.h | 167 ++ src/public SDK/ISteamMatchmaking005.h | 196 ++ src/public SDK/ISteamMatchmaking006.h | 190 ++ src/public SDK/ISteamMatchmaking007.h | 212 ++ src/public SDK/ISteamMatchmaking008.h | 225 ++ src/public SDK/ISteamMatchmaking009.h | 231 ++ src/public SDK/ISteamMatchmakingServers001.h | 97 + src/public SDK/ISteamMatchmakingServers002.h | 168 ++ src/public SDK/ISteamMusic001.h | 48 + src/public SDK/ISteamMusicRemote001.h | 80 + src/public SDK/ISteamNetworking001.h | 96 + src/public SDK/ISteamNetworking002.h | 106 + src/public SDK/ISteamNetworking003.h | 152 ++ src/public SDK/ISteamNetworking004.h | 155 ++ src/public SDK/ISteamNetworking005.h | 168 ++ src/public SDK/ISteamOAuth001.h | 37 + src/public SDK/ISteamParties002.h | 97 + src/public SDK/ISteamRemotePlay001.h | 40 + src/public SDK/ISteamRemoteStorage001.h | 45 + src/public SDK/ISteamRemoteStorage002.h | 54 + src/public SDK/ISteamRemoteStorage003.h | 67 + src/public SDK/ISteamRemoteStorage004.h | 94 + src/public SDK/ISteamRemoteStorage005.h | 105 + src/public SDK/ISteamRemoteStorage006.h | 131 + src/public SDK/ISteamRemoteStorage007.h | 104 + src/public SDK/ISteamRemoteStorage008.h | 138 + src/public SDK/ISteamRemoteStorage009.h | 109 + src/public SDK/ISteamRemoteStorage010.h | 141 + src/public SDK/ISteamRemoteStorage011.h | 149 ++ src/public SDK/ISteamRemoteStorage012.h | 111 + src/public SDK/ISteamRemoteStorage013.h | 117 + src/public SDK/ISteamRemoteStorage014.h | 160 ++ src/public SDK/ISteamScreenshots001.h | 60 + src/public SDK/ISteamScreenshots002.h | 63 + src/public SDK/ISteamScreenshots003.h | 53 + src/public SDK/ISteamStreamLauncher001.h | 34 + src/public SDK/ISteamUGC001.h | 69 + src/public SDK/ISteamUGC002.h | 94 + src/public SDK/ISteamUGC003.h | 96 + src/public SDK/ISteamUGC004.h | 106 + src/public SDK/ISteamUGC005.h | 121 + src/public SDK/ISteamUGC007.h | 138 + src/public SDK/ISteamUGC008.h | 110 + src/public SDK/ISteamUGC009.h | 111 + src/public SDK/ISteamUGC010.h | 152 ++ src/public SDK/ISteamUGC012.h | 157 ++ src/public SDK/ISteamUGC013.h | 142 + src/public SDK/ISteamUnifiedMessages001.h | 50 + src/public SDK/ISteamUser004.h | 116 + src/public SDK/ISteamUser005.h | 127 + src/public SDK/ISteamUser006.h | 76 + src/public SDK/ISteamUser007.h | 79 + src/public SDK/ISteamUser008.h | 77 + src/public SDK/ISteamUser009.h | 80 + src/public SDK/ISteamUser010.h | 77 + src/public SDK/ISteamUser011.h | 94 + src/public SDK/ISteamUser012.h | 112 + src/public SDK/ISteamUser013.h | 132 + src/public SDK/ISteamUser014.h | 178 ++ src/public SDK/ISteamUser015.h | 147 ++ src/public SDK/ISteamUser016.h | 190 ++ src/public SDK/ISteamUser017.h | 198 ++ src/public SDK/ISteamUser018.h | 210 ++ src/public SDK/ISteamUser019.h | 170 ++ src/public SDK/ISteamUser020.h | 175 ++ src/public SDK/ISteamUserStats001.h | 88 + src/public SDK/ISteamUserStats002.h | 89 + src/public SDK/ISteamUserStats003.h | 65 + src/public SDK/ISteamUserStats004.h | 77 + src/public SDK/ISteamUserStats005.h | 137 + src/public SDK/ISteamUserStats006.h | 139 + src/public SDK/ISteamUserStats007.h | 154 ++ src/public SDK/ISteamUserStats008.h | 162 ++ src/public SDK/ISteamUserStats009.h | 183 ++ src/public SDK/ISteamUserStats010.h | 221 ++ src/public SDK/ISteamUserStats011.h | 227 ++ src/public SDK/ISteamUtils001.h | 44 + src/public SDK/ISteamUtils002.h | 75 + src/public SDK/ISteamUtils003.h | 87 + src/public SDK/ISteamUtils004.h | 94 + src/public SDK/ISteamUtils005.h | 134 + src/public SDK/ISteamUtils006.h | 140 + src/public SDK/ISteamUtils007.h | 143 + src/public SDK/ISteamUtils008.h | 112 + src/public SDK/ISteamUtils009.h | 121 + src/public SDK/ISteamVideo001.h | 31 + src/public SDK/ISteamVideo002.h | 17 + src/public SDK/Interface_OSW.h | 227 ++ src/public SDK/InventoryCommon.h | 109 + src/public SDK/MasterServerUpdaterCommon.h | 33 + src/public SDK/MatchMakingKeyValuePair.h | 58 + src/public SDK/MatchmakingCommon.h | 324 +++ src/public SDK/MatchmakingServersCommon.h | 175 ++ src/public SDK/MusicCommon.h | 50 + src/public SDK/MusicRemoteCommon.h | 103 + src/public SDK/NetworkingCommon.h | 167 ++ src/public SDK/OAuthCommon.h | 27 + src/public SDK/Open Steamworks.vcproj | 1070 ++++++++ src/public SDK/POSIXLibrary.h | 52 + src/public SDK/RemoteStorageCommon.h | 725 +++++ src/public SDK/ScreenshotsCommon.h | 141 + src/public SDK/Steam.h | 362 +++ src/public SDK/SteamAPI.h | 37 + src/public SDK/SteamSalt.h | 28 + src/public SDK/SteamTypes.h | 1023 +++++++ src/public SDK/Steamclient.h | 514 ++++ src/public SDK/SteamclientAPI.h | 36 + src/public SDK/Steamworks.h | 35 + src/public SDK/StreamLauncherCommon.h | 40 + src/public SDK/TSteamApp.h | 44 + src/public SDK/TSteamAppDependencyInfo.h | 31 + src/public SDK/TSteamAppLaunchOption.h | 37 + src/public SDK/TSteamAppStats.h | 38 + src/public SDK/TSteamAppVersion.h | 31 + src/public SDK/TSteamDiscountQualifier.h | 31 + src/public SDK/TSteamElemInfo.h | 45 + src/public SDK/TSteamError.h | 40 + src/public SDK/TSteamExternalBillingInfo.h | 29 + src/public SDK/TSteamGlobalUserID.h | 39 + src/public SDK/TSteamOfflineStatus.h | 31 + src/public SDK/TSteamPaymentCardInfo.h | 53 + src/public SDK/TSteamPaymentCardReceiptInfo.h | 43 + src/public SDK/TSteamPrepurchaseInfo.h | 33 + src/public SDK/TSteamPrepurchaseReceiptInfo.h | 29 + src/public SDK/TSteamProgress.h | 30 + src/public SDK/TSteamSplitLocalUserID.h | 39 + src/public SDK/TSteamSubscription.h | 65 + .../TSteamSubscriptionBillingInfo.h | 36 + src/public SDK/TSteamSubscriptionDiscount.h | 30 + src/public SDK/TSteamSubscriptionReceipt.h | 40 + src/public SDK/TSteamSubscriptionStats.h | 31 + src/public SDK/TSteamUpdateStats.h | 31 + src/public SDK/UGCCommon.h | 289 ++ src/public SDK/UnifiedMessagesCommon.h | 45 + src/public SDK/UserCommon.h | 925 +++++++ src/public SDK/UserStatsCommon.h | 289 ++ src/public SDK/UtilsCommon.h | 225 ++ src/public SDK/VideoCommon.h | 66 + src/public SDK/Win32Library.h | 51 + src/public SDK/gameserveritem.h | 95 + src/public SDK/isteamparentalsettings.h | 56 + src/public SDK/servernetadr.h | 165 ++ 477 files changed, 69524 insertions(+) create mode 100644 src/Bridge.h create mode 100644 src/CSteamCallbacks.cpp create mode 100644 src/CSteamCallbacks.h create mode 100644 src/ColdManager.cpp create mode 100644 src/ColdManager.h create mode 100644 src/INI example/ColdAPI.ini create mode 100644 src/InterfacesEmulation/PublicConnector.h create mode 100644 src/InterfacesEmulation/SteamAppList001.h create mode 100644 src/InterfacesEmulation/SteamAppTicket001.h create mode 100644 src/InterfacesEmulation/SteamApps001.h create mode 100644 src/InterfacesEmulation/SteamApps002.h create mode 100644 src/InterfacesEmulation/SteamApps003.h create mode 100644 src/InterfacesEmulation/SteamApps004.h create mode 100644 src/InterfacesEmulation/SteamApps005.h create mode 100644 src/InterfacesEmulation/SteamApps006.h create mode 100644 src/InterfacesEmulation/SteamApps007.h create mode 100644 src/InterfacesEmulation/SteamApps008.h create mode 100644 src/InterfacesEmulation/SteamBilling001.h create mode 100644 src/InterfacesEmulation/SteamBilling002.h create mode 100644 src/InterfacesEmulation/SteamClient006.h create mode 100644 src/InterfacesEmulation/SteamClient007.h create mode 100644 src/InterfacesEmulation/SteamClient008.h create mode 100644 src/InterfacesEmulation/SteamClient009.h create mode 100644 src/InterfacesEmulation/SteamClient010.h create mode 100644 src/InterfacesEmulation/SteamClient011.h create mode 100644 src/InterfacesEmulation/SteamClient012.h create mode 100644 src/InterfacesEmulation/SteamClient013.h create mode 100644 src/InterfacesEmulation/SteamClient014.h create mode 100644 src/InterfacesEmulation/SteamClient015.h create mode 100644 src/InterfacesEmulation/SteamClient016.h create mode 100644 src/InterfacesEmulation/SteamClient017.h create mode 100644 src/InterfacesEmulation/SteamClient018.h create mode 100644 src/InterfacesEmulation/SteamClient019.h create mode 100644 src/InterfacesEmulation/SteamContentServer001.h create mode 100644 src/InterfacesEmulation/SteamContentServer002.h create mode 100644 src/InterfacesEmulation/SteamController001.h create mode 100644 src/InterfacesEmulation/SteamController002.h create mode 100644 src/InterfacesEmulation/SteamController003.h create mode 100644 src/InterfacesEmulation/SteamController004.h create mode 100644 src/InterfacesEmulation/SteamController005.h create mode 100644 src/InterfacesEmulation/SteamController006.h create mode 100644 src/InterfacesEmulation/SteamController007.h create mode 100644 src/InterfacesEmulation/SteamFriends001.h create mode 100644 src/InterfacesEmulation/SteamFriends002.h create mode 100644 src/InterfacesEmulation/SteamFriends003.h create mode 100644 src/InterfacesEmulation/SteamFriends004.h create mode 100644 src/InterfacesEmulation/SteamFriends005.h create mode 100644 src/InterfacesEmulation/SteamFriends006.h create mode 100644 src/InterfacesEmulation/SteamFriends007.h create mode 100644 src/InterfacesEmulation/SteamFriends008.h create mode 100644 src/InterfacesEmulation/SteamFriends009.h create mode 100644 src/InterfacesEmulation/SteamFriends010.h create mode 100644 src/InterfacesEmulation/SteamFriends011.h create mode 100644 src/InterfacesEmulation/SteamFriends012.h create mode 100644 src/InterfacesEmulation/SteamFriends013.h create mode 100644 src/InterfacesEmulation/SteamFriends014.h create mode 100644 src/InterfacesEmulation/SteamFriends015.h create mode 100644 src/InterfacesEmulation/SteamFriends016.h create mode 100644 src/InterfacesEmulation/SteamFriends017.h create mode 100644 src/InterfacesEmulation/SteamGameCoordinator001.h create mode 100644 src/InterfacesEmulation/SteamGameSearch001.h create mode 100644 src/InterfacesEmulation/SteamGameServer002.h create mode 100644 src/InterfacesEmulation/SteamGameServer003.h create mode 100644 src/InterfacesEmulation/SteamGameServer004.h create mode 100644 src/InterfacesEmulation/SteamGameServer005.h create mode 100644 src/InterfacesEmulation/SteamGameServer006.h create mode 100644 src/InterfacesEmulation/SteamGameServer007.h create mode 100644 src/InterfacesEmulation/SteamGameServer008.h create mode 100644 src/InterfacesEmulation/SteamGameServer009.h create mode 100644 src/InterfacesEmulation/SteamGameServer010.h create mode 100644 src/InterfacesEmulation/SteamGameServer011.h create mode 100644 src/InterfacesEmulation/SteamGameServer012.h create mode 100644 src/InterfacesEmulation/SteamGameServerStats001.h create mode 100644 src/InterfacesEmulation/SteamHTMLSurface002.h create mode 100644 src/InterfacesEmulation/SteamHTMLSurface003.h create mode 100644 src/InterfacesEmulation/SteamHTMLSurface004.h create mode 100644 src/InterfacesEmulation/SteamHTMLSurface005.h create mode 100644 src/InterfacesEmulation/SteamHTTP001.h create mode 100644 src/InterfacesEmulation/SteamHTTP002.h create mode 100644 src/InterfacesEmulation/SteamHTTP003.h create mode 100644 src/InterfacesEmulation/SteamInput001.h create mode 100644 src/InterfacesEmulation/SteamInventory001.h create mode 100644 src/InterfacesEmulation/SteamInventory002.h create mode 100644 src/InterfacesEmulation/SteamInventory003.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking001.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking002.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking003.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking004.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking005.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking006.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking007.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking008.h create mode 100644 src/InterfacesEmulation/SteamMatchmaking009.h create mode 100644 src/InterfacesEmulation/SteamMatchmakingServers001.h create mode 100644 src/InterfacesEmulation/SteamMatchmakingServers002.h create mode 100644 src/InterfacesEmulation/SteamMusic001.h create mode 100644 src/InterfacesEmulation/SteamMusicRemote001.h create mode 100644 src/InterfacesEmulation/SteamNetworking001.h create mode 100644 src/InterfacesEmulation/SteamNetworking002.h create mode 100644 src/InterfacesEmulation/SteamNetworking003.h create mode 100644 src/InterfacesEmulation/SteamNetworking004.h create mode 100644 src/InterfacesEmulation/SteamNetworking005.h create mode 100644 src/InterfacesEmulation/SteamParentalSettings001.h create mode 100644 src/InterfacesEmulation/SteamParties002.h create mode 100644 src/InterfacesEmulation/SteamRemotePlay001.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage001.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage002.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage003.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage004.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage005.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage006.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage007.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage008.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage009.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage010.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage011.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage012.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage013.h create mode 100644 src/InterfacesEmulation/SteamRemoteStorage014.h create mode 100644 src/InterfacesEmulation/SteamScreenshots001.h create mode 100644 src/InterfacesEmulation/SteamScreenshots002.h create mode 100644 src/InterfacesEmulation/SteamScreenshots003.h create mode 100644 src/InterfacesEmulation/SteamUGC001.h create mode 100644 src/InterfacesEmulation/SteamUGC002.h create mode 100644 src/InterfacesEmulation/SteamUGC003.h create mode 100644 src/InterfacesEmulation/SteamUGC004.h create mode 100644 src/InterfacesEmulation/SteamUGC005.h create mode 100644 src/InterfacesEmulation/SteamUGC007.h create mode 100644 src/InterfacesEmulation/SteamUGC008.h create mode 100644 src/InterfacesEmulation/SteamUGC009.h create mode 100644 src/InterfacesEmulation/SteamUGC010.h create mode 100644 src/InterfacesEmulation/SteamUGC012.h create mode 100644 src/InterfacesEmulation/SteamUGC013.h create mode 100644 src/InterfacesEmulation/SteamUnifiedMessages001.h create mode 100644 src/InterfacesEmulation/SteamUser004.h create mode 100644 src/InterfacesEmulation/SteamUser005.h create mode 100644 src/InterfacesEmulation/SteamUser006.h create mode 100644 src/InterfacesEmulation/SteamUser007.h create mode 100644 src/InterfacesEmulation/SteamUser008.h create mode 100644 src/InterfacesEmulation/SteamUser009.h create mode 100644 src/InterfacesEmulation/SteamUser010.h create mode 100644 src/InterfacesEmulation/SteamUser011.h create mode 100644 src/InterfacesEmulation/SteamUser012.h create mode 100644 src/InterfacesEmulation/SteamUser013.h create mode 100644 src/InterfacesEmulation/SteamUser014.h create mode 100644 src/InterfacesEmulation/SteamUser015.h create mode 100644 src/InterfacesEmulation/SteamUser016.h create mode 100644 src/InterfacesEmulation/SteamUser017.h create mode 100644 src/InterfacesEmulation/SteamUser018.h create mode 100644 src/InterfacesEmulation/SteamUser019.h create mode 100644 src/InterfacesEmulation/SteamUser020.h create mode 100644 src/InterfacesEmulation/SteamUserStats001.h create mode 100644 src/InterfacesEmulation/SteamUserStats002.h create mode 100644 src/InterfacesEmulation/SteamUserStats003.h create mode 100644 src/InterfacesEmulation/SteamUserStats004.h create mode 100644 src/InterfacesEmulation/SteamUserStats005.h create mode 100644 src/InterfacesEmulation/SteamUserStats006.h create mode 100644 src/InterfacesEmulation/SteamUserStats007.h create mode 100644 src/InterfacesEmulation/SteamUserStats008.h create mode 100644 src/InterfacesEmulation/SteamUserStats009.h create mode 100644 src/InterfacesEmulation/SteamUserStats010.h create mode 100644 src/InterfacesEmulation/SteamUserStats011.h create mode 100644 src/InterfacesEmulation/SteamUtils001.h create mode 100644 src/InterfacesEmulation/SteamUtils002.h create mode 100644 src/InterfacesEmulation/SteamUtils003.h create mode 100644 src/InterfacesEmulation/SteamUtils004.h create mode 100644 src/InterfacesEmulation/SteamUtils005.h create mode 100644 src/InterfacesEmulation/SteamUtils006.h create mode 100644 src/InterfacesEmulation/SteamUtils007.h create mode 100644 src/InterfacesEmulation/SteamUtils008.h create mode 100644 src/InterfacesEmulation/SteamUtils009.h create mode 100644 src/InterfacesEmulation/SteamVideo001.h create mode 100644 src/InterfacesEmulation/SteamVideo002.h create mode 100644 src/SteamStubBypass/SteamStub.cpp create mode 100644 src/SteamStubBypass/SteamStub.h create mode 100644 src/Steam_data.cpp create mode 100644 src/Steam_data.h create mode 100644 src/dllmain.cpp create mode 100644 src/public SDK/AppListCommon.h create mode 100644 src/public SDK/AppTicketCommon.h create mode 100644 src/public SDK/AppsCommon.h create mode 100644 src/public SDK/BillingCommon.h create mode 100644 src/public SDK/BridgeCommon.h create mode 100644 src/public SDK/CCallback.h create mode 100644 src/public SDK/CGameID.h create mode 100644 src/public SDK/CSteamAPIContext.h create mode 100644 src/public SDK/CSteamID.h create mode 100644 src/public SDK/ClientCommon.h create mode 100644 src/public SDK/ContentServerCommon.h create mode 100644 src/public SDK/ControllerCommon.h create mode 100644 src/public SDK/EBeginAuthSessionResult.h create mode 100644 src/public SDK/ECurrencyCode.h create mode 100644 src/public SDK/EResult.h create mode 100644 src/public SDK/ESteamAppUpdateStatsQueryType.h create mode 100644 src/public SDK/ESteamBufferMethod.h create mode 100644 src/public SDK/ESteamError.h create mode 100644 src/public SDK/ESteamFindFilter.h create mode 100644 src/public SDK/ESteamNotify.h create mode 100644 src/public SDK/ESteamPaymentCardType.h create mode 100644 src/public SDK/ESteamSeekMethod.h create mode 100644 src/public SDK/ESteamServerType.h create mode 100644 src/public SDK/ESteamSubscriptionBillingInfoType.h create mode 100644 src/public SDK/ESteamSubscriptionStatus.h create mode 100644 src/public SDK/EUserHasLicenseForAppResult.h create mode 100644 src/public SDK/EVoiceResult.h create mode 100644 src/public SDK/EnumString.h create mode 100644 src/public SDK/FriendGameInfo.h create mode 100644 src/public SDK/FriendsCommon.h create mode 100644 src/public SDK/GameCoordinatorCommon.h create mode 100644 src/public SDK/GameServerCommon.h create mode 100644 src/public SDK/GameServerStatsCommon.h create mode 100644 src/public SDK/GameStatsCommon.h create mode 100644 src/public SDK/HTMLSurfaceCommon.h create mode 100644 src/public SDK/HTTPCommon.h create mode 100644 src/public SDK/IClientAppManager.h create mode 100644 src/public SDK/IClientApps.h create mode 100644 src/public SDK/IClientAudio.h create mode 100644 src/public SDK/IClientBilling.h create mode 100644 src/public SDK/IClientConfigStore.h create mode 100644 src/public SDK/IClientContentServer.h create mode 100644 src/public SDK/IClientDepotBuilder.h create mode 100644 src/public SDK/IClientDeviceAuth.h create mode 100644 src/public SDK/IClientEngine.h create mode 100644 src/public SDK/IClientFriends.h create mode 100644 src/public SDK/IClientGameCoordinator.h create mode 100644 src/public SDK/IClientGameServer.h create mode 100644 src/public SDK/IClientGameServerStats.h create mode 100644 src/public SDK/IClientGameStats.h create mode 100644 src/public SDK/IClientHTTP.h create mode 100644 src/public SDK/IClientInventory.h create mode 100644 src/public SDK/IClientMasterServerUpdater.h create mode 100644 src/public SDK/IClientMatchmaking.h create mode 100644 src/public SDK/IClientMatchmakingServers.h create mode 100644 src/public SDK/IClientMusic.h create mode 100644 src/public SDK/IClientNetworkDeviceManager.h create mode 100644 src/public SDK/IClientNetworking.h create mode 100644 src/public SDK/IClientProductBuilder.h create mode 100644 src/public SDK/IClientRemoteStorage.h create mode 100644 src/public SDK/IClientScreenshots.h create mode 100644 src/public SDK/IClientShortcuts.h create mode 100644 src/public SDK/IClientStreamClient.h create mode 100644 src/public SDK/IClientStreamLauncher.h create mode 100644 src/public SDK/IClientUGC.h create mode 100644 src/public SDK/IClientUnifiedMessages.h create mode 100644 src/public SDK/IClientUser.h create mode 100644 src/public SDK/IClientUserStats.h create mode 100644 src/public SDK/IClientUtils.h create mode 100644 src/public SDK/ISteam003.h create mode 100644 src/public SDK/ISteam004.h create mode 100644 src/public SDK/ISteam005.h create mode 100644 src/public SDK/ISteam006.h create mode 100644 src/public SDK/ISteam2Bridge001.h create mode 100644 src/public SDK/ISteam2Bridge002.h create mode 100644 src/public SDK/ISteamAppList001.h create mode 100644 src/public SDK/ISteamAppTicket001.h create mode 100644 src/public SDK/ISteamApps001.h create mode 100644 src/public SDK/ISteamApps002.h create mode 100644 src/public SDK/ISteamApps003.h create mode 100644 src/public SDK/ISteamApps004.h create mode 100644 src/public SDK/ISteamApps005.h create mode 100644 src/public SDK/ISteamApps006.h create mode 100644 src/public SDK/ISteamApps007.h create mode 100644 src/public SDK/ISteamApps008.h create mode 100644 src/public SDK/ISteamBilling001.h create mode 100644 src/public SDK/ISteamBilling002.h create mode 100644 src/public SDK/ISteamClient006.h create mode 100644 src/public SDK/ISteamClient007.h create mode 100644 src/public SDK/ISteamClient008.h create mode 100644 src/public SDK/ISteamClient009.h create mode 100644 src/public SDK/ISteamClient010.h create mode 100644 src/public SDK/ISteamClient011.h create mode 100644 src/public SDK/ISteamClient012.h create mode 100644 src/public SDK/ISteamClient013.h create mode 100644 src/public SDK/ISteamClient014.h create mode 100644 src/public SDK/ISteamClient015.h create mode 100644 src/public SDK/ISteamClient016.h create mode 100644 src/public SDK/ISteamClient017.h create mode 100644 src/public SDK/ISteamClient018.h create mode 100644 src/public SDK/ISteamClient019.h create mode 100644 src/public SDK/ISteamContentServer001.h create mode 100644 src/public SDK/ISteamContentServer002.h create mode 100644 src/public SDK/ISteamController001.h create mode 100644 src/public SDK/ISteamController002.h create mode 100644 src/public SDK/ISteamController003.h create mode 100644 src/public SDK/ISteamController004.h create mode 100644 src/public SDK/ISteamController005.h create mode 100644 src/public SDK/ISteamController006.h create mode 100644 src/public SDK/ISteamController007.h create mode 100644 src/public SDK/ISteamFriends001.h create mode 100644 src/public SDK/ISteamFriends002.h create mode 100644 src/public SDK/ISteamFriends003.h create mode 100644 src/public SDK/ISteamFriends004.h create mode 100644 src/public SDK/ISteamFriends005.h create mode 100644 src/public SDK/ISteamFriends006.h create mode 100644 src/public SDK/ISteamFriends007.h create mode 100644 src/public SDK/ISteamFriends008.h create mode 100644 src/public SDK/ISteamFriends009.h create mode 100644 src/public SDK/ISteamFriends010.h create mode 100644 src/public SDK/ISteamFriends011.h create mode 100644 src/public SDK/ISteamFriends012.h create mode 100644 src/public SDK/ISteamFriends013.h create mode 100644 src/public SDK/ISteamFriends014.h create mode 100644 src/public SDK/ISteamFriends015.h create mode 100644 src/public SDK/ISteamFriends016.h create mode 100644 src/public SDK/ISteamFriends017.h create mode 100644 src/public SDK/ISteamGameCoordinator001.h create mode 100644 src/public SDK/ISteamGameSearch001.h create mode 100644 src/public SDK/ISteamGameServer002.h create mode 100644 src/public SDK/ISteamGameServer003.h create mode 100644 src/public SDK/ISteamGameServer004.h create mode 100644 src/public SDK/ISteamGameServer005.h create mode 100644 src/public SDK/ISteamGameServer006.h create mode 100644 src/public SDK/ISteamGameServer007.h create mode 100644 src/public SDK/ISteamGameServer008.h create mode 100644 src/public SDK/ISteamGameServer009.h create mode 100644 src/public SDK/ISteamGameServer010.h create mode 100644 src/public SDK/ISteamGameServer011.h create mode 100644 src/public SDK/ISteamGameServer012.h create mode 100644 src/public SDK/ISteamGameServerStats001.h create mode 100644 src/public SDK/ISteamGameStats001.h create mode 100644 src/public SDK/ISteamHTMLSurface002.h create mode 100644 src/public SDK/ISteamHTMLSurface003.h create mode 100644 src/public SDK/ISteamHTMLSurface004.h create mode 100644 src/public SDK/ISteamHTMLSurface005.h create mode 100644 src/public SDK/ISteamHTTP001.h create mode 100644 src/public SDK/ISteamHTTP002.h create mode 100644 src/public SDK/ISteamHTTP003.h create mode 100644 src/public SDK/ISteamImput001.h create mode 100644 src/public SDK/ISteamInventory001.h create mode 100644 src/public SDK/ISteamInventory002.h create mode 100644 src/public SDK/ISteamInventory003.h create mode 100644 src/public SDK/ISteamMasterServerUpdater001.h create mode 100644 src/public SDK/ISteamMatchmaking001.h create mode 100644 src/public SDK/ISteamMatchmaking002.h create mode 100644 src/public SDK/ISteamMatchmaking003.h create mode 100644 src/public SDK/ISteamMatchmaking004.h create mode 100644 src/public SDK/ISteamMatchmaking005.h create mode 100644 src/public SDK/ISteamMatchmaking006.h create mode 100644 src/public SDK/ISteamMatchmaking007.h create mode 100644 src/public SDK/ISteamMatchmaking008.h create mode 100644 src/public SDK/ISteamMatchmaking009.h create mode 100644 src/public SDK/ISteamMatchmakingServers001.h create mode 100644 src/public SDK/ISteamMatchmakingServers002.h create mode 100644 src/public SDK/ISteamMusic001.h create mode 100644 src/public SDK/ISteamMusicRemote001.h create mode 100644 src/public SDK/ISteamNetworking001.h create mode 100644 src/public SDK/ISteamNetworking002.h create mode 100644 src/public SDK/ISteamNetworking003.h create mode 100644 src/public SDK/ISteamNetworking004.h create mode 100644 src/public SDK/ISteamNetworking005.h create mode 100644 src/public SDK/ISteamOAuth001.h create mode 100644 src/public SDK/ISteamParties002.h create mode 100644 src/public SDK/ISteamRemotePlay001.h create mode 100644 src/public SDK/ISteamRemoteStorage001.h create mode 100644 src/public SDK/ISteamRemoteStorage002.h create mode 100644 src/public SDK/ISteamRemoteStorage003.h create mode 100644 src/public SDK/ISteamRemoteStorage004.h create mode 100644 src/public SDK/ISteamRemoteStorage005.h create mode 100644 src/public SDK/ISteamRemoteStorage006.h create mode 100644 src/public SDK/ISteamRemoteStorage007.h create mode 100644 src/public SDK/ISteamRemoteStorage008.h create mode 100644 src/public SDK/ISteamRemoteStorage009.h create mode 100644 src/public SDK/ISteamRemoteStorage010.h create mode 100644 src/public SDK/ISteamRemoteStorage011.h create mode 100644 src/public SDK/ISteamRemoteStorage012.h create mode 100644 src/public SDK/ISteamRemoteStorage013.h create mode 100644 src/public SDK/ISteamRemoteStorage014.h create mode 100644 src/public SDK/ISteamScreenshots001.h create mode 100644 src/public SDK/ISteamScreenshots002.h create mode 100644 src/public SDK/ISteamScreenshots003.h create mode 100644 src/public SDK/ISteamStreamLauncher001.h create mode 100644 src/public SDK/ISteamUGC001.h create mode 100644 src/public SDK/ISteamUGC002.h create mode 100644 src/public SDK/ISteamUGC003.h create mode 100644 src/public SDK/ISteamUGC004.h create mode 100644 src/public SDK/ISteamUGC005.h create mode 100644 src/public SDK/ISteamUGC007.h create mode 100644 src/public SDK/ISteamUGC008.h create mode 100644 src/public SDK/ISteamUGC009.h create mode 100644 src/public SDK/ISteamUGC010.h create mode 100644 src/public SDK/ISteamUGC012.h create mode 100644 src/public SDK/ISteamUGC013.h create mode 100644 src/public SDK/ISteamUnifiedMessages001.h create mode 100644 src/public SDK/ISteamUser004.h create mode 100644 src/public SDK/ISteamUser005.h create mode 100644 src/public SDK/ISteamUser006.h create mode 100644 src/public SDK/ISteamUser007.h create mode 100644 src/public SDK/ISteamUser008.h create mode 100644 src/public SDK/ISteamUser009.h create mode 100644 src/public SDK/ISteamUser010.h create mode 100644 src/public SDK/ISteamUser011.h create mode 100644 src/public SDK/ISteamUser012.h create mode 100644 src/public SDK/ISteamUser013.h create mode 100644 src/public SDK/ISteamUser014.h create mode 100644 src/public SDK/ISteamUser015.h create mode 100644 src/public SDK/ISteamUser016.h create mode 100644 src/public SDK/ISteamUser017.h create mode 100644 src/public SDK/ISteamUser018.h create mode 100644 src/public SDK/ISteamUser019.h create mode 100644 src/public SDK/ISteamUser020.h create mode 100644 src/public SDK/ISteamUserStats001.h create mode 100644 src/public SDK/ISteamUserStats002.h create mode 100644 src/public SDK/ISteamUserStats003.h create mode 100644 src/public SDK/ISteamUserStats004.h create mode 100644 src/public SDK/ISteamUserStats005.h create mode 100644 src/public SDK/ISteamUserStats006.h create mode 100644 src/public SDK/ISteamUserStats007.h create mode 100644 src/public SDK/ISteamUserStats008.h create mode 100644 src/public SDK/ISteamUserStats009.h create mode 100644 src/public SDK/ISteamUserStats010.h create mode 100644 src/public SDK/ISteamUserStats011.h create mode 100644 src/public SDK/ISteamUtils001.h create mode 100644 src/public SDK/ISteamUtils002.h create mode 100644 src/public SDK/ISteamUtils003.h create mode 100644 src/public SDK/ISteamUtils004.h create mode 100644 src/public SDK/ISteamUtils005.h create mode 100644 src/public SDK/ISteamUtils006.h create mode 100644 src/public SDK/ISteamUtils007.h create mode 100644 src/public SDK/ISteamUtils008.h create mode 100644 src/public SDK/ISteamUtils009.h create mode 100644 src/public SDK/ISteamVideo001.h create mode 100644 src/public SDK/ISteamVideo002.h create mode 100644 src/public SDK/Interface_OSW.h create mode 100644 src/public SDK/InventoryCommon.h create mode 100644 src/public SDK/MasterServerUpdaterCommon.h create mode 100644 src/public SDK/MatchMakingKeyValuePair.h create mode 100644 src/public SDK/MatchmakingCommon.h create mode 100644 src/public SDK/MatchmakingServersCommon.h create mode 100644 src/public SDK/MusicCommon.h create mode 100644 src/public SDK/MusicRemoteCommon.h create mode 100644 src/public SDK/NetworkingCommon.h create mode 100644 src/public SDK/OAuthCommon.h create mode 100644 src/public SDK/Open Steamworks.vcproj create mode 100644 src/public SDK/POSIXLibrary.h create mode 100644 src/public SDK/RemoteStorageCommon.h create mode 100644 src/public SDK/ScreenshotsCommon.h create mode 100644 src/public SDK/Steam.h create mode 100644 src/public SDK/SteamAPI.h create mode 100644 src/public SDK/SteamSalt.h create mode 100644 src/public SDK/SteamTypes.h create mode 100644 src/public SDK/Steamclient.h create mode 100644 src/public SDK/SteamclientAPI.h create mode 100644 src/public SDK/Steamworks.h create mode 100644 src/public SDK/StreamLauncherCommon.h create mode 100644 src/public SDK/TSteamApp.h create mode 100644 src/public SDK/TSteamAppDependencyInfo.h create mode 100644 src/public SDK/TSteamAppLaunchOption.h create mode 100644 src/public SDK/TSteamAppStats.h create mode 100644 src/public SDK/TSteamAppVersion.h create mode 100644 src/public SDK/TSteamDiscountQualifier.h create mode 100644 src/public SDK/TSteamElemInfo.h create mode 100644 src/public SDK/TSteamError.h create mode 100644 src/public SDK/TSteamExternalBillingInfo.h create mode 100644 src/public SDK/TSteamGlobalUserID.h create mode 100644 src/public SDK/TSteamOfflineStatus.h create mode 100644 src/public SDK/TSteamPaymentCardInfo.h create mode 100644 src/public SDK/TSteamPaymentCardReceiptInfo.h create mode 100644 src/public SDK/TSteamPrepurchaseInfo.h create mode 100644 src/public SDK/TSteamPrepurchaseReceiptInfo.h create mode 100644 src/public SDK/TSteamProgress.h create mode 100644 src/public SDK/TSteamSplitLocalUserID.h create mode 100644 src/public SDK/TSteamSubscription.h create mode 100644 src/public SDK/TSteamSubscriptionBillingInfo.h create mode 100644 src/public SDK/TSteamSubscriptionDiscount.h create mode 100644 src/public SDK/TSteamSubscriptionReceipt.h create mode 100644 src/public SDK/TSteamSubscriptionStats.h create mode 100644 src/public SDK/TSteamUpdateStats.h create mode 100644 src/public SDK/UGCCommon.h create mode 100644 src/public SDK/UnifiedMessagesCommon.h create mode 100644 src/public SDK/UserCommon.h create mode 100644 src/public SDK/UserStatsCommon.h create mode 100644 src/public SDK/UtilsCommon.h create mode 100644 src/public SDK/VideoCommon.h create mode 100644 src/public SDK/Win32Library.h create mode 100644 src/public SDK/gameserveritem.h create mode 100644 src/public SDK/isteamparentalsettings.h create mode 100644 src/public SDK/servernetadr.h diff --git a/src/Bridge.h b/src/Bridge.h new file mode 100644 index 0000000..8dd657c --- /dev/null +++ b/src/Bridge.h @@ -0,0 +1,129 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ColdManager.h" +#include "CSteamCallbacks.h" +#include +#define EXPORTMYFUNC extern "C" __declspec(dllexport) // Define structures and interface names : ) + +#define STEAMAPPID "steam_appid.txt" +#define EMPTY "Nothing" +#define STEAM_NOTINSTALLED "NoSteam" +#define INI "ColdAPI.ini" +#ifdef _WIN64 +#define STEAMOVERLAY "gameoverlayrenderer64.dll" +#define STEAMCLIENT "steamclient64.dll" +#define STEAMAPI "steam_api64" +#define Steamregistry "Software\\Wow6432Node\\Valve\\Steam" +#define ORGAPI "steam_api64.org" +#else +#define STEAMOVERLAY "gameoverlayrenderer.dll" +#define STEAMCLIENT "steamclient.dll" +#define STEAMAPI "steam_api" +#define Steamregistry "Software\\Valve\\Steam" +#define ORGAPI "steam_api.org" +#endif +#define INTERFACE_NOT_FOUND 10 +#define SUCCES_LOADED 1 + + +enum CSteamInterface +{ + STEAM_APPLIST, + STEAM_APPS, + STEAM_APPTICKET, + STEAM_CLIENT, + STEAM_CONTENTSERVER, + STEAM_CONTROLLER, + STEAM_FRIENDS, + STEAM_PARENTALSETTINGS, + STEAM_GAMECOORDINATOR, + STEAM_GAMESERVER, + STEAM_GAMESERVERSTATS, + STEAM_MATCHMAKING, + STEAM_MATCHMAKINGSERVERS, + STEAM_MUSIC, + STEAM_NETWORKING, + STEAM_REMOTESTORAGE, + STEAM_USER, + STEAM_USERSTATS, + STEAM_UTILS, + STEAM_BILLING, + STEAM_GAMESERVERHTTP, + STEAM_GAMESERVERINVENTORY, + STEAM_GAMESERVERNETWORKING, + STEAM_GAMESERVERUGC, + STEAM_GAMESERVERUTILS, + STEAM_HTMLSURFACE, + STEAM_HTTP, + STEAM_INVENTORY, + STEAM_MUSICREMOTE, + STEAM_SCREENSHOTS, + STEAM_UNIFIEDMESSAGES, + STEAM_UGC, + STEAM_VIDEO, + STEAM_MASTERSERVERUPDATER, + STEAM_GAMESEARCH, + STEAM_INPUT, + STEAM_PARTIES, + STEAM_REMOTEPLAY + +}; + + + + +namespace Steam_Config // Steam configuration +{ + extern char Username[40]; + extern uint32_t AppId; + extern uint32_t AppBuildId; + extern uint64_t UserID; + + extern char SaveDirectory[0x400]; + extern char UGCDirectotry[0x400]; + extern char Language[40]; + + extern bool OnlineMod; + extern bool UnlockAllDLCS; + extern bool LowViolence; + extern bool RemoteStorage; + extern bool LoadOverLay; + extern bool StubBypass; +} +struct InterfaceInfo +{ + CSteamInterface SteamType; + int Version; +}; +struct InterfaceData +{ + CSteamInterface SteamType; + std::string key; + std::string name; + bool isstarted; + int Version; + InterfaceData(void* p = NULL, bool t = false) : datapointer(p), isstarted(t) {} + void* datapointer; + +}; +struct SteamContext +{ + FARPROC InitContext; + ULONG_PTR Flag; + ULONG_PTR Out; +}; + +// public vars +extern std::vector FilesMatrix; +extern HMODULE SteamApimod; +extern char Steamapipath[MAX_PATH]; +extern unsigned char TicketData[128]; +// Crazy? ;P Change it if you don't like. :) \ No newline at end of file diff --git a/src/CSteamCallbacks.cpp b/src/CSteamCallbacks.cpp new file mode 100644 index 0000000..a16a418 --- /dev/null +++ b/src/CSteamCallbacks.cpp @@ -0,0 +1,103 @@ +#include "CSteamCallbacks.h" + + +namespace SteamCallback +{ + std::unordered_map _Calls; // variables + std::unordered_map ResultHandlersBuffers; + std::vector ResultsBuffer; + std::vector CallbacksBuffer; + int _CallID; + std::mutex Thread; + + void RunCallbacks() + { + // Lock + Thread.lock(); + + // Loop to our stored callresults. + auto criter = ResultsBuffer.begin(); + while (criter != ResultsBuffer.end()) + { + // Scan from the request callresult IDs and run its callback. + auto ResultHws = ResultHandlersBuffers.find(criter->Call); + if (ResultHws != ResultHandlersBuffers.end()) { + // Run the callback if was marked active. + if (_Calls[criter->Call] == true) + ResultHandlersBuffers[criter->Call]->Run(criter->Data, false, criter->Call); + } + // Scan from the callback type. + auto cbiter = CallbacksBuffer.begin(); + while (cbiter != CallbacksBuffer.end()) + { + CCallbackBase* CallBack = *cbiter; + if (CallBack && CallBack->GetICallback() == criter->Type) + if (_Calls[criter->Call] == true) + CallBack->Run(criter->Data); + ++cbiter; + } + ++criter; + } + ResultsBuffer.clear(); + Thread.unlock(); + } + void RegisterCallback(CCallbackBase* handler, int callbackID) + { + // Store the new callback ID. + handler->SetICallback(callbackID); + // Store in the vector + CallbacksBuffer.push_back(handler); + } + void RegisterCallResult(CCallbackBase* result, uint64_t call) + { + // Store the callresult from its ID. + ResultHandlersBuffers[call] = result; + } + void UnregisterCallback(CCallbackBase* handler, int callback) + { + auto iter = CallbacksBuffer.begin(); + + // Loop untill we find the asked callback to remove based on the ID. + while (iter != CallbacksBuffer.end()) + { + CCallbackBase* handleriter = *iter; + if (handleriter && handleriter->GetICallback() == callback) + { + CallbacksBuffer.erase(iter); + break; + } + ++iter; + } + } + void UnregisterCallResult(CCallbackBase* result, uint64_t call) + { + // Remove the callresult handler based on the ID. + ResultHandlersBuffers.erase(call); + } + uint64_t RegisterCall(bool MarkActive) + { + // Return a new callresult id and set the status. + ++_CallID; + _Calls[_CallID] = MarkActive; + return _CallID; + } + void CreateNewRequest(void* data, int size, int type, uint64_t call) + { + Thread.lock(); + // Create a new Callresult request with its callback stored. + CSteamAPIResult_t cres; + cres.Call = call; + cres.Type = type; + cres.Size = size; + cres.Data = data; + + // Save our filled "buffer" in our public vector + ResultsBuffer.push_back(cres); + Thread.unlock(); + } + const char* GetCallbackName(int32_t ID) + { + // You can add the names of the callbacks for debugging, but I believe is a bit redundant. + return ""; + } +} \ No newline at end of file diff --git a/src/CSteamCallbacks.h b/src/CSteamCallbacks.h new file mode 100644 index 0000000..12ece6f --- /dev/null +++ b/src/CSteamCallbacks.h @@ -0,0 +1,45 @@ +#pragma once +#include "Bridge.h" + +class CCallbackBase +{ +public: + CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; } + // don't add a virtual destructor because we export this binary interface across dll's + virtual void Run(void* pvParam) = 0; + virtual void Run(void* pvParam, bool bIOFailure, unsigned long long hSteamAPICall) = 0; + int GetICallback() { return m_iCallback; } + // Change current callback ID. + void SetICallback(int b) { m_iCallback = b; } + virtual int GetCallbackSizeBytes() = 0; + +protected: + enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 }; + unsigned char m_nCallbackFlags; + int m_iCallback; + friend class CCallbackMgr; + +private: + CCallbackBase(const CCallbackBase&); + CCallbackBase& operator=(const CCallbackBase&); +}; + +typedef struct +{ + void* Data; + int32_t Size; + int32_t Type; + uint64_t Call; +} CSteamAPIResult_t; + +namespace SteamCallback +{ + void RunCallbacks(); + void RegisterCallback(CCallbackBase* handler, int callback); + void RegisterCallResult(CCallbackBase* result, uint64_t call); + void UnregisterCallback(CCallbackBase* handler, int callback); + void UnregisterCallResult(CCallbackBase* result, uint64_t call); + uint64_t RegisterCall(bool MarkActive); + void CreateNewRequest(void* data, int size, int type, uint64_t call); + const char* GetCallbackName(int ID); +} \ No newline at end of file diff --git a/src/ColdManager.cpp b/src/ColdManager.cpp new file mode 100644 index 0000000..de81e2e --- /dev/null +++ b/src/ColdManager.cpp @@ -0,0 +1,2346 @@ +#include "ColdManager.h" +#include "InterfacesEmulation/PublicConnector.h" + +namespace ColdDLC_Config +{ + std::vector DLCsNames; + std::vector DLCsAPPID; + int DLCsCount = 0; +} +HMODULE OverLayModule = 0; +std::vector FilesMatrix; +std::vector PublicInterfaces; +std::vector PublicInterfacesInfo; + +namespace Steam_Config // Steam configuration +{ + // User Attempt + char Username[40] = { "ColdAPI" }; + uint32_t AppId = 0; + uint32_t AppBuildId = 0; + uint64_t UserID = 0x03100004771F810C; + + // Directories and language attempt + char SaveDirectory[0x400] = { 0 }; + char UGCDirectotry[0x400] = { 0 }; + char Language[40] = { "english" }; + + + // Custom variables attempt + bool OnlineMod = true; + bool UnlockAllDLCS = true; + bool LowViolence = false; + bool RemoteStorage = true; + bool LoadOverLay = false; + bool StubBypass = false; +} + +namespace ColdAPI_DLC +{ + bool GetDLCByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + if (iDLC < ColdDLC_Config::DLCsCount) + { + if (!Steam_Config::UnlockAllDLCS) + { + if (ColdDLC_Config::DLCsCount > 0) + { + *pAppID = ColdDLC_Config::DLCsAPPID.at(iDLC); + *pbAvailable = true; + std::string Name = ColdDLC_Config::DLCsNames.at(iDLC); + std::memcpy(pchName, Name.c_str(), cchNameBufferSize); + return true; + } + } + } + return false; + } + bool IsDLCAvailable(uint32_t Appid) + { + // Check if the requested AppId is not the same as the game setted one. + + if (Appid != 0 || Steam_Config::AppId) + { + if (!Steam_Config::UnlockAllDLCS) + { + uint32_t CurrentAppID = 0; + + if (ColdDLC_Config::DLCsCount > 0) + { + // Search if the asked DLC was requested by the user. + auto IterStart = ColdDLC_Config::DLCsAPPID.begin(); + + while (IterStart != ColdDLC_Config::DLCsAPPID.end()) + { + CurrentAppID = *IterStart; + if (CurrentAppID == Appid) + return true; + ++IterStart; + } + } + return false; + } + } + return true; + } + int GetDlCCount() + { + return ColdDLC_Config::DLCsCount; + } +} +namespace ColdAPI_Storage +{ + static bool SecondTime = false; + static char FileAndDir[0x400] = { 0 }; + const char* ConnectDirectoryToFile(const char* FileName) + { + if (!SecondTime) + { + std::strcpy(FileAndDir, Steam_Config::SaveDirectory); + SecondTime = true; + } + std::string Filename = FileAndDir; + std::strcpy(&FileAndDir[Filename.find_last_of("/\\") + 1], FileName); + return FileAndDir; + } + static bool USecondTime = false; + static char UFileAndDir[0x400] = { 0 }; + const char* ConnectUGCDirectoryToFile(const char* FileName) + { + if (!USecondTime) + { + std::strcpy(UFileAndDir, Steam_Config::UGCDirectotry); + USecondTime = true; + } + std::string Filename = UFileAndDir; + std::strcpy(&UFileAndDir[Filename.find_last_of("/\\") + 1], FileName); + return UFileAndDir; + } + static bool Ready = false; + const char* GetStorageDirectory() + { + if (!Ready) + { + if (std::strcmp(Steam_Config::SaveDirectory, "Auto") == 0) + { + std::memset(Steam_Config::SaveDirectory, 0, 0x400); + std::strcpy(Steam_Config::SaveDirectory, Steamapipath); + std::strcat(Steam_Config::SaveDirectory, "ColdStorage\\"); + std::strcat(Steam_Config::SaveDirectory, Steam_Config::Username); + std::strcat(Steam_Config::SaveDirectory, "\\"); + std::strcat(Steam_Config::SaveDirectory, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId)); + std::strcat(Steam_Config::SaveDirectory, "\\"); + std::strcat(Steam_Config::SaveDirectory, "LocalSaves\\"); + } + else + { + int c = 0; + + // Search if the last byte was a "/". + for (;;) + { + if (Steam_Config::SaveDirectory[c] == NULL) + { + if (Steam_Config::SaveDirectory[c - 1] != '\\') + std::strcpy(&Steam_Config::SaveDirectory[c], "\\"); + break; + } + c++; + } + std::strcat(Steam_Config::SaveDirectory, "ColdStorage\\"); + std::strcat(Steam_Config::SaveDirectory, Steam_Config::Username); + std::strcat(Steam_Config::SaveDirectory, "\\"); + std::strcat(Steam_Config::SaveDirectory, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId)); + std::strcat(Steam_Config::SaveDirectory, "\\"); + std::strcat(Steam_Config::SaveDirectory, "LocalSaves\\"); + } + Ready = true; + } + return Steam_Config::SaveDirectory; + } + void FillFileStructure(const char* Directory) + { + // List files + WIN32_FIND_DATAA FindFileData; + HANDLE hFind = INVALID_HANDLE_VALUE; + std::string Path = Directory; + + FilesMatrix.clear(); + Path.append("*"); + + hFind = FindFirstFileA(Path.c_str(), &FindFileData); + if (hFind != INVALID_HANDLE_VALUE) + { + do + { + if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) + FilesMatrix.push_back((char*)FindFileData.cFileName); + } while (FindNextFileA(hFind, &FindFileData) == TRUE); + FindClose(hFind); + } + } + void Storage_Initializzation() + { + std::strcpy(Steam_Config::UGCDirectotry, Steam_Config::SaveDirectory); + ColdAPI_Storage::GetUGCDirectory(); + ColdAPI_Storage::GetStorageDirectory(); + + // Check if the directory exist + int Arr = 0; + char TempDir[0x400] = { 0 }; + + for (;;) + { + if (Steam_Config::SaveDirectory[Arr] == NULL) + break; + std::memcpy(&TempDir[Arr], &Steam_Config::SaveDirectory[Arr], 1); + if (Steam_Config::SaveDirectory[Arr] == '\\') { + DWORD ftyp = GetFileAttributesA(TempDir); + if (ftyp != INVALID_FILE_ATTRIBUTES && ftyp & FILE_ATTRIBUTE_DIRECTORY) { + Arr++; + continue; + } + CreateDirectoryA(TempDir, NULL); + } + Arr++; + } + Arr = 0; + std::memset(TempDir, 0, 0x400); + for (;;) + { + if (Steam_Config::UGCDirectotry[Arr] == NULL) + break; + std::memcpy(&TempDir[Arr], &Steam_Config::UGCDirectotry[Arr], 1); + if (Steam_Config::UGCDirectotry[Arr] == '\\') { + DWORD ftyp = GetFileAttributesA(TempDir); + if (ftyp != INVALID_FILE_ATTRIBUTES && ftyp & FILE_ATTRIBUTE_DIRECTORY) { + Arr++; + continue; + } + CreateDirectoryA(TempDir, NULL); + } + Arr++; + } + } + static bool UReady = false; + const char* GetUGCDirectory() + { + if (!UReady) + { + if (std::strcmp(Steam_Config::UGCDirectotry, "Auto") == 0) + { + std::memset(Steam_Config::UGCDirectotry, 0, 0x400); + std::strcpy(Steam_Config::UGCDirectotry, Steamapipath); + std::strcat(Steam_Config::UGCDirectotry, "ColdStorage\\"); + std::strcat(Steam_Config::UGCDirectotry, Steam_Config::Username); + std::strcat(Steam_Config::UGCDirectotry, "\\"); + std::strcat(Steam_Config::UGCDirectotry, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId)); + std::strcat(Steam_Config::UGCDirectotry, "\\"); + std::strcat(Steam_Config::UGCDirectotry, "LocalUGC\\"); + } + else + { + int c = 0; + + // Search if the last byte was a "/". + for (;;) + { + if (Steam_Config::UGCDirectotry[c] == NULL) + { + if (Steam_Config::UGCDirectotry[c - 1] != '\\') + std::strcpy(&Steam_Config::UGCDirectotry[c], "\\"); + break; + } + c++; + } + std::strcat(Steam_Config::UGCDirectotry, "ColdStorage\\"); + std::strcat(Steam_Config::UGCDirectotry, Steam_Config::Username); + std::strcat(Steam_Config::UGCDirectotry, "\\"); + std::strcat(Steam_Config::UGCDirectotry, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId)); + std::strcat(Steam_Config::UGCDirectotry, "\\"); + std::strcat(Steam_Config::UGCDirectotry, "LocalUGC\\"); + } + UReady = true; + } + return Steam_Config::UGCDirectotry; + } +} +namespace ColdAPI_General +{ + const char* GetCountryFromLanguage(const char* Language) + { + if (std::strcmp(Language, "english") <= 0) + return "UK England"; + if (std::strcmp(Language, "french") <= 0) + return "French"; + if (std::strcmp(Language, "spanish") <= 0) + return "Spain"; + if (std::strcmp(Language, "japanese") <= 0) + return "Japan"; + if (std::strcmp(Language, "finnish") <= 0) + return "Finland"; + if (std::strcmp(Language, "romanian") <= 0) + return "Romania"; + if (std::strcmp(Language, "german") <= 0) + return "Germany"; + if (std::strcmp(Language, "schinese") <= 0) + return "China"; + if (std::strcmp(Language, "portuguese") <= 0) + return "Portugal"; + if (std::strcmp(Language, "norwegian") <= 0) + return "Norway"; + if (std::strcmp(Language, "turkish") <= 0) + return "Turkey"; + if (std::strcmp(Language, "tchinese") <= 0) + return "China"; + if (std::strcmp(Language, "polish") <= 0) + return "Poland"; + if (std::strcmp(Language, "swedish") <= 0) + return "Sweden"; + if (std::strcmp(Language, "italian") <= 0) + return "Italy"; + if (std::strcmp(Language, "russian") <= 0) + return "Russia"; + if (std::strcmp(Language, "danish") <= 0) + return "Denmark"; + if (std::strcmp(Language, "hungarian") <= 0) + return "Hungary"; + if (std::strcmp(Language, "koreana") <= 0) + return "Korean"; + if (std::strcmp(Language, "thai") <= 0) + return "Thailand"; + if (std::strcmp(Language, "dutch") <= 0) + return "Netherlands"; + if (std::strcmp(Language, "czech") <= 0) + return "Czech Republic"; + return ""; + } + static char SteamDir[MAX_PATH] = { 0 }; + static char CurrentDirectory[MAX_PATH] = { 0 }; + const char* ColdAPI_GetSteamInstallPath() + { + if (std::strcmp(SteamDir, STEAM_NOTINSTALLED) == 0) + return CurrentDirectory; + if (std::strlen(SteamDir) == NULL) + { + HKEY Registrykey; + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, Steamregistry, 0, KEY_QUERY_VALUE, &Registrykey) == ERROR_SUCCESS) + { + DWORD Size = MAX_PATH; + RegQueryValueExA(Registrykey, "InstallPath", NULL, NULL, (BYTE*)SteamDir, &Size); + RegCloseKey(Registrykey); + } + else + { + std::strcpy(SteamDir, STEAM_NOTINSTALLED); + GetCurrentDirectoryA(MAX_PATH, CurrentDirectory); + return CurrentDirectory; + } + } + return SteamDir; + } + void SetOverlayNotification(int Value) + { + if (Steam_Config::LoadOverLay) + { + FARPROC SetNotificationPositionExt = GetProcAddress(OverLayModule, "SetNotificationPosition"); // Load SetNotificationPosition from STEAMOVERLAY module + if (SetNotificationPositionExt) + ((void(*)(int32_t))SetNotificationPositionExt)(Value); // Call the virtual loaded function, most of people uses typedef method but in this way more fast + else + return; + } + } + bool IsOverlayNeededOrEnabled() + { + if (Steam_Config::LoadOverLay) + { + FARPROC OverLayEn = GetProcAddress(OverLayModule, "IsOverlayEnabled"); // Load IsOverlayEnabled from STEAMOVERLAY module + if (OverLayEn) + return ((bool(*)())OverLayEn)(); // Call the virtual loaded function, most of people uses typedef method but in this way more fast + } + return false; + } + bool OverlayNeedsPresent() + { + if (Steam_Config::LoadOverLay) + { + FARPROC OverLayEn = GetProcAddress(OverLayModule, "BOverlayNeedsPresent"); // Load BOverlayNeedsPresent from STEAMOVERLAY module + if (OverLayEn) + return ((bool(*)())OverLayEn)(); // Call the virtual loaded function, most of people uses typedef method but in this way more fast + } + return false; + } + int InitInterfaces() + { + InterfaceData StructureData = { 0 }; + + // Load Interfaces + std::string InterfaceName = ""; + void* SteamInterfaceAccessor = new SteamAppListIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPLIST_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_APPLIST; + StructureData.Version = 1; + InterfaceName = "SteamAppList"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 1; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 2; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 3; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 4; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 5; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 6; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 7; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppsIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPS_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_APPS; + StructureData.Version = 8; + InterfaceName = "SteamApps"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamAppTicketIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMAPPTICKET_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_APPTICKET; + StructureData.Version = 1; + InterfaceName = "SteamAppTicket"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamBillingIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMBILLING_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_BILLING; + StructureData.Version = 1; + InterfaceName = "SteamBilling"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamBillingIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMBILLING_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_BILLING; + StructureData.Version = 2; + InterfaceName = "SteamBilling"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 6; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 7; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 8; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 9; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 10; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 11; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_012; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 12; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn013(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_013; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 13; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn014(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_014; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 14; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn015(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_015; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 15; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn016(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_016; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 16; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn017(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_017; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 17; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn018(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_018; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 18; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamClientIn019(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCLIENT_INTERFACE_VERSION_019; + StructureData.SteamType = CSteamInterface::STEAM_CLIENT; + StructureData.Version = 19; + InterfaceName = "SteamClient"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamContentServerIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTENTSERVER_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_CONTENTSERVER; + StructureData.Version = 1; + InterfaceName = "SteamContentServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamContentServerIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTENTSERVER_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_CONTENTSERVER; + StructureData.Version = 2; + InterfaceName = "SteamContentServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 1; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION002; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 2; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION003; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 3; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION004; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 4; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION005; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 5; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION006; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 6; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamControllerIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMCONTROLLER_INTERFACE_VERSION007; + StructureData.SteamType = CSteamInterface::STEAM_CONTROLLER; + StructureData.Version = 7; + InterfaceName = "SteamController"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 1; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 2; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 3; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 4; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 5; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 6; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 7; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 8; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 9; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 10; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 11; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_012; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 12; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn013(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_013; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 13; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn014(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_014; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 14; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn015(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_015; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 15; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn016(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_016; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 16; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamFriendsIn017(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMFRIENDS_INTERFACE_VERSION_017; + StructureData.SteamType = CSteamInterface::STEAM_FRIENDS; + StructureData.Version = 17; + InterfaceName = "SteamFriends"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameCoordinatorIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMECOORDINATOR_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_GAMECOORDINATOR; + StructureData.Version = 1; + InterfaceName = "SteamGameCoordinator"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameSearchIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESEARCH_INTERFACE_VERSION001; + StructureData.SteamType = CSteamInterface::STEAM_GAMESEARCH; + StructureData.Version = 1; + InterfaceName = "SteamGameSearch"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 2; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 3; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 4; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 5; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 6; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 7; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 8; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 9; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 10; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 11; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVER_INTERFACE_VERSION_012; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVER; + StructureData.Version = 12; + InterfaceName = "SteamGameServer"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamGameServerStatsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMGAMESERVERSTATS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_GAMESERVERSTATS; + StructureData.Version = 1; + InterfaceName = "SteamGameServerStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTMLSurfaceIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTMLSURFACE_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_HTMLSURFACE; + StructureData.Version = 2; + InterfaceName = "SteamHTMLSurface"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTMLSurfaceIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTMLSURFACE_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_HTMLSURFACE; + StructureData.Version = 3; + InterfaceName = "SteamHTMLSurface"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTMLSurfaceIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTMLSURFACE_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_HTMLSURFACE; + StructureData.Version = 4; + InterfaceName = "SteamHTMLSurface"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTMLSurfaceIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTMLSURFACE_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_HTMLSURFACE; + StructureData.Version = 5; + InterfaceName = "SteamHTMLSurface"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTTPIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTTP_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_HTTP; + StructureData.Version = 1; + InterfaceName = "SteamHTTP"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTTPIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTTP_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_HTTP; + StructureData.Version = 2; + InterfaceName = "SteamHTTP"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamHTTPIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMHTTP_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_HTTP; + StructureData.Version = 3; + InterfaceName = "SteamHTTP"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamInputIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMINPUT_INTERFACE_VERSION001; + StructureData.SteamType = CSteamInterface::STEAM_INPUT; + StructureData.Version = 1; + InterfaceName = "SteamInput"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamInventoryIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMINVENTORY_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_INVENTORY; + StructureData.Version = 1; + InterfaceName = "SteamInventory"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamInventoryIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMINVENTORY_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_INVENTORY; + StructureData.Version = 2; + InterfaceName = "SteamInventory"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamInventoryIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMINVENTORY_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_INVENTORY; + StructureData.Version = 3; + InterfaceName = "SteamInventory"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 1; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 2; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 3; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 4; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 5; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 6; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 7; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 8; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKING_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKING; + StructureData.Version = 9; + InterfaceName = "SteamMatchmaking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingServersIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKINGSERVERS; + StructureData.Version = 1; + InterfaceName = "SteamMatchmakingServers"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMatchmakingServersIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_MATCHMAKINGSERVERS; + StructureData.Version = 2; + InterfaceName = "SteamMatchmakingServers"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMusicIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMUSIC_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_MUSIC; + StructureData.Version = 1; + InterfaceName = "SteamMusic"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamMusicRemoteIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMMUSICREMOTE_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_MUSICREMOTE; + StructureData.Version = 1; + InterfaceName = "SteamMusicRemote"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamNetworkingIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMNETWORKING_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_NETWORKING; + StructureData.Version = 1; + InterfaceName = "SteamNetworking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamNetworkingIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMNETWORKING_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_NETWORKING; + StructureData.Version = 2; + InterfaceName = "SteamNetworking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamNetworkingIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMNETWORKING_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_NETWORKING; + StructureData.Version = 3; + InterfaceName = "SteamNetworking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamNetworkingIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMNETWORKING_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_NETWORKING; + StructureData.Version = 4; + InterfaceName = "SteamNetworking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamNetworkingIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMNETWORKING_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_NETWORKING; + StructureData.Version = 5; + InterfaceName = "SteamNetworking"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamParentalSettingsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"; + StructureData.SteamType = CSteamInterface::STEAM_PARENTALSETTINGS; + StructureData.Version = 1; + InterfaceName = "SteamParentalSettings"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamPartiesIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMPARTIES_INTERFACE_VERSION002; + StructureData.SteamType = CSteamInterface::STEAM_PARTIES; + StructureData.Version = 2; + InterfaceName = "SteamParties"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemotePlayIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTEPLAY_INTERFACE_VERSION001; + StructureData.SteamType = CSteamInterface::STEAM_REMOTEPLAY; + StructureData.Version = 1; + InterfaceName = "SteamRemotePlay"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 1; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 2; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 3; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 4; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 5; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 6; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 7; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 8; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 9; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 10; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 11; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_012; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 12; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn013(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_013; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 13; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamRemoteStorageIn014(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMREMOTESTORAGE_INTERFACE_VERSION_014; + StructureData.SteamType = CSteamInterface::STEAM_REMOTESTORAGE; + StructureData.Version = 14; + InterfaceName = "SteamRemoteStorage"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamScreenshotsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMSCREENSHOTS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_SCREENSHOTS; + StructureData.Version = 1; + InterfaceName = "SteamScreenshots"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamScreenshotsIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMSCREENSHOTS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_SCREENSHOTS; + StructureData.Version = 2; + InterfaceName = "SteamScreenshots"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamScreenshotsIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMSCREENSHOTS_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_SCREENSHOTS; + StructureData.Version = 3; + InterfaceName = "SteamScreenshots"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION001; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 1; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION002; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 2; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION003; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 3; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION004; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 4; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION005; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 5; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION007; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 7; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION008; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 8; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION009; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 9; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION010; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 10; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION012; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 12; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUGCIn013(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUGC_INTERFACE_VERSION013; + StructureData.SteamType = CSteamInterface::STEAM_UGC; + StructureData.Version = 13; + InterfaceName = "SteamUGC"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUnifiedMessagesIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUNIFIEDMESSAGES_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_UNIFIEDMESSAGES; + StructureData.Version = 1; + InterfaceName = "SteamUnifiedMessages"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 4; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 5; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 6; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 7; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 8; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 9; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 10; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 11; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn012(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_012; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 12; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn013(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_013; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 13; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn014(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_014; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 14; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn015(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_015; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 15; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn016(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_016; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 16; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn017(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_017; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 17; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn018(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_018; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 18; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn019(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_019; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 19; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserIn020(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSER_INTERFACE_VERSION_020; + StructureData.SteamType = CSteamInterface::STEAM_USER; + StructureData.Version = 20; + InterfaceName = "SteamUser"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 1; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 2; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 3; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 4; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 5; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 6; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 7; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 8; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 9; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn010(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_010; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 10; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUserStatsIn011(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUSERSTATS_INTERFACE_VERSION_011; + StructureData.SteamType = CSteamInterface::STEAM_USERSTATS; + StructureData.Version = 11; + InterfaceName = "SteamUserStats"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 1; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 2; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn003(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_003; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 3; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn004(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_004; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 4; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn005(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_005; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 5; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn006(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_006; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 6; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn007(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_007; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 7; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn008(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_008; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 8; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamUtilsIn009(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMUTILS_INTERFACE_VERSION_009; + StructureData.SteamType = CSteamInterface::STEAM_UTILS; + StructureData.Version = 9; + InterfaceName = "SteamUtils"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamVideoIn001(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMVIDEO_INTERFACE_VERSION_001; + StructureData.SteamType = CSteamInterface::STEAM_VIDEO; + StructureData.Version = 1; + InterfaceName = "SteamVideo"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + SteamInterfaceAccessor = nullptr; + SteamInterfaceAccessor = new SteamVideoIn002(); + StructureData.datapointer = SteamInterfaceAccessor; + StructureData.isstarted = true; + StructureData.key = STEAMVIDEO_INTERFACE_VERSION_002; + StructureData.SteamType = CSteamInterface::STEAM_VIDEO; + StructureData.Version = 2; + InterfaceName = "SteamVideo"; + StructureData.name = InterfaceName; + PublicInterfaces.push_back(StructureData); + + return 1; + } + void* ProvideInterface(int type, const char* Version, bool ScanForName) + { + if (ScanForName) + { + // Search interface by name + for (std::vector::size_type i = 0; i < PublicInterfaces.size(); i++) + if (std::strcmp(PublicInterfaces[i].key.c_str(), Version) == 0) + return PublicInterfaces[i].datapointer; + return nullptr; + } + else + { + // Search interface by the enum type + int InVersion = 0; + + for (std::vector::size_type i = 0; i < PublicInterfacesInfo.size(); i++) { + if (PublicInterfacesInfo[i].SteamType == type) { + InVersion = PublicInterfacesInfo[i].Version; + break; + } + } + if (InVersion != 0) { + for (std::vector::size_type i = 0; i < PublicInterfaces.size(); i++) { + + if (PublicInterfaces[i].SteamType == type && PublicInterfaces[i].Version == InVersion) { + return PublicInterfaces[i].datapointer; + } + } + } + return nullptr; + } + } + void* ContextInitializzation(void* Input) + { + int32_t hUser = SteamAPI_GetHSteamUser(); + SteamContext* Sctx = (SteamContext*)Input; + if (Sctx->Flag != hUser) // Check if the context isn't already initialized + { + Sctx->Flag = hUser; + ((void(*)(void*))Sctx->InitContext)(&Sctx->Out); + } + return (void*)&Sctx->Out; + } + bool ReadIni() + { + char SteamORG[MAX_PATH] = { 0 }; + std::strcpy(SteamORG, Steamapipath); + std::strcat(SteamORG, ORGAPI); + char SteamINI[MAX_PATH] = { 0 }; + std::strcpy(SteamINI, Steamapipath); + std::strcat(SteamINI, INI); + + // Read from INI + Steam_Config::AppId = GetPrivateProfileIntA("SteamData", "AppID", NULL, SteamINI); + Steam_Config::AppBuildId = GetPrivateProfileIntA("SteamData", "AppBuildId", NULL, SteamINI); + Steam_Config::OnlineMod = GetPrivateProfileIntA("SteamData", "OnlineMode", NULL, SteamINI) != FALSE; + Steam_Config::LoadOverLay = GetPrivateProfileIntA("SteamData", "OverLay", NULL, SteamINI) != FALSE; + Steam_Config::UnlockAllDLCS = GetPrivateProfileIntA("SteamData", "UnlockAllDLCs", TRUE, SteamINI) != FALSE; + Steam_Config::LowViolence = GetPrivateProfileIntA("SteamProfile", "LowViolence", NULL, SteamINI) != FALSE; + Steam_Config::RemoteStorage = GetPrivateProfileIntA("SteamData", "SteamFileSave", TRUE, SteamINI) != FALSE; + Steam_Config::StubBypass = GetPrivateProfileIntA("SteamAdditional", "PatchSteamStub", NULL, SteamINI) != FALSE; + + if (!GetPrivateProfileStringA("SteamProfile", "Username", "ColdAPI", Steam_Config::Username, sizeof(Steam_Config::Username), SteamINI)) + return false; + if (!GetPrivateProfileStringA("SteamProfile", "Language", "english", Steam_Config::Language, sizeof(Steam_Config::Language), SteamINI)) + return false; + if (!GetPrivateProfileStringA("SteamData", "SavePath", "Auto", Steam_Config::SaveDirectory, sizeof(Steam_Config::SaveDirectory), SteamINI)) + return false; + + // DLC attempt: + if (!Steam_Config::UnlockAllDLCS) + { + bool NullByte = false; + long OffSet = 0; + char String[500] = { 0 }; + char Section[0x900] = { 0 }; + GetPrivateProfileSectionA("DLC", Section, sizeof(Section), SteamINI); + uint32_t DAppid = 0; + // GetDLCs + while (std::memcmp(&Section[OffSet], &NullByte, 1) != 0) + { + // Scan the string. + std::sscanf(&Section[OffSet], "%u=%s", &DAppid, String); + ColdDLC_Config::DLCsAPPID.push_back(DAppid); + ColdDLC_Config::DLCsNames.push_back(String); + ColdDLC_Config::DLCsCount++; + + // Prepare for next DLC String Info + std::memset(String, 0, sizeof(String)); + DAppid = 0; + // Calculate the offset for the next string, just get the string length and add 1 byte. + long SSize = std::strlen(&Section[OffSet]) + 1; + OffSet += SSize; + } + } + // Check if we should read interfaces from the original steam_api. + if (GetPrivateProfileIntA("SteamAdditional", "InterfaceChecker", NULL, SteamINI) == TRUE) + { + HMODULE bytesorg = LoadLibraryA(SteamORG); + if (GetLastError() == ERROR_MOD_NOT_FOUND) { + MessageBoxA(NULL, "Couldn't load steam_api(64).", "ColdAPI", MB_ICONERROR); + ExitProcess(NULL); + } + auto DosP = (IMAGE_DOS_HEADER*)bytesorg; + auto NtP = (IMAGE_NT_HEADERS*)((ULONG_PTR)bytesorg + DosP->e_lfanew); + auto SecP = IMAGE_FIRST_SECTION(NtP); + + // Scan sectiion for names. + for (int i = 0; i < NtP->FileHeader.NumberOfSections; i++) { + if (std::strcmp((char*)SecP->Name, ".rdata") == 0) + break; + SecP++; + } + + // We have now the original steam_api section base address. Let's search the string into it. + auto Buff = (LPSTR)((ULONG_PTR)bytesorg + SecP->VirtualAddress); + + // Iter on our initialized interfaces + auto CInterfaceIter = PublicInterfaces.begin(); + + while (CInterfaceIter != PublicInterfaces.end()) + { + InterfaceData InterfaceC = *CInterfaceIter; + + // Loop to the sectiion + for (unsigned int i = 0; i < SecP->Misc.VirtualSize; i++) + { + if (std::strcmp(&Buff[i], InterfaceC.key.c_str()) == 0) + { + InterfaceInfo PublicInfo = { InterfaceC.SteamType, InterfaceC.Version }; + PublicInterfacesInfo.push_back(PublicInfo); + WritePrivateProfileStringA("SteamInterfaces", InterfaceC.name.c_str(), ColdAPI_General::FormatTheString("%d", EMPTY, InterfaceC.Version), + SteamINI); + break; + } + } + ++CInterfaceIter; + } + + WritePrivateProfileStringA("SteamAdditional", "InterfaceChecker", "0", SteamINI); // Disable interface checker + FreeLibrary(bytesorg); // Free original SteamApi module. + return true; + } + // Iter on our initialized interfaces + int Type = 0; + int LVersion = 0; + for (auto CInterfaceIter = PublicInterfaces.begin(); CInterfaceIter != PublicInterfaces.end(); ++CInterfaceIter) + { + InterfaceData InterfaceC = *CInterfaceIter; + CSteamInterface IType = static_cast(Type); + + // Check and read interface types. + if (IType == InterfaceC.SteamType) + { + // To be safe we search the latest interface version as it'll be used if it was not specified from the ini. + auto LCInterfaceIter = CInterfaceIter; + for (;;) { + if (LCInterfaceIter == PublicInterfaces.end()) { + // Should be the latest. + --LCInterfaceIter; + InterfaceData LInterfaceC = *LCInterfaceIter; + LVersion = LInterfaceC.Version; + break; + } + InterfaceData LInterfaceC = *LCInterfaceIter; + if (InterfaceC.SteamType != LInterfaceC.SteamType) { + // Should be the latest. + --LCInterfaceIter; + LVersion = LInterfaceC.Version; + break; + } + ++LCInterfaceIter; + } + + int RVersion = GetPrivateProfileIntA("SteamInterfaces", InterfaceC.name.c_str(), LVersion, SteamINI); + InterfaceInfo PublicInfo = { InterfaceC.SteamType, RVersion}; + PublicInterfacesInfo.push_back(PublicInfo); + Type++; + } + } + + return true; + } + const char* FormatTheString(const char* Format, const char* ValueS, uint64_t ValueU) + { + char TheString[300] = { 0 }; + if (std::strcmp(ValueS, EMPTY) == 0) { + std::sprintf(TheString, Format, ValueU); + return TheString; + } + std::sprintf(TheString, Format, ValueS); + return TheString; + } +} +namespace ColdAPI_InitAndShutDown +{ + static bool IsInitialized = false; + bool ColdClientInitializzation() + { + if (!IsInitialized) + { + // Init Interfaces. + ColdAPI_General::InitInterfaces(); + + // Configuration attempt. + ColdAPI_General::ReadIni(); + + if (Steam_Config::AppId == NULL) + { + char SteamAPPID[MAX_PATH] = { 0 }; + std::strcpy(SteamAPPID, Steamapipath); + std::strcat(SteamAPPID, STEAMAPPID); + + // Read from steam_appid.txt file if the APPID wasn't provided from the INI. + std::FILE* hSteamAPPID = std::fopen(SteamAPPID, "r"); + if (hSteamAPPID) + { + std::fscanf(hSteamAPPID, "%u", &Steam_Config::AppId); + std::fclose(hSteamAPPID); + } + } + if (Steam_Config::AppId == NULL) + { + MessageBoxA(NULL, "Please set an AppID and try again.", "ColdAPI", MB_ICONERROR); + ExitProcess(NULL); + } + SetEnvironmentVariableA("SteamAppId", ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId)); + SetEnvironmentVariableA("SteamGameId", ColdAPI_General::FormatTheString("%llu", EMPTY, Steam_Config::AppId & 0xFFFFFF)); + + // Declare some variables to be used for Steam registry. + DWORD UserIdentification = Steam_Config::UserID & 0xffffffff; + DWORD ProcessID = GetCurrentProcessId(); + + /// Steam Client and Steam overlay dll paths. + std::string Clientpath32 = ColdAPI_General::FormatTheString("%s\\steamclient.dll", ColdAPI_General::ColdAPI_GetSteamInstallPath(), + NULL); + std::string Clientpath64 = ColdAPI_General::FormatTheString("%s\\steamclient64.dll", ColdAPI_General::ColdAPI_GetSteamInstallPath(), + NULL); + std::string OverLay64 = ColdAPI_General::FormatTheString("%s\\gameoverlayrenderer64.dll", ColdAPI_General::ColdAPI_GetSteamInstallPath(), + NULL); + std::string OverLay32 = ColdAPI_General::FormatTheString("%s\\gameoverlayrenderer.dll", ColdAPI_General::ColdAPI_GetSteamInstallPath(), + NULL); + + // Steam registry attempt. + HKEY Registrykey; + if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Valve\\Steam\\ActiveProcess", 0, KEY_ALL_ACCESS, &Registrykey) == ERROR_SUCCESS) + { + // Set values to Windows registry. + RegSetValueExA(Registrykey, "ActiveUser", NULL, REG_DWORD, (LPBYTE)& UserIdentification, sizeof(DWORD)); + RegSetValueExA(Registrykey, "pid", NULL, REG_DWORD, (LPBYTE)& ProcessID, sizeof(DWORD)); + RegSetValueExA(Registrykey, "SteamClientDll", NULL, REG_SZ, (LPBYTE)Clientpath32.c_str(), (DWORD)Clientpath32.length() + 1); + RegSetValueExA(Registrykey, "SteamClientDll64", NULL, REG_SZ, (LPBYTE)Clientpath64.c_str(), (DWORD)Clientpath64.length() + 1); + RegSetValueExA(Registrykey, "Universe", NULL, REG_SZ, (LPBYTE)"Public", (DWORD)std::strlen("Public") + 1); + + // Close the HKEY Handle. + RegCloseKey(Registrykey); + } + DWORD Disposition; + if (RegCreateKeyExA(HKEY_CURRENT_USER, ColdAPI_General::FormatTheString("Software\\Valve\\Steam\\Apps\\%i", EMPTY, Steam_Config::AppId), 0, NULL, 0, KEY_ALL_ACCESS, NULL, &Registrykey, &Disposition) == ERROR_SUCCESS) + { + // Mark the game running to the Windows registry. + DWORD Running = TRUE; + + RegSetValueExA(Registrykey, "Installed", NULL, REG_DWORD, (LPBYTE)& Running, sizeof(DWORD)); + RegSetValueExA(Registrykey, "Running", NULL, REG_DWORD, (LPBYTE)& Running, sizeof(DWORD)); + RegCloseKey(Registrykey); + } + + // Check if we should load the overlay + if (Steam_Config::LoadOverLay) + { + std::string OverLay = ""; +#ifdef _WIN64 + OverLay = OverLay64; +#else + OverLay = OverLay32; +#endif + OverLayModule = LoadLibraryExA(OverLay.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + + } + std::string Client = ""; +#ifdef _WIN64 + Client = Clientpath64; +#else + Client = Clientpath32; +#endif + LoadLibraryExA(Client.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + + if (Steam_Config::RemoteStorage) + { + ColdAPI_Storage::Storage_Initializzation(); + } + if (Steam_Config::StubBypass) + { + SteamStubBypass::Patch(); + } + IsInitialized = true; + } + return IsInitialized; + } + void ColdClientShutDown() + { + // Add something if needed but usually this is useless. + return; + } +} \ No newline at end of file diff --git a/src/ColdManager.h b/src/ColdManager.h new file mode 100644 index 0000000..22fdcca --- /dev/null +++ b/src/ColdManager.h @@ -0,0 +1,43 @@ +#pragma once +#include "Bridge.h" +#include +#include +#include +#include +#include +#include +#include "SteamStubBypass/SteamStub.h" + +namespace ColdAPI_General +{ + const char* GetCountryFromLanguage(const char* Language); + const char* ColdAPI_GetSteamInstallPath(); + void SetOverlayNotification(int Value); + bool IsOverlayNeededOrEnabled(); + bool OverlayNeedsPresent(); + int InitInterfaces(); + void* ProvideInterface(int type, const char* Version, bool ScanForName); + void* ContextInitializzation(void* Input); + bool ReadIni(); + const char* FormatTheString(const char* Format, const char* ValueS, uint64_t ValueU); +} +namespace ColdAPI_DLC +{ + bool GetDLCByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize); + bool IsDLCAvailable(uint32_t Appid); + int GetDlCCount(); +} +namespace ColdAPI_Storage +{ + const char* ConnectDirectoryToFile(const char* FileName); + const char* ConnectUGCDirectoryToFile(const char* FileName); + const char* GetStorageDirectory(); + const char* GetUGCDirectory(); + void FillFileStructure(const char* Directory); + void Storage_Initializzation(); +} +namespace ColdAPI_InitAndShutDown +{ + bool ColdClientInitializzation(); + void ColdClientShutDown(); +} \ No newline at end of file diff --git a/src/INI example/ColdAPI.ini b/src/INI example/ColdAPI.ini new file mode 100644 index 0000000..b79ef87 --- /dev/null +++ b/src/INI example/ColdAPI.ini @@ -0,0 +1,52 @@ +[SteamProfile] +Username = ColdAPI +LowViolence = 0 +Language = english +;------------------------ +[SteamData] +AppID = 0 +AppBuildId = 0 +OnlineMod = 1 +OverLay = 0 +SavePath = Auto +SteamFileSave = 0 +UnlockAllDLCs = 1 +;------------------------ +[SteamAdditional] +InterfaceChecker =1 +PatchSteamStub = 0 +;------------------------ +[DLC] +1234 = Test +1334 = Name +1335 = Data +;------------------------ +[SteamInterfaces] +SteamAppList =1 +SteamApps =8 +SteamClient =17 +SteamContentServer =2 +SteamController =3 +SteamFriends =17 +SteamGameCoordinator =1 +SteamGameServer =12 +SteamGameServerStats =1 +SteamHTMLSurface =5 +SteamHTTP =3 +SteamInventory =3 +SteamMatchmaking =9 +SteamMatchmakingServers =2 +SteamMusic =1 +SteamMusicRemote =1 +SteamNetworking =5 +SteamRemoteStorage =14 +SteamScreenShots =3 +SteamUGC =13 +SteamUser =19 +SteamUserStats =11 +SteamUtils =8 +SteamVideo =2 +SteamInput=1 +SteamMatchGameSearch=1 +SteamParties=2 +SteamRemotePlay=1 diff --git a/src/InterfacesEmulation/PublicConnector.h b/src/InterfacesEmulation/PublicConnector.h new file mode 100644 index 0000000..8ea2e8f --- /dev/null +++ b/src/InterfacesEmulation/PublicConnector.h @@ -0,0 +1,169 @@ +#pragma once +#include "../Bridge.h" + +#include "SteamAppList001.h" +#include "SteamApps001.h" +#include "SteamApps002.h" +#include "SteamApps003.h" +#include "SteamApps004.h" +#include "SteamApps005.h" +#include "SteamApps006.h" +#include "SteamApps007.h" +#include "SteamApps008.h" +#include "SteamAppTicket001.h" +#include "SteamBilling001.h" +#include "SteamBilling002.h" +#include "SteamClient006.h" +#include "SteamClient007.h" +#include "SteamClient008.h" +#include "SteamClient009.h" +#include "SteamClient010.h" +#include "SteamClient011.h" +#include "SteamClient012.h" +#include "SteamClient013.h" +#include "SteamClient014.h" +#include "SteamClient015.h" +#include "SteamClient016.h" +#include "SteamClient017.h" +#include "SteamClient018.h" +#include "SteamClient019.h" +#include "SteamContentServer001.h" +#include "SteamContentServer002.h" +#include "SteamController001.h" +#include "SteamController002.h" +#include "SteamController003.h" +#include "SteamController004.h" +#include "SteamController005.h" +#include "SteamController006.h" +#include "SteamController007.h" +#include "SteamFriends001.h" +#include "SteamFriends002.h" +#include "SteamFriends003.h" +#include "SteamFriends004.h" +#include "SteamFriends005.h" +#include "SteamFriends006.h" +#include "SteamFriends007.h" +#include "SteamFriends008.h" +#include "SteamFriends009.h" +#include "SteamFriends010.h" +#include "SteamFriends011.h" +#include "SteamFriends012.h" +#include "SteamFriends013.h" +#include "SteamFriends014.h" +#include "SteamFriends015.h" +#include "SteamFriends016.h" +#include "SteamFriends017.h" +#include "SteamGameCoordinator001.h" +#include "SteamGameSearch001.h" +#include "SteamGameServer002.h" +#include "SteamGameServer003.h" +#include "SteamGameServer004.h" +#include "SteamGameServer005.h" +#include "SteamGameServer006.h" +#include "SteamGameServer007.h" +#include "SteamGameServer008.h" +#include "SteamGameServer009.h" +#include "SteamGameServer010.h" +#include "SteamGameServer011.h" +#include "SteamGameServer012.h" +#include "SteamGameServerStats001.h" +#include "SteamHTMLSurface002.h" +#include "SteamHTMLSurface003.h" +#include "SteamHTMLSurface004.h" +#include "SteamHTMLSurface005.h" +#include "SteamHTTP001.h" +#include "SteamHTTP002.h" +#include "SteamHTTP003.h" +#include "SteamInventory001.h" +#include "SteamInventory002.h" +#include "SteamInventory003.h" +#include "SteamInput001.h" +#include "SteamMatchmaking001.h" +#include "SteamMatchmaking002.h" +#include "SteamMatchmaking003.h" +#include "SteamMatchmaking004.h" +#include "SteamMatchmaking005.h" +#include "SteamMatchmaking006.h" +#include "SteamMatchmaking007.h" +#include "SteamMatchmaking008.h" +#include "SteamMatchmaking009.h" +#include "SteamMatchmakingServers001.h" +#include "SteamMatchmakingServers002.h" +#include "SteamMusic001.h" +#include "SteamMusicRemote001.h" +#include "SteamNetworking001.h" +#include "SteamNetworking002.h" +#include "SteamNetworking003.h" +#include "SteamNetworking004.h" +#include "SteamNetworking005.h" +#include "SteamParentalSettings001.h" +#include "SteamParties002.h" +#include "SteamRemotePlay001.h" +#include "SteamRemoteStorage001.h" +#include "SteamRemoteStorage002.h" +#include "SteamRemoteStorage003.h" +#include "SteamRemoteStorage004.h" +#include "SteamRemoteStorage005.h" +#include "SteamRemoteStorage006.h" +#include "SteamRemoteStorage007.h" +#include "SteamRemoteStorage008.h" +#include "SteamRemoteStorage009.h" +#include "SteamRemoteStorage010.h" +#include "SteamRemoteStorage011.h" +#include "SteamRemoteStorage012.h" +#include "SteamRemoteStorage013.h" +#include "SteamRemoteStorage014.h" +#include "SteamScreenshots001.h" +#include "SteamScreenshots002.h" +#include "SteamScreenshots003.h" +#include "SteamUGC001.h" +#include "SteamUGC002.h" +#include "SteamUGC003.h" +#include "SteamUGC004.h" +#include "SteamUGC005.h" +#include "SteamUGC007.h" +#include "SteamUGC008.h" +#include "SteamUGC009.h" +#include "SteamUGC010.h" +#include "SteamUGC012.h" +#include "SteamUGC013.h" +#include "SteamUnifiedMessages001.h" +#include "SteamUser004.h" +#include "SteamUser005.h" +#include "SteamUser006.h" +#include "SteamUser007.h" +#include "SteamUser008.h" +#include "SteamUser009.h" +#include "SteamUser010.h" +#include "SteamUser011.h" +#include "SteamUser012.h" +#include "SteamUser013.h" +#include "SteamUser014.h" +#include "SteamUser015.h" +#include "SteamUser016.h" +#include "SteamUser017.h" +#include "SteamUser018.h" +#include "SteamUser019.h" +#include "SteamUser020.h" +#include "SteamUserStats001.h" +#include "SteamUserStats002.h" +#include "SteamUserStats003.h" +#include "SteamUserStats004.h" +#include "SteamUserStats005.h" +#include "SteamUserStats006.h" +#include "SteamUserStats007.h" +#include "SteamUserStats008.h" +#include "SteamUserStats009.h" +#include "SteamUserStats010.h" +#include "SteamUserStats011.h" +#include "SteamUtils001.h" +#include "SteamUtils002.h" +#include "SteamUtils003.h" +#include "SteamUtils004.h" +#include "SteamUtils005.h" +#include "SteamUtils006.h" +#include "SteamUtils007.h" +#include "SteamUtils008.h" +#include "SteamUtils009.h" +#include "SteamVideo001.h" +#include "SteamVideo002.h" \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamAppList001.h b/src/InterfacesEmulation/SteamAppList001.h new file mode 100644 index 0000000..e60e1ff --- /dev/null +++ b/src/InterfacesEmulation/SteamAppList001.h @@ -0,0 +1,30 @@ +#pragma once +#include "../public SDK/ISteamAppList001.h" +#include "../Bridge.h" + + + +class SteamAppListIn001 : public ISteamAppList001 +{ +public: + uint32 GetNumInstalledApps() + { + return 1; + } + uint32 GetInstalledApps(uint32* puUnk, uint32 uUnk) + { + return 1; + } + unknown_ret GetAppName(uint32 uUnk, char* pUnk, int32 iUnk) + { + return 1; + } + unknown_ret GetAppInstallDir(uint32 uUnk, char* pUnk, int32 iUnk) + { + return 1; + } + unknown_ret GetAppBuildId(uint32 uUnk) + { + return Steam_Config::AppBuildId; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamAppTicket001.h b/src/InterfacesEmulation/SteamAppTicket001.h new file mode 100644 index 0000000..f89527c --- /dev/null +++ b/src/InterfacesEmulation/SteamAppTicket001.h @@ -0,0 +1,33 @@ +#pragma once +#include "../public SDK/ISteamAppTicket001.h" +#include "../Bridge.h" + +class SteamAppTicketIn001 : public ISteamAppTicket001 +{ +public: + uint32 GetAppOwnershipTicketData(AppId_t nAppId, void* pvSignedTicket, uint32 cbSignedTicket, uint32* piAppId, uint32* piSteamId, uint32* piSignature, uint32* pcbSignature) + { + if (nAppId == Steam_Config::AppId) + { + // Use small string signature + const char* Signature = "Fake"; + int SLength = std::strlen(Signature) + 1; + uint32_t FSize = sizeof(uint32_t) + sizeof(uint64_t) + SLength; + + // I would assume that the target/game would give enough buffer size for at least the AppId and UserID, so we decrease the Signature string length size. + while (FSize > cbSignedTicket) { + SLength--; + FSize = sizeof(uint32_t) + sizeof(uint64_t) + SLength; + } + std::memcpy(pvSignedTicket, &Steam_Config::AppId, sizeof(uint32_t)); + std::memcpy((void*)((ULONG_PTR)pvSignedTicket + sizeof(uint32_t)), &Steam_Config::UserID, sizeof(uint64_t)); + std::memcpy((void*)((ULONG_PTR)pvSignedTicket + sizeof(uint32_t) + sizeof(uint64_t)), Signature, SLength); + *piAppId = 0; + *piSteamId = sizeof(uint32_t); + *piSignature = sizeof(uint32_t) + sizeof(uint64_t); + *pcbSignature = SLength; + return FSize; + } + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamApps001.h b/src/InterfacesEmulation/SteamApps001.h new file mode 100644 index 0000000..6b5eb33 --- /dev/null +++ b/src/InterfacesEmulation/SteamApps001.h @@ -0,0 +1,13 @@ +#pragma once +#include "../public SDK/ISteamApps001.h" +#include "../Bridge.h" + + +class SteamAppsIn001 : public ISteamApps001 +{ +public: + int GetAppData(AppId_t nAppID, const char* pchKey, char* pchValue, int cchValueMax) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamApps002.h b/src/InterfacesEmulation/SteamApps002.h new file mode 100644 index 0000000..d513224 --- /dev/null +++ b/src/InterfacesEmulation/SteamApps002.h @@ -0,0 +1,37 @@ +#pragma once +#include "../public SDK/ISteamApps002.h" +#include "../Bridge.h" + +class SteamAppsIn002 : public ISteamApps002 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } +}; diff --git a/src/InterfacesEmulation/SteamApps003.h b/src/InterfacesEmulation/SteamApps003.h new file mode 100644 index 0000000..77c0627 --- /dev/null +++ b/src/InterfacesEmulation/SteamApps003.h @@ -0,0 +1,42 @@ +#pragma once +#include "../public SDK/ISteamApps003.h" +#include "../Bridge.h" + +class SteamAppsIn003 : public ISteamApps003 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + bool BIsDlcInstalled(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } +}; diff --git a/src/InterfacesEmulation/SteamApps004.h b/src/InterfacesEmulation/SteamApps004.h new file mode 100644 index 0000000..bb55df3 --- /dev/null +++ b/src/InterfacesEmulation/SteamApps004.h @@ -0,0 +1,71 @@ +#pragma once +#include "../public SDK/ISteamApps004.h" +#include "../Bridge.h" + + +class SteamAppsIn004 : public ISteamApps004 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + bool BIsDlcInstalled(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + uint32 GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 700; + } + + bool BIsSubscribedFromFreeWeekend() + { + return false; + } + int GetDLCCount() + { + return ColdAPI_DLC::GetDlCCount(); + } + + bool BGetDLCDataByIndex(int iDLC, AppId_t* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + return ColdAPI_DLC::GetDLCByIndex(iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize); + } + + void InstallDLC(AppId_t nAppID) + { + return; + } + void UninstallDLC(AppId_t nAppID) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamApps005.h b/src/InterfacesEmulation/SteamApps005.h new file mode 100644 index 0000000..0335bec --- /dev/null +++ b/src/InterfacesEmulation/SteamApps005.h @@ -0,0 +1,98 @@ +#pragma once +#include "../public SDK/ISteamApps005.h" +#include "../Bridge.h" + +class SteamAppsIn005 : public ISteamApps005 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + bool BIsDlcInstalled(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + uint32 GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 700; + } + + bool BIsSubscribedFromFreeWeekend() + { + return false; + } + int GetDLCCount() + { + return ColdAPI_DLC::GetDlCCount(); + } + + bool BGetDLCDataByIndex(int iDLC, AppId_t* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + return ColdAPI_DLC::GetDLCByIndex(iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize); + } + + void InstallDLC(AppId_t nAppID) + { + return; + } + void UninstallDLC(AppId_t nAppID) + { + return; + } + + void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + return; + } + + bool GetCurrentBetaName(char* pchName, int cchNameBufferSize) + { + return false; + } + bool MarkContentCorrupt(bool bMissingFilesOnly) + { + return false; + } + uint32 GetInstalledDepots(DepotId_t* pvecDepots, uint32 cMaxDepots) + { + return NULL; + } + + uint32 GetAppInstallDir(AppId_t appID, char* pchFolder, uint32 cchFolderBufferSize) + { + GetCurrentDirectoryA(cchFolderBufferSize, pchFolder); + return cchFolderBufferSize; + } + bool BIsAppInstalled(AppId_t appID) + { + return true; + } +}; diff --git a/src/InterfacesEmulation/SteamApps006.h b/src/InterfacesEmulation/SteamApps006.h new file mode 100644 index 0000000..c11a6a4 --- /dev/null +++ b/src/InterfacesEmulation/SteamApps006.h @@ -0,0 +1,112 @@ +#pragma once +#include "../public SDK/ISteamApps006.h" +#include "../Bridge.h" + +class SteamAppsIn006 : public ISteamApps006 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + bool BIsDlcInstalled(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + uint32 GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 700; + } + + bool BIsSubscribedFromFreeWeekend() + { + return false; + } + int GetDLCCount() + { + return ColdAPI_DLC::GetDlCCount(); + } + + bool BGetDLCDataByIndex(int iDLC, AppId_t* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + return ColdAPI_DLC::GetDLCByIndex(iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize); + } + + void InstallDLC(AppId_t nAppID) + { + return; + } + void UninstallDLC(AppId_t nAppID) + { + return; + } + + void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + return; + } + + bool GetCurrentBetaName(char* pchName, int cchNameBufferSize) + { + return false; + } + bool MarkContentCorrupt(bool bMissingFilesOnly) + { + return false; + } + uint32 GetInstalledDepots(AppId_t appID, DepotId_t* pvecDepots, uint32 cMaxDepots) + { + return NULL; + } + + uint32 GetAppInstallDir(AppId_t appID, char* pchFolder, uint32 cchFolderBufferSize) + { + GetCurrentDirectoryA(cchFolderBufferSize, pchFolder); + return cchFolderBufferSize; + } + bool BIsAppInstalled(AppId_t appID) + { + return true; + } + + CSteamID GetAppOwner() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLaunchQueryParam(const char* pchKey) + { + return ""; + } + bool GetDlcDownloadProgress(AppId_t nAppID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamApps007.h b/src/InterfacesEmulation/SteamApps007.h new file mode 100644 index 0000000..333e28b --- /dev/null +++ b/src/InterfacesEmulation/SteamApps007.h @@ -0,0 +1,116 @@ +#pragma once +#include "../public SDK/ISteamApps007.h" +#include "../Bridge.h" + +class SteamAppsIn007 : public ISteamApps007 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + bool BIsDlcInstalled(AppId_t nAppID) + { + return ColdAPI_DLC::IsDLCAvailable(nAppID); + } + + uint32 GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 700; + } + + bool BIsSubscribedFromFreeWeekend() + { + return false; + } + int GetDLCCount() + { + return ColdAPI_DLC::GetDlCCount(); + } + + bool BGetDLCDataByIndex(int iDLC, AppId_t* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + return ColdAPI_DLC::GetDLCByIndex(iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize); + } + + void InstallDLC(AppId_t nAppID) + { + return; + } + void UninstallDLC(AppId_t nAppID) + { + return; + } + + void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + return; + } + + bool GetCurrentBetaName(char* pchName, int cchNameBufferSize) + { + return false; + } + bool MarkContentCorrupt(bool bMissingFilesOnly) + { + return false; + } + uint32 GetInstalledDepots(AppId_t appID, DepotId_t* pvecDepots, uint32 cMaxDepots) + { + return NULL; + } + + uint32 GetAppInstallDir(AppId_t appID, char* pchFolder, uint32 cchFolderBufferSize) + { + GetCurrentDirectoryA(cchFolderBufferSize, pchFolder); + return cchFolderBufferSize; + } + bool BIsAppInstalled(AppId_t appID) + { + return true; + } + + CSteamID GetAppOwner() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLaunchQueryParam(const char* pchKey) + { + return ""; + } + bool GetDlcDownloadProgress(uint32, uint64*, uint64*) + { + return false; + } + int GetAppBuildId() + { + return Steam_Config::AppBuildId; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamApps008.h b/src/InterfacesEmulation/SteamApps008.h new file mode 100644 index 0000000..383806b --- /dev/null +++ b/src/InterfacesEmulation/SteamApps008.h @@ -0,0 +1,139 @@ +#pragma once +#include "../public SDK/ISteamApps008.h" +#include "../Bridge.h" + +class SteamAppsIn008 : public ISteamApps008 +{ +public: + bool BIsSubscribed() + { + return true; + } + bool BIsLowViolence() + { + return Steam_Config::LowViolence; + } + bool BIsCybercafe() + { + return false; + } + bool BIsVACBanned() + { + return false; + } + const char* GetCurrentGameLanguage() + { + return Steam_Config::Language; + } + const char* GetAvailableGameLanguages() + { + return Steam_Config::Language; + } + + bool BIsSubscribedApp(AppId_t appID) + { + return ColdAPI_DLC::IsDLCAvailable(appID); + } + + bool BIsDlcInstalled(AppId_t appID) + { + return ColdAPI_DLC::IsDLCAvailable(appID); + } + + uint32 GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - 600; + } + + bool BIsSubscribedFromFreeWeekend() + { + return false; + } + + int GetDLCCount() + { + return ColdAPI_DLC::GetDlCCount(); + } + + bool BGetDLCDataByIndex(int iDLC, AppId_t* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize) + { + return ColdAPI_DLC::GetDLCByIndex(iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize); + } + + void InstallDLC(AppId_t nAppID) + { + return; + } + void UninstallDLC(AppId_t nAppID) + { + return; + } + + void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + return; + } + + bool GetCurrentBetaName(char* pchName, int cchNameBufferSize) + { + return false; + } + bool MarkContentCorrupt(bool bMissingFilesOnly) + { + return false; + } + uint32 GetInstalledDepots(AppId_t appID, DepotId_t* pvecDepots, uint32 cMaxDepots) + { + return NULL; + } + + uint32 GetAppInstallDir(AppId_t appID, char* pchFolder, uint32 cchFolderBufferSize) + { + GetCurrentDirectoryA(cchFolderBufferSize, pchFolder); + return cchFolderBufferSize; + } + bool BIsAppInstalled(AppId_t appID) + { + return true; + } + + CSteamID GetAppOwner() + { + return CSteamID(Steam_Config::UserID); + } + + const char* GetLaunchQueryParam(const char* pchKey) + { + return ""; + } + + bool GetDlcDownloadProgress(AppId_t nAppID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + int GetAppBuildId() + { + return Steam_Config::AppBuildId; + } + + void RequestAllProofOfPurchaseKeys() + { + return; + } + + SteamAPICall_t GetFileDetails(const char* pszFileName) + { + return NULL; + } + + int GetLaunchCommandLine(char* pszCommandLine, int cubCommandLine) + { + return NULL; + } + + bool BIsSubscribedFromFamilySharing() + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamBilling001.h b/src/InterfacesEmulation/SteamBilling001.h new file mode 100644 index 0000000..48a4edd --- /dev/null +++ b/src/InterfacesEmulation/SteamBilling001.h @@ -0,0 +1,41 @@ +#pragma once +#include "../public SDK/ISteamBilling001.h" + +class SteamBillingIn001 : public ISteamBilling001 +{ +public: + bool SetBillingAddress(const char* pchName, const char* pchAddress1, const char* pchAddress2, const char* pchCity, const char* pchPostcode, const char* pchState, const char* pchCountry, const char* pchPhone) + { + return false; + } + bool GetBillingAddress(char* pchName, char* pchAddress1, char* pchAddress2, char* pchCity, char* pchPostcode, char* pchState, char* pchCountry, char* pchPhone) + { + return false; + } + bool SetShippingAddress(const char* pchName, const char* pchAddress1, const char* pchAddress2, const char* pchCity, const char* pchPostcode, const char* pchState, const char* pchCountry, const char* pchPhone) + { + return false; + } + bool GetShippingAddress(char* pchName, char* pchAddress1, char* pchAddress2, char* pchCity, char* pchPostcode, char* pchState, char* pchCountry, char* pchPhone) + { + return false; + } + bool GetFinalPrice(int32 nPackageID) + { + return false; + } + + bool SetCardInfo(ECreditCardType eCreditCardType, const char* pchCardNumber, const char* pchCardHolderName, const char* pchCardExpYear, const char* pchCardExpMonth, const char* pchCardCVV2) + { + return false; + } + bool GetCardInfo(ECreditCardType* eCreditCardType, char* pchCardNumber, char* pchCardHolderName, char* pchCardExpYear, char* pchCardExpMonth, char* pchCardCVV2) + { + return false; + } + + bool Purchase(int32 nPackageID, int32 nExpectedCostCents, uint64 gidCardID, bool bStoreCardInfo) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamBilling002.h b/src/InterfacesEmulation/SteamBilling002.h new file mode 100644 index 0000000..ebbad82 --- /dev/null +++ b/src/InterfacesEmulation/SteamBilling002.h @@ -0,0 +1,198 @@ +#pragma once +#include "../public SDK/ISteamBilling002.h" + +class SteamBillingIn002 : public ISteamBilling002 +{ +public: + bool InitCreditCardPurchase(PackageId_t nPackageID, uint32 nCardIndex, bool bStoreCardInfo) + { + return false; + } + bool InitPayPalPurchase(PackageId_t nPackageID) + { + return false; + } + + bool GetActivationCodeInfo(const char* pchActivationCode) + { + return false; + } + bool PurchaseWithActivationCode(const char* pchActivationCode) + { + return false; + } + + bool GetFinalPrice() + { + return false; + } + + bool CancelPurchase() + { + return false; + } + bool CompletePurchase() + { + return false; + } + + bool UpdateCardInfo(uint32 nCardIndex) + { + return false; + } + + bool DeleteCard(uint32) + { + return false; + } + + bool GetCardList() + { + return false; + } + + bool Obsolete_GetLicenses() + { + return false; + } + + bool CancelLicense(PackageId_t nPackageID, int32 nCancelReason) + { + return false; + } + + bool GetPurchaseReceipts(bool bUnacknowledgedOnly) + { + return false; + } + + bool SetBillingAddress(uint32 nCardIndex, const char* pchFirstName, const char* pchLastName, const char* pchAddress1, const char* pchAddress2, const char* pchCity, const char* pchPostcode, const char* pchState, const char* pchCountry, const char* pchPhone) + { + return false; + } + + bool GetBillingAddress(uint32 nCardIndex, char* pchFirstName, char* pchLastName, char* pchAddress1, char* pchAddress2, char* pchCity, char* pchPostcode, char* pchState, char* pchCountry, char* pchPhone) + { + return false; + } + + bool SetShippingAddress(const char* pchFirstName, const char* pchLastName, const char* pchAddress1, const char* pchAddress2, const char* pchCity, const char* pchPostcode, const char* pchState, const char* pchCountry, const char* pchPhone) + { + return false; + } + bool GetShippingAddress(char* pchFirstName, char* pchLastName, char* pchAddress1, char* pchAddress2, char* pchCity, char* pchPostcode, char* pchState, char* pchCountry, char* pchPhone) + { + return false; + } + + bool SetCardInfo(uint32 nCardIndex, ECreditCardType eCreditCardType, const char* pchCardNumber, const char* pchCardHolderFirstName, const char* pchCardHolderLastName, const char* pchCardExpYear, const char* pchCardExpMonth, const char* pchCardCVV2) + { + return false; + } + bool GetCardInfo(uint32 nCardIndex, ECreditCardType* eCreditCardType, char* pchCardNumber, char* pchCardHolderFirstName, char* pchCardHolderLastName, char* pchCardExpYear, char* pchCardExpMonth, char* pchCardCVV2) + { + return false; + } + + PackageId_t GetLicensePackageID(uint32 nLicenseIndex) + { + return NULL; + } + RTime32 GetLicenseTimeCreated(uint32 nLicenseIndex) + { + return k_EPaymentMethodNone; + } + RTime32 GetLicenseTimeNextProcess(uint32 nLicenseIndex) + { + return k_EPaymentMethodNone; + } + int32 GetLicenseMinuteLimit(uint32 nLicenseIndex) + { + return NULL; + } + int32 GetLicenseMinutesUsed(uint32 nLicenseIndex) + { + return NULL; + } + EPaymentMethod GetLicensePaymentMethod(uint32 nLicenseIndex) + { + return k_EPaymentMethodNone; + } + ELicenseFlags GetLicenseFlags(uint32 nLicenseIndex) + { + return k_ELicenseFlagNone; + } + const char* GetLicensePurchaseCountryCode(uint32 nLicenseIndex) + { + return ""; + } + + PackageId_t GetReceiptPackageID(uint32 nReceiptIndex) + { + return NULL; + } + EPurchaseStatus GetReceiptStatus(uint32 nReceiptIndex) + { + return k_EPurchasePending; + } + EPurchaseResultDetail GetReceiptResultDetail(uint32 nReceiptIndex) + { + return k_EPurchaseResultNoDetail; + } + RTime32 GetReceiptTransTime(uint32 nReceiptIndex) + { + return NULL; + } + uint64 GetReceiptTransID(uint32 nReceiptIndex) + { + return NULL; + } + EPaymentMethod GetReceiptPaymentMethod(uint32 nReceiptIndex) + { + return k_EPaymentMethodNone; + } + uint32 GetReceiptBaseCost(uint32 nReceiptIndex) + { + return NULL; + } + uint32 GetReceiptTotalDiscount(uint32 nReceiptIndex) + { + return NULL; + } + uint32 GetReceiptTax(uint32 nReceiptIndex) + { + return NULL; + } + uint32 GetReceiptShipping(uint32 nReceiptIndex) + { + return NULL; + } + const char* GetReceiptCountryCode(uint32 nReceiptIndex) + { + return ""; + } + + uint32 GetNumLicenses() + { + return NULL; + } + uint32 GetNumReceipts() + { + return NULL; + } + + bool PurchaseWithMachineID(PackageId_t nPackageID, const char* pchCustomData) + { + return false; + } + + bool InitClickAndBuyPurchase(PackageId_t nPackageID, int64 nAccountNum, const char* pchState, const char* pchCountryCode) + { + return false; + } + + bool GetPreviousClickAndBuyAccount(int64* pnAccountNum, char* pchState, char* pchCountryCode) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamClient006.h b/src/InterfacesEmulation/SteamClient006.h new file mode 100644 index 0000000..04083a5 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient006.h @@ -0,0 +1,112 @@ +#pragma once +#include "../public SDK/ISteamClient006.h" +#include "../Steam_data.h" +#include "../ColdManager.h" + +class SteamClientIn006 : public ISteamClient006 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser CreateGlobalUser(HSteamPipe* phSteamPipe) + { + return NULL; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe) + { + return NULL; + } + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + OBSOLETE_FUNCTION IVAC* GetIVAC(HSteamUser hSteamUser) + { + return NULL; + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + const char* GetUniverseName(EUniverse eUniverse) + { + return ""; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamBilling* GetISteamBilling(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamBilling*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamContentServer* GetISteamContentServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamContentServer*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamClient007.h b/src/InterfacesEmulation/SteamClient007.h new file mode 100644 index 0000000..1e3ae34 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient007.h @@ -0,0 +1,117 @@ +#pragma once +#include "../public SDK/ISteamClient007.h" +#include "../Steam_data.h" + +class SteamClientIn007 : public ISteamClient007 +{ +public: + HSteamPipe CreateSteamPipe() + { + return 0; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamContentServer* GetISteamContentServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamContentServer*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient008.h b/src/InterfacesEmulation/SteamClient008.h new file mode 100644 index 0000000..47c6551 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient008.h @@ -0,0 +1,112 @@ +#pragma once +#include "../public SDK/ISteamClient008.h" +#include "../Steam_data.h" + +class SteamClientIn008 : public ISteamClient008 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamClient009.h b/src/InterfacesEmulation/SteamClient009.h new file mode 100644 index 0000000..215d34f --- /dev/null +++ b/src/InterfacesEmulation/SteamClient009.h @@ -0,0 +1,118 @@ +#pragma once +#include "../public SDK/ISteamClient009.h" +#include "../Steam_data.h" + + +class SteamClientIn009 : public ISteamClient009 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamClient010.h b/src/InterfacesEmulation/SteamClient010.h new file mode 100644 index 0000000..64ff26c --- /dev/null +++ b/src/InterfacesEmulation/SteamClient010.h @@ -0,0 +1,129 @@ +#pragma once +#include "../public SDK/ISteamClient010.h" +#include "../Steam_data.h" + + +class SteamClientIn010 : public ISteamClient010 +{ +public: + + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient011.h b/src/InterfacesEmulation/SteamClient011.h new file mode 100644 index 0000000..d24cb8a --- /dev/null +++ b/src/InterfacesEmulation/SteamClient011.h @@ -0,0 +1,133 @@ +#pragma once +#include "../public SDK/ISteamClient011.h" +#include "../Steam_data.h" + + +class SteamClientIn011 : public ISteamClient011 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient012.h b/src/InterfacesEmulation/SteamClient012.h new file mode 100644 index 0000000..9974db8 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient012.h @@ -0,0 +1,147 @@ +#pragma once +#include "../public SDK/ISteamClient012.h" +#include "../Steam_data.h" + + +class SteamClientIn012 : public ISteamClient012 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient013.h b/src/InterfacesEmulation/SteamClient013.h new file mode 100644 index 0000000..560fdcb --- /dev/null +++ b/src/InterfacesEmulation/SteamClient013.h @@ -0,0 +1,163 @@ +#pragma once +#include "../public SDK/ISteamClient013.h" +#include "../Steam_data.h" + + +class SteamClientIn013 : public ISteamClient013 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient014.h b/src/InterfacesEmulation/SteamClient014.h new file mode 100644 index 0000000..d3b4511 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient014.h @@ -0,0 +1,168 @@ +#pragma once +#include "../public SDK/ISteamClient014.h" +#include "../Steam_data.h" + + +class SteamClientIn014 : public ISteamClient014 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient015.h b/src/InterfacesEmulation/SteamClient015.h new file mode 100644 index 0000000..3db274e --- /dev/null +++ b/src/InterfacesEmulation/SteamClient015.h @@ -0,0 +1,173 @@ +#pragma once +#include "../public SDK/ISteamClient015.h" +#include "../Steam_data.h" + + +class SteamClientIn015 : public ISteamClient015 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusicRemote*)SteamInternal_CreateInterface(pchVersion); + } +}; diff --git a/src/InterfacesEmulation/SteamClient016.h b/src/InterfacesEmulation/SteamClient016.h new file mode 100644 index 0000000..457b53a --- /dev/null +++ b/src/InterfacesEmulation/SteamClient016.h @@ -0,0 +1,191 @@ +#pragma once +#include "../public SDK/ISteamClient016.h" +#include "../Steam_data.h" + + +class SteamClientIn016 : public ISteamClient016 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMasterServerUpdater* GetISteamMasterServerUpdater(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMasterServerUpdater*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusicRemote*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamHTMLSurface* GetISteamHTMLSurface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTMLSurface*)SteamInternal_CreateInterface(pchVersion); + } + + void Set_SteamAPI_CPostAPIResultInProcess(void(*)(SteamAPICall_t callHandle, void*, uint32 unCallbackSize, int iCallbackNum)) + { + return; + } + void Remove_SteamAPI_CPostAPIResultInProcess(void(*)(SteamAPICall_t callHandle, void*, uint32 unCallbackSize, int iCallbackNum)) + { + return; + } + void Set_SteamAPI_CCheckCallbackRegisteredInProcess(unsigned int(*)(int iCallbackNum)) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamClient017.h b/src/InterfacesEmulation/SteamClient017.h new file mode 100644 index 0000000..8d79a18 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient017.h @@ -0,0 +1,196 @@ +#pragma once +#include "../public SDK/ISteamClient017.h" +#include "../Steam_data.h" + + +class SteamClientIn017 : public ISteamClient017 +{ +public: + HSteamPipe CreateSteamPipe() + { + return 0; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return 0; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return 0; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + // Return interface buffer pointer from our exported interface caller functions. + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils *GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUnifiedMessages* GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUnifiedMessages*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusicRemote*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamHTMLSurface* GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTMLSurface*)SteamInternal_CreateInterface(pchVersion); + } + + // Some functions are not needed to play offline. + + void Set_SteamAPI_CPostAPIResultInProcess(void(*)(SteamAPICall_t callHandle, void*, uint32 unCallbackSize, int iCallbackNum)) + { + return; + } + void Remove_SteamAPI_CPostAPIResultInProcess(void(*)(SteamAPICall_t callHandle, void*, uint32 unCallbackSize, int iCallbackNum)) + { + return; + } + void Set_SteamAPI_CCheckCallbackRegisteredInProcess(unsigned int(*)(int iCallbackNum)) + { + return; + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + void* GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamClient018.h b/src/InterfacesEmulation/SteamClient018.h new file mode 100644 index 0000000..cf4dc8f --- /dev/null +++ b/src/InterfacesEmulation/SteamClient018.h @@ -0,0 +1,206 @@ +#pragma once +#include "../public SDK/ISteamClient018.h" +#include "../Steam_data.h" + +class SteamClientIn018 : public ISteamClient018 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + void* DEPRECATED_GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusicRemote*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamHTMLSurface* GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTMLSurface*)SteamInternal_CreateInterface(pchVersion); + } + + void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess(void (*)()) + { + return; + } + void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess(void (*)()) + { + return; + } + void Set_SteamAPI_CCheckCallbackRegisteredInProcess(SteamAPI_CheckCallbackRegistered_t func) + { + return; + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamClient019.h b/src/InterfacesEmulation/SteamClient019.h new file mode 100644 index 0000000..5af0c20 --- /dev/null +++ b/src/InterfacesEmulation/SteamClient019.h @@ -0,0 +1,211 @@ +#pragma once +#include "../public SDK/ISteamClient019.h" +#include "../Steam_data.h" + +class SteamClientIn019 : public ISteamClient019 +{ +public: + HSteamPipe CreateSteamPipe() + { + return NULL; + } + + bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + return true; + } + + HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + return NULL; + } + + HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) + { + return NULL; + } + + void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + return; + } + + ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUser*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServer*)SteamInternal_CreateInterface(pchVersion); + } + + void SetLocalIPBinding(uint32 unIP, uint16 usPort) + { + return; + } + + ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamFriends*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUtils*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmaking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMatchmakingServers*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUserStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamGameServerStats*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamApps*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamNetworking*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamRemoteStorage*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamScreenshots*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool BShutdownIfAllPipesClosed() + { + return true; + } + + ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTTP*)SteamInternal_CreateInterface(pchVersion); + } + + void* DEPRECATED_GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamController*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamUGC*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamAppList*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusic* GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusic*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamMusicRemote*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamHTMLSurface* GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamHTMLSurface*)SteamInternal_CreateInterface(pchVersion); + } + + void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess(void (*)()) + { + return; + } + void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess(void (*)()) + { + return; + } + void Set_SteamAPI_CCheckCallbackRegisteredInProcess(SteamAPI_CheckCallbackRegistered_t func) + { + return; + } + + ISteamInventory* GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamInventory*)SteamInternal_CreateInterface(pchVersion); + } + + ISteamVideo* GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return (ISteamVideo*)SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + + void* GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) + { + return SteamInternal_CreateInterface(pchVersion); + } + +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamContentServer001.h b/src/InterfacesEmulation/SteamContentServer001.h new file mode 100644 index 0000000..263b52f --- /dev/null +++ b/src/InterfacesEmulation/SteamContentServer001.h @@ -0,0 +1,26 @@ +#pragma once +#include "../public SDK/ISteamContentServer001.h" +#include "../Bridge.h" + +class SteamContentServerIn001 : public ISteamContentServer001 +{ +public: + bool LogOn(uint32 uContentServerID) + { + return true; + } + bool LogOff() + { + return true; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + void SendClientContentAuthRequest(CSteamID steamID, uint32 unContentID) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamContentServer002.h b/src/InterfacesEmulation/SteamContentServer002.h new file mode 100644 index 0000000..2f44ab3 --- /dev/null +++ b/src/InterfacesEmulation/SteamContentServer002.h @@ -0,0 +1,32 @@ +#pragma once +#include "../public SDK/ISteamContentServer002.h" +#include "../Bridge.h" + + +class SteamContentServerIn002 : public ISteamContentServer002 +{ +public: + bool LogOn(uint32 uContentServerID) + { + return true; + } + bool LogOff() + { + return true; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + void SendClientContentAuthRequest(CSteamID steamID, uint32 uContentID, uint64 ulSessionToken, bool bTokenPresent) + { + return; + } + + bool BCheckTicket(CSteamID steamID, uint32 uContentID, const void* pvTicketData, uint32 cubTicketLength) + { + return true; + } +}; diff --git a/src/InterfacesEmulation/SteamController001.h b/src/InterfacesEmulation/SteamController001.h new file mode 100644 index 0000000..f8a71ce --- /dev/null +++ b/src/InterfacesEmulation/SteamController001.h @@ -0,0 +1,35 @@ +#pragma once +#include "../public SDK/ISteamController001.h" + +class SteamControllerIn001 : public ISteamController001 +{ +public: + bool Init(const char* pchAbsolutePathToControllerConfigVDF) + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + bool GetControllerState(uint32 unControllerIndex, SteamControllerState_t* pState) + { + return false; + } + + void TriggerHapticPulse(uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void SetOverrideMode(const char* pchMode) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamController002.h b/src/InterfacesEmulation/SteamController002.h new file mode 100644 index 0000000..9138eb8 --- /dev/null +++ b/src/InterfacesEmulation/SteamController002.h @@ -0,0 +1,47 @@ +#pragma once +#include "../public SDK/ISteamController002.h" + +class SteamControllerIn002 : public ISteamController002 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(uint64*) + { + return NULL; + } + + void TriggerHapticPulse(uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + unknown_ret ActivateMode(uint64, int32) + { + return NULL; + } + int32 GetJoystickForHandle(uint64) + { + return NULL; + } + uint64 GetHandleForJoystick(int32) + { + return NULL; + } + unknown_ret GetModeAnalogOutputData(uint64, int32) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamController003.h b/src/InterfacesEmulation/SteamController003.h new file mode 100644 index 0000000..47c42bb --- /dev/null +++ b/src/InterfacesEmulation/SteamController003.h @@ -0,0 +1,94 @@ +#pragma once +#include "../public SDK/ISteamController003.h" + +class SteamControllerIn003 : public ISteamController003 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(ControllerHandle_t* handlesOut) + { + return NULL; + } + + bool ShowBindingPanel(ControllerHandle_t controllerHandle) + { + return false; + } + + ControllerActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) + { + return; + } + ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) + { + return NULL; + } + + ControllerDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerDigitalActionData003_t GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) + { + ControllerDigitalActionData003_t contr; + contr.bActive = false; + contr.bState = false; + return contr; + } + + int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + ControllerAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerAnalogActionData003_t GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) + { + ControllerAnalogActionData003_t control; + control.bActive = false; + control.eMode = k_EControllerSourceMode_None; + control.x = 0; + control.y = 0; + return control; + } + + int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + + + void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) + { + return; + } + + void TriggerHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamController004.h b/src/InterfacesEmulation/SteamController004.h new file mode 100644 index 0000000..7eae135 --- /dev/null +++ b/src/InterfacesEmulation/SteamController004.h @@ -0,0 +1,123 @@ +#pragma once +#include "../public SDK/ISteamController004.h" + +class SteamControllerIn004 : public ISteamController004 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(ControllerHandle_t* handlesOut) + { + return NULL; + } + + bool ShowBindingPanel(ControllerHandle_t controllerHandle) + { + return false; + } + + ControllerActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) + { + return; + } + ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) + { + return NULL; + } + + ControllerDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerDigitalActionData_t GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) + { + ControllerDigitalActionData_t dt; + dt.bActive = false; + dt.bState = false; + return dt; + } + + int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + ControllerAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerAnalogActionData_t GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) + { + ControllerAnalogActionData_t ct; + ct.bActive = false; + ct.eMode = k_EControllerSourceMode_None; + ct.x = 0; + ct.y = 0; + return ct; + } + + int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) + { + return; + } + + void TriggerHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void TriggerRepeatedHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) + { + return; + } + + int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) + { + return NULL; + } + + ControllerHandle_t GetControllerForGamepadIndex(int nIndex) + { + return NULL; + } + + ControllerMotionData_t GetMotionData(ControllerHandle_t controllerHandle) + { + ControllerMotionData_t ctd; + ctd = { 0 }; + return ctd; + } + + bool ShowDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } + bool ShowAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamController005.h b/src/InterfacesEmulation/SteamController005.h new file mode 100644 index 0000000..0dc99ea --- /dev/null +++ b/src/InterfacesEmulation/SteamController005.h @@ -0,0 +1,143 @@ +#pragma once +#include "../public SDK/ISteamController005.h" + +class SteamControllerIn005 : public ISteamController005 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(ControllerHandle_t* handlesOut) + { + return NULL; + } + + bool ShowBindingPanel(ControllerHandle_t controllerHandle) + { + return false; + } + + ControllerActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) + { + return; + } + ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) + { + return NULL; + } + + ControllerDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerDigitalActionData_t GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) + { + ControllerDigitalActionData_t dt; + dt.bActive = false; + dt.bState = false; + return dt; + } + + int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + ControllerAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerAnalogActionData_t GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) + { + ControllerAnalogActionData_t ct; + ct.bActive = false; + ct.eMode = k_EControllerSourceMode_None; + ct.x = 0; + ct.y = 0; + return ct; + } + + int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) + { + return; + } + + void TriggerHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void TriggerRepeatedHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) + { + return; + } + + void TriggerVibration(ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed) + { + return; + } + + void SetLEDColor(ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags) + { + return; + } + + int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) + { + return NULL; + } + + ControllerHandle_t GetControllerForGamepadIndex(int nIndex) + { + return NULL; + } + + ControllerMotionData_t GetMotionData(ControllerHandle_t controllerHandle) + { + ControllerMotionData_t ctd; + ctd = { 0 }; + return ctd; + } + + bool ShowDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } + bool ShowAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } + + const char* GetStringForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } + + const char* GetGlyphForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamController006.h b/src/InterfacesEmulation/SteamController006.h new file mode 100644 index 0000000..32f2594 --- /dev/null +++ b/src/InterfacesEmulation/SteamController006.h @@ -0,0 +1,166 @@ +#pragma once +#include "../public SDK/ISteamController006.h" + +class SteamControllerIn006 : public ISteamController006 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(ControllerHandle_t* handlesOut) + { + return NULL; + } + + bool ShowBindingPanel(ControllerHandle_t controllerHandle) + { + return false; + } + + ControllerActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) + { + return; + } + ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) + { + return NULL; + } + + void ActivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateAllActionSetLayers(ControllerHandle_t controllerHandle) + { + return; + } + int GetActiveActionSetLayers(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t* handlesOut) + { + return NULL; + } + + + ControllerDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerDigitalActionData_t GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) + { + ControllerDigitalActionData_t dt; + dt.bActive = false; + dt.bState = false; + return dt; + } + + int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + ControllerAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerAnalogActionData_t GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) + { + ControllerAnalogActionData_t ct; + ct.bActive = false; + ct.eMode = k_EControllerSourceMode_None; + ct.x = 0; + ct.y = 0; + return ct; + } + + int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) + { + return; + } + + void TriggerHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void TriggerRepeatedHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) + { + return; + } + + void TriggerVibration(ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed) + { + return; + } + + void SetLEDColor(ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags) + { + return; + } + + int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) + { + return NULL; + } + + ControllerHandle_t GetControllerForGamepadIndex(int nIndex) + { + return NULL; + } + + ControllerMotionData_t GetMotionData(ControllerHandle_t controllerHandle) + { + ControllerMotionData_t ctd; + ctd = { 0 }; + return ctd; + } + + bool ShowDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } + bool ShowAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition) + { + return false; + } + + const char* GetStringForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } + + const char* GetGlyphForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } + + ESteamInputType GetInputTypeForHandle(ControllerHandle_t controllerHandle) + { + return k_ESteamInputType_Unknown; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamController007.h b/src/InterfacesEmulation/SteamController007.h new file mode 100644 index 0000000..7ea41ed --- /dev/null +++ b/src/InterfacesEmulation/SteamController007.h @@ -0,0 +1,176 @@ +#pragma once +#include "../public SDK/ISteamController007.h" + +class SteamControllerIn007 : public ISteamController007 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(ControllerHandle_t* handlesOut) + { + return NULL; + } + + ControllerActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) + { + return; + } + ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) + { + return NULL; + } + + void ActivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateAllActionSetLayers(ControllerHandle_t controllerHandle) + { + return; + } + int GetActiveActionSetLayers(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t* handlesOut) + { + return NULL; + } + + ControllerDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerDigitalActionData_t GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) + { + ControllerDigitalActionData_t dt; + dt.bActive = false; + dt.bState = false; + return dt; + } + + int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + ControllerAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + ControllerAnalogActionData_t GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) + { + ControllerAnalogActionData_t ct; + ct.bActive = false; + ct.eMode = k_EControllerSourceMode_None; + ct.x = 0; + ct.y = 0; + return ct; + } + + int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin* originsOut) + { + return NULL; + } + + const char* GetGlyphForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } + + const char* GetStringForActionOrigin(EControllerActionOrigin eOrigin) + { + return ""; + } + + void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) + { + return; + } + + ControllerMotionData_t GetMotionData(ControllerHandle_t controllerHandle) + { + ControllerMotionData_t ctd; + ctd = { 0 }; + return ctd; + } + + void TriggerHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void TriggerRepeatedHapticPulse(ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) + { + return; + } + + void TriggerVibration(ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed) + { + return; + } + + void SetLEDColor(ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags) + { + return; + } + + bool ShowBindingPanel(ControllerHandle_t controllerHandle) + { + return false; + } + + ESteamInputType GetInputTypeForHandle(ControllerHandle_t controllerHandle) + { + return k_ESteamInputType_Unknown; + } + + ControllerHandle_t GetControllerForGamepadIndex(int nIndex) + { + return NULL; + } + + int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) + { + return NULL; + } + + const char* GetStringForXboxOrigin(EXboxOrigin eOrigin) + { + return ""; + } + + const char* GetGlyphForXboxOrigin(EXboxOrigin eOrigin) + { + return ""; + } + + EControllerActionOrigin GetActionOriginFromXboxOrigin(ControllerHandle_t controllerHandle, EXboxOrigin eOrigin) + { + return k_EControllerActionOrigin_None; + } + + EControllerActionOrigin TranslateActionOrigin(ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin) + { + return k_EControllerActionOrigin_None; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamFriends001.h b/src/InterfacesEmulation/SteamFriends001.h new file mode 100644 index 0000000..a1f6484 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends001.h @@ -0,0 +1,133 @@ +#pragma once +#include "../public SDK/ISteamFriends001.h" +#include "../Bridge.h" + +class SteamFriendsIn001 : public ISteamFriends001 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + void SetPersonaState(EPersonaState ePersonaState) + { + return; + } + + bool AddFriend(CSteamID steamIDFriend) + { + return true; + } + bool RemoveFriend(CSteamID steamIDFriend) + { + return true; + } + bool HasFriend(CSteamID steamIDFriend) + { + return false; + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + bool Deprecated_GetFriendGamePlayed(CSteamID steamIDFriend, int32* pnGameID, uint32* punGameIP, uint16* pusGamePort) + { + return false; + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + HSteamCall AddFriendByName(const char* pchEmailOrAccountName) + { + return NULL; + } + + int GetFriendCount() + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + void SendMsgToFriend(CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const char* pchMsgBody) + { + return; + } + + void SetFriendRegValue(CSteamID steamIDFriend, const char* pchKey, const char* pchValue) + { + return; + } + const char* GetFriendRegValue(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + int GetChatMessage(CSteamID steamIDFriend, int iChatID, void* pvData, int cubData, EChatEntryType* peFriendMsgType) + { + return NULL; + } + + bool SendMsgToFriend(CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + + OBSOLETE_FUNCTION int GetChatIDOfChatHistoryStart(CSteamID steamIDFriend) + { + return NULL; + } + OBSOLETE_FUNCTION void SetChatHistoryStart(CSteamID steamIDFriend, int iChatID) + { + return; + } + void ClearChatHistory(CSteamID steamIDFriend) + { + return; + } + + HSteamCall InviteFriendByEmail(const char* pchEmailOrAccountName) + { + return NULL; + } + + uint32 GetBlockedFriendCount() + { + return NULL; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, uint64* pulGameID, uint32* punGameIP, uint16* pusGamePort) + { + return false; + } + bool GetFriendGamePlayed2(CSteamID steamDIFriend, uint64* pulGameID, uint32* punGameIP, uint16* pusGamePort, uint16* pusQueryPort) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends002.h b/src/InterfacesEmulation/SteamFriends002.h new file mode 100644 index 0000000..25dbf9e --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends002.h @@ -0,0 +1,145 @@ +#pragma once +#include "../public SDK/ISteamFriends002.h" +#include "../Bridge.h" + +class SteamFriendsIn002 : public ISteamFriends002 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + void SetPersonaState(EPersonaState ePersonaState) + { + return; + } + + int GetFriendCount(EFriendFlags iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, EFriendFlags iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + void SetFriendRegValue(CSteamID steamIDFriend, const char* pchKey, const char* pchValue) + { + return; + } + const char* GetFriendRegValue(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, uint64* pulGameID, uint32* punGameIP, uint16* pusGamePort, uint16* pusQueryPort) + { + return false; + } + + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool AddFriend(CSteamID steamIDFriend) + { + return true; + } + bool RemoveFriend(CSteamID steamIDFriend) + { + return true; + } + + bool HasFriend(CSteamID steamIDFriend, EFriendFlags iFriendFlags) + { + return false; + } + + HSteamCall AddFriendByName(const char* pchEmailOrAccountName) + { + return NULL; + } + + bool InviteFriendByEmail(const char* emailAddr) + { + return false; + } + + int GetChatMessage(CSteamID steamIDFriend, int iChatID, void* pvData, int cubData, EChatEntryType* peFriendMsgType) + { + return NULL; + } + + bool SendMsgToFriend(CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + + OBSOLETE_FUNCTION int GetChatIDOfChatHistoryStart(CSteamID steamIDFriend) + { + return NULL; + } + OBSOLETE_FUNCTION void SetChatHistoryStart(CSteamID steamIDFriend, int iChatID) + { + return; + } + void ClearChatHistory(CSteamID steamIDFriend) + { + return; + } + + int GetClanCount() + { + return 0; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + + bool InviteFriendToClan(CSteamID steamIDfriend, CSteamID steamIDclan) + { + return false; + } + bool AcknowledgeInviteToClan(CSteamID steamID, bool) + { + return false; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } +}; diff --git a/src/InterfacesEmulation/SteamFriends003.h b/src/InterfacesEmulation/SteamFriends003.h new file mode 100644 index 0000000..91f3f63 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends003.h @@ -0,0 +1,102 @@ +#pragma once +#include "../public SDK/ISteamFriends003.h" +#include "../Bridge.h" + +class SteamFriendsIn003 : public ISteamFriends003 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + void SetPersonaState(EPersonaState ePersonaState) + { + return; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + int GetFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + bool GetFriendGamePlayed(CSteamID steamIDFriend, uint64* pulGameID, uint32* punGameIP, uint16* pusGamePort, uint16* pusQueryPort) + { + return false; + } + + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends004.h b/src/InterfacesEmulation/SteamFriends004.h new file mode 100644 index 0000000..3698790 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends004.h @@ -0,0 +1,106 @@ +#pragma once +#include "../public SDK/ISteamFriends004.h" +#include "../Bridge.h" + +class SteamFriendsIn004 : public ISteamFriends004 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + void SetPersonaState(EPersonaState ePersonaState) + { + return; + } + + int GetFriendCount(int eFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + int GetFriendAvatar(CSteamID steamIDFriend, int eAvatarSize) + { + return NULL; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, uint64* pulGameID, uint32* punGameIP, uint16* pusGamePort, uint16* pusQueryPort) + { + return false; + } + + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int eFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends005.h b/src/InterfacesEmulation/SteamFriends005.h new file mode 100644 index 0000000..34c3402 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends005.h @@ -0,0 +1,124 @@ +#pragma once +#include "../public SDK/ISteamFriends005.h" +#include "../Bridge.h" + +class SteamFriendsIn005 : public ISteamFriends005 +{ +public: + + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int eFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + int GetFriendAvatar(CSteamID steamIDFriend, int eAvatarSize) + { + return NULL; + } + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int eFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends006.h b/src/InterfacesEmulation/SteamFriends006.h new file mode 100644 index 0000000..47bba9d --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends006.h @@ -0,0 +1,132 @@ +#pragma once +#include "../public SDK/ISteamFriends006.h" +#include "../Bridge.h" + +class SteamFriendsIn006 : public ISteamFriends006 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int eFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + int GetFriendAvatar(CSteamID steamIDFriend, int eAvatarSize) + { + return NULL; + } + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int eFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamFriends007.h b/src/InterfacesEmulation/SteamFriends007.h new file mode 100644 index 0000000..627bdd7 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends007.h @@ -0,0 +1,141 @@ +#pragma once +#include "../public SDK/ISteamFriends007.h" +#include "../Bridge.h" + +class SteamFriendsIn007 : public ISteamFriends007 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int eFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int eFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends008.h b/src/InterfacesEmulation/SteamFriends008.h new file mode 100644 index 0000000..4859186 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends008.h @@ -0,0 +1,171 @@ +#pragma once +#include "../public SDK/ISteamFriends008.h" +#include "../Bridge.h" + +class SteamFriendsIn008 : public ISteamFriends008 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int eFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int eFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } +}; diff --git a/src/InterfacesEmulation/SteamFriends009.h b/src/InterfacesEmulation/SteamFriends009.h new file mode 100644 index 0000000..ffb328c --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends009.h @@ -0,0 +1,214 @@ +#pragma once +#include "../public SDK/ISteamFriends009.h" +#include "../Bridge.h" + +class SteamFriendsIn009 : public ISteamFriends009 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return 0; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamFriends010.h b/src/InterfacesEmulation/SteamFriends010.h new file mode 100644 index 0000000..f8b632f --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends010.h @@ -0,0 +1,274 @@ +#pragma once +#include "../public SDK/ISteamFriends010.h" +#include "../Bridge.h" + +class SteamFriendsIn010 : public ISteamFriends010 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EUserRestriction GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + SteamAPICall_t JoinClanChatRoom(CSteamID groupID) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID groupID) + { + return false; + } + int GetClanChatMemberCount(CSteamID groupID) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID groupID, int iIndex) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID groupID, const char* cszMessage) + { + return false; + } + int GetClanChatMessage(CSteamID groupID, int iChatID, void* pvData, int cubData, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID groupID, CSteamID userID) + { + return false; + } + bool IsClanChatWindowOpenInSteam(CSteamID groupID) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID groupID) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID groupID) + { + return false; + } + bool SetListenForFriendsMessages(bool bListen) + { + return false; + } + bool ReplyToFriendMessage(CSteamID friendID, const char* cszMessage) + { + return false; + } + int GetFriendMessage(CSteamID friendID, int iChatID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends011.h b/src/InterfacesEmulation/SteamFriends011.h new file mode 100644 index 0000000..d87fff3 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends011.h @@ -0,0 +1,293 @@ +#pragma once +#include "../public SDK/ISteamFriends011.h" +#include "../Bridge.h" + +class SteamFriendsIn011 : public ISteamFriends011 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + void SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends012.h b/src/InterfacesEmulation/SteamFriends012.h new file mode 100644 index 0000000..a5d767d --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends012.h @@ -0,0 +1,294 @@ +#pragma once +#include "../public SDK/ISteamFriends012.h" +#include "../Bridge.h" + +class SteamFriendsIn012 : public ISteamFriends012 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EUserRestriction GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return false; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends013.h b/src/InterfacesEmulation/SteamFriends013.h new file mode 100644 index 0000000..93a6b75 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends013.h @@ -0,0 +1,293 @@ +#pragma once +#include "../public SDK/ISteamFriends013.h" +#include "../Bridge.h" + +class SteamFriendsIn013 : public ISteamFriends013 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamIDFriend, FriendGameInfo_t* pFriendGameInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + + void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + return; + } + + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends014.h b/src/InterfacesEmulation/SteamFriends014.h new file mode 100644 index 0000000..a44007c --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends014.h @@ -0,0 +1,269 @@ +#pragma once +#include "../public SDK/ISteamFriends014.h" +#include "../Bridge.h" + +class SteamFriendsIn014 : public ISteamFriends014 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + + bool GetFriendGamePlayed(CSteamID steamID, FriendGameInfo_t* pGamePlayInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + const char* GetPlayerNickname(CSteamID steamIDPlayer) + { + return ""; + } + + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + return; + } + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamFriends015.h b/src/InterfacesEmulation/SteamFriends015.h new file mode 100644 index 0000000..38295d4 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends015.h @@ -0,0 +1,291 @@ +#pragma once +#include "../public SDK/ISteamFriends015.h" +#include "../Bridge.h" + +class SteamFriendsIn015 : public ISteamFriends015 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + bool GetFriendGamePlayed(CSteamID steamID, FriendGameInfo_t* pGamePlayInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + int GetFriendSteamLevel(CSteamID steamIDFriend) + { + return 10; // <--- We like 10 :D + } + const char* GetPlayerNickname(CSteamID steamIDPlayer) + { + return ""; + } + int GetFriendsGroupCount() + { + return NULL; + } + int16 GetFriendsGroupIDByIndex(int32) + { + return NULL; + } + const char* GetFriendsGroupName(int16) + { + return ""; + } + unknown_ret GetFriendsGroupMembersCount(int16) + { + return NULL; + } + void GetFriendsGroupMembersList(FriendsGroupID_t friendsGroupID, CSteamID* pOutSteamIDMembers, int nMembersCount) + { + nMembersCount = NULL; + return; + } + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + return; + } + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } +}; + diff --git a/src/InterfacesEmulation/SteamFriends016.h b/src/InterfacesEmulation/SteamFriends016.h new file mode 100644 index 0000000..2ca65f8 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends016.h @@ -0,0 +1,304 @@ +#pragma once +#include "../public SDK/ISteamFriends016.h" +#include "../Bridge.h" + +class SteamFriendsIn016 : public ISteamFriends016 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + bool GetFriendGamePlayed(CSteamID steamID, FriendGameInfo_t* pGamePlayInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + int GetFriendSteamLevel(CSteamID steamIDFriend) + { + return 10; // <--- We like 10 :D + } + const char* GetPlayerNickname(CSteamID steamIDPlayer) + { + return ""; + } + int GetFriendsGroupCount() + { + return NULL; + } + int16 GetFriendsGroupIDByIndex(int32) + { + return NULL; + } + const char* GetFriendsGroupName(int16) + { + return ""; + } + unknown_ret GetFriendsGroupMembersCount(int16) + { + return NULL; + } + void GetFriendsGroupMembersList(FriendsGroupID_t friendsGroupID, CSteamID* pOutSteamIDMembers, int nMembersCount) + { + nMembersCount = NULL; + return; + } + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + void ActivateGameOverlayToWebPage(const char* pchURL) + { + return; + } + void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + return; + } + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } + + bool IsClanPublic(CSteamID steamIDClan) + { + return false; + } + bool IsClanOfficialGameGroup(CSteamID steamIDClan) + { + return false; + } + + int GetNumChatsWithUnreadPriorityMessages() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamFriends017.h b/src/InterfacesEmulation/SteamFriends017.h new file mode 100644 index 0000000..aef7a65 --- /dev/null +++ b/src/InterfacesEmulation/SteamFriends017.h @@ -0,0 +1,304 @@ +#pragma once +#include "../public SDK/ISteamFriends017.h" +#include "../Bridge.h" + +class SteamFriendsIn017 : public ISteamFriends017 +{ +public: + const char* GetPersonaName() + { + return Steam_Config::Username; + } + SteamAPICall_t SetPersonaName(const char* pchPersonaName) + { + strcpy(Steam_Config::Username, pchPersonaName); + return NULL; + } + EPersonaState GetPersonaState() + { + return k_EPersonaStateOffline; + } + int GetFriendCount(int iFriendFlags) + { + return NULL; + } + CSteamID GetFriendByIndex(int iFriend, int iFriendFlags) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + return k_EFriendRelationshipNone; + } + EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + return k_EPersonaStateOffline; // Offline is cool :D + } + const char* GetFriendPersonaName(CSteamID steamIDFriend) + { + return ""; + } + bool GetFriendGamePlayed(CSteamID steamID, FriendGameInfo_t* pGamePlayInfo) + { + return false; + } + const char* GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + return ""; + } + int GetFriendSteamLevel(CSteamID steamIDFriend) + { + return 10; // <--- We like 10 :D + } + const char* GetPlayerNickname(CSteamID steamIDPlayer) + { + return ""; + } + int GetFriendsGroupCount() + { + return NULL; + } + int16 GetFriendsGroupIDByIndex(int32) + { + return NULL; + } + const char* GetFriendsGroupName(int16) + { + return ""; + } + unknown_ret GetFriendsGroupMembersCount(int16) + { + return NULL; + } + void GetFriendsGroupMembersList(FriendsGroupID_t friendsGroupID, CSteamID* pOutSteamIDMembers, int nMembersCount) + { + nMembersCount = NULL; + return; + } + bool HasFriend(CSteamID steamIDFriend, int iFriendFlags) + { + return false; + } + int GetClanCount() + { + return NULL; + } + CSteamID GetClanByIndex(int iClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + const char* GetClanName(CSteamID steamIDClan) + { + return ""; + } + const char* GetClanTag(CSteamID steamIDClan) + { + return ""; + } + bool GetClanActivityCounts(CSteamID steamID, int* pnOnline, int* pnInGame, int* pnChatting) + { + return false; + } + SteamAPICall_t DownloadClanActivityCounts(CSteamID groupIDs[], int nIds) + { + return NULL; + } + int GetFriendCountFromSource(CSteamID steamIDSource) + { + return NULL; + } + CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + return false; + } + void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + return; + } + void ActivateGameOverlay(const char* pchDialog) + { + return; + } + void ActivateGameOverlayToUser(const char* pchDialog, CSteamID steamID) + { + return; + } + void ActivateGameOverlayToWebPage(const char* pchURL, int eMode = 0) + { + return; + } + void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + return; + } + void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + return; + } + void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + return; + } + int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + return NULL; + } + bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + return false; + } + SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOwner(CSteamID steamIDClan) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetClanOfficerCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + uint32 GetUserRestrictions() + { + return k_nUserRestrictionNone; // <----- We don't wanna this nah? :D + } + bool SetRichPresence(const char* pchKey, const char* pchValue) + { + return true; + } + void ClearRichPresence() + { + return; + } + const char* GetFriendRichPresence(CSteamID steamIDFriend, const char* pchKey) + { + return ""; + } + int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + return NULL; + } + const char* GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + return ""; + } + void RequestFriendRichPresence(CSteamID steamIDFriend) + { + return; + } + bool InviteUserToGame(CSteamID steamIDFriend, const char* pchConnectString) + { + return false; + } + int GetCoplayFriendCount() + { + return NULL; + } + CSteamID GetCoplayFriend(int iCoplayFriend) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + int GetFriendCoplayTime(CSteamID steamIDFriend) + { + return NULL; + } + AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + return NULL; + } + SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + return NULL; + } + bool LeaveClanChatRoom(CSteamID steamIDClan) + { + return false; + } + int GetClanChatMemberCount(CSteamID steamIDClan) + { + return NULL; + } + CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + return CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeIndividual); + } + bool SendClanChatMessage(CSteamID steamIDClanChat, const char* pchText) + { + return false; + } + int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, EChatEntryType* peChatEntryType, CSteamID* pSteamIDChatter) + { + return NULL; + } + bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + return false; + } + bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + return false; + } + bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + return false; + } + bool ReplyToFriendMessage(CSteamID steamIDFriend, const char* pchMsgToSend) + { + return false; + } + int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t IsFollowing(CSteamID steamID) + { + return NULL; + } + SteamAPICall_t EnumerateFollowingList(uint32 unStartIndex) + { + return NULL; + } + + bool IsClanPublic(CSteamID steamIDClan) + { + return false; + } + bool IsClanOfficialGameGroup(CSteamID steamIDClan) + { + return false; + } + + int GetNumChatsWithUnreadPriorityMessages() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamGameCoordinator001.h b/src/InterfacesEmulation/SteamGameCoordinator001.h new file mode 100644 index 0000000..c195bb8 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameCoordinator001.h @@ -0,0 +1,24 @@ +#pragma once +#include "../public SDK/ISteamGameCoordinator001.h" +#include "../Bridge.h" + +class SteamGameCoordinatorIn001 : public ISteamGameCoordinator001 +{ +public: + + EGCResults SendMessage(uint32 unMsgType, const void* pubData, uint32 cubData) + { + return k_EGCResultOK; + } + + bool IsMessageAvailable(uint32* pcubMsgSize) + { + return true; + } + + EGCResults RetrieveMessage(uint32* punMsgType, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return k_EGCResultOK; + } + +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamGameSearch001.h b/src/InterfacesEmulation/SteamGameSearch001.h new file mode 100644 index 0000000..862925a --- /dev/null +++ b/src/InterfacesEmulation/SteamGameSearch001.h @@ -0,0 +1,75 @@ +#pragma once +#include "../public SDK/ISteamGameSearch001.h" + +class SteamGameSearchIn001 : public ISteamGameSearch001 +{ +public: + int32_t AddGameSearchParams(const char* pchKeyToFind, const char* pchValuesToFind) + { + return 7; + } + + int32_t SearchForGameWithLobby(CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax) + { + return 7; + } + + int32_t SearchForGameSolo(int nPlayerMin, int nPlayerMax) + { + return 7; + } + + int32_t AcceptGame() + { + return 7; + } + int32_t DeclineGame() + { + return 7; + } + + int32_t RetrieveConnectionDetails(CSteamID steamIDHost, char* pchConnectionDetails, int cubConnectionDetails) + { + return 7; + } + + int32_t EndGameSearch() + { + return 7; + } + + int32_t SetGameHostParams(const char* pchKey, const char* pchValue) + { + return 7; + } + + int32_t SetConnectionDetails(const char* pchConnectionDetails, int cubConnectionDetails) + { + return 7; + } + + int32_t RequestPlayersForGame(int nPlayerMin, int nPlayerMax, int nMaxTeamSize) + { + return 7; + } + + int32_t HostConfirmGameStart(uint64 ullUniqueGameID) + { + return 7; + } + + int32_t CancelRequestPlayersForGame() + { + return 7; + } + + int32_t SubmitPlayerResult(uint64 ullUniqueGameID, CSteamID steamIDPlayer, int32_t EPlayerResult) + { + return 7; + } + + int32_t EndGame(uint64 ullUniqueGameID) + { + return 7; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamGameServer002.h b/src/InterfacesEmulation/SteamGameServer002.h new file mode 100644 index 0000000..d1b6585 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer002.h @@ -0,0 +1,123 @@ +#pragma once +#include "../public SDK/ISteamGameServer002.h" +#include "../Bridge.h" + + +class SteamGameServerIn002 : public ISteamGameServer002 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + void SetSpawnCount(uint32 ucSpawn) + { + return; + } + + bool GetSteam2GetEncryptionKeyToSendToNewClient(void* pvEncryptionKey, uint32* pcbEncryptionKey, uint32 cbMaxEncryptionKey) + { + return false; + } + + bool SendSteam2UserConnect(uint32 unUserID, const void* pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void* pvCookie, uint32 cubCookie) + { + return false; + } + + bool SendSteam3UserConnect(CSteamID steamID, uint32 unIPPublic, const void* pvCookie, uint32 cubCookie) + { + return false; + } + + bool RemoveUserConnect(uint32 unUserID) + { + return false; + } + + bool SendUserDisconnect(CSteamID steamID, uint32 unUserID) + { + return false; + } + + bool SendUserStatusResponse(CSteamID steamID, int nSecondsConnected, int nSecondsSinceLast) + { + return false; + } + + bool Obsolete_GSSetStatus(int32 nAppIdServed, uint32 unServerFlags, int cPlayers, int cPlayersMax, int cBotPlayers, int unGamePort, const char* pchServerName, const char* pchGameDir, const char* pchMapName, const char* pchVersion) + { + return false; + } + + bool UpdateStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pchMapName) + { + return false; + } + + bool BSecure() + { + return true; // <----- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SetServerType(int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint32 unGamePort, const char* pchGameDir, const char* pchVersion) + { + return false; + } + + bool SetServerType2(int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 usSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + bool UpdateStatus2(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return false; + } + + bool CreateUnauthenticatedUser(CSteamID* pSteamID) + { + return false; + } + + bool SetUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return true; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer003.h b/src/InterfacesEmulation/SteamGameServer003.h new file mode 100644 index 0000000..eadf231 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer003.h @@ -0,0 +1,103 @@ +#pragma once +#include "../public SDK/ISteamGameServer003.h" +#include "../Bridge.h" + + +class SteamGameServerIn003 : public ISteamGameServer003 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool GetSteam2GetEncryptionKeyToSendToNewClient(void* pvEncryptionKey, uint32* pcbEncryptionKey, uint32 cbMaxEncryptionKey) + { + return false; + } + + bool SendUserConnect(uint32, uint32, uint16, const void*, uint32) + { + return false; + } + + bool RemoveUserConnect(uint32 unUserID) + { + return false; + } + + bool SendUserDisconnect(CSteamID steamID, uint32 unUserID) + { + return false; + } + + void SetSpawnCount(uint32 ucSpawn) + { + return; + } + + bool SetServerType(int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 usSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + bool UpdateStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return false; + } + + bool CreateUnauthenticatedUser(CSteamID* pSteamID) + { + return false; + } + + bool SetUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return true; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool GetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer004.h b/src/InterfacesEmulation/SteamGameServer004.h new file mode 100644 index 0000000..e1d9abd --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer004.h @@ -0,0 +1,89 @@ +#pragma once +#include "../public SDK/ISteamGameServer004.h" +#include "../Bridge.h" + + +class SteamGameServerIn004 : public ISteamGameServer004 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserConnectAndAuthenticate(CSteamID steamIDUser, uint32, void*, uint32) + { + return; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 usSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, + const char* pchServerName, const char* pSpectatorServerName, + const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer005.h b/src/InterfacesEmulation/SteamGameServer005.h new file mode 100644 index 0000000..d77dd53 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer005.h @@ -0,0 +1,93 @@ +#pragma once +#include "../public SDK/ISteamGameServer005.h" +#include "../Bridge.h" + + +class SteamGameServerIn005 : public ISteamGameServer005 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } + + void GetGameplayStats() + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer006.h b/src/InterfacesEmulation/SteamGameServer006.h new file mode 100644 index 0000000..6fdfb5d --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer006.h @@ -0,0 +1,93 @@ +#pragma once +#include "../public SDK/ISteamGameServer006.h" +#include "../Bridge.h" + + +class SteamGameServerIn006 : public ISteamGameServer006 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } + + void GetGameplayStats() + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer007.h b/src/InterfacesEmulation/SteamGameServer007.h new file mode 100644 index 0000000..74c78ef --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer007.h @@ -0,0 +1,98 @@ +#pragma once +#include "../public SDK/ISteamGameServer007.h" +#include "../Bridge.h" + + +class SteamGameServerIn007 : public ISteamGameServer007 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } + + void GetGameplayStats() + { + return; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer008.h b/src/InterfacesEmulation/SteamGameServer008.h new file mode 100644 index 0000000..ac29133 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer008.h @@ -0,0 +1,103 @@ +#pragma once +#include "../public SDK/ISteamGameServer008.h" +#include "../Bridge.h" + + +class SteamGameServerIn008 : public ISteamGameServer008 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } + + void GetGameplayStats() + { + return; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } + + uint32 GetPublicIP() + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer009.h b/src/InterfacesEmulation/SteamGameServer009.h new file mode 100644 index 0000000..67b11f1 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer009.h @@ -0,0 +1,113 @@ +#pragma once +#include "../public SDK/ISteamGameServer009.h" +#include "../Bridge.h" + + +class SteamGameServerIn009 : public ISteamGameServer009 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName, const char* pSpectatorServerName, const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameType(const char* pchGameType) + { + return; + } + + bool BGetUserAchievementStatus(CSteamID steamID, const char* pchAchievementName) + { + return false; + } + + void GetGameplayStats() + { + return; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } + + uint32 GetPublicIP() + { + return NULL; + } + + void SetGameData(const char* pchGameData) + { + return; + } + + uint32_t UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer010.h b/src/InterfacesEmulation/SteamGameServer010.h new file mode 100644 index 0000000..7e96379 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer010.h @@ -0,0 +1,136 @@ +#pragma once +#include "../public SDK/ISteamGameServer010.h" +#include "../Bridge.h" + + +class SteamGameServerIn010 : public ISteamGameServer010 +{ +public: + void LogOn() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + bool BSecure() + { + return true; // <---- :D + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + bool BSetServerType(uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char* pchGameDir, const char* pchVersion, bool bLANMode) + { + return false; + } + + void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, + const char* pchServerName, const char* pSpectatorServerName, + const char* pchMapName) + { + return; + } + + void UpdateSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetGameTags(const char* pchGameTags) + { + return; + } + + void GetGameplayStats() + { + return; + } + + SteamAPICall_t GetServerReputation() + { + return NULL; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } + + uint32 GetPublicIP() + { + return NULL; + } + + void SetGameData(const char* pchGameData) + { + return; + } + + uint32_t UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + uint32_t BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return NULL; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer011.h b/src/InterfacesEmulation/SteamGameServer011.h new file mode 100644 index 0000000..fbfae4c --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer011.h @@ -0,0 +1,250 @@ +#pragma once +#include "../public SDK/ISteamGameServer011.h" +#include "../Bridge.h" +#include "../public SDK/UserCommon.h" + +class SteamGameServerIn011 : public ISteamGameServer011 +{ +public: + bool InitGameServer(uint32 unGameIP, uint16 unGamePort, uint16 usQueryPort, uint32 unServerFlags, AppId_t nAppID, const char* pchVersion) + { + return true; + } + + void SetProduct(const char* pchProductName) + { + return; + } + + void SetGameDescription(const char* pchGameDescription) + { + return; + } + + void SetModDir(const char* pchModDir) + { + return; + } + + void SetDedicatedServer(bool bDedicatedServer) + { + return; + } + + void LogOn(const char* pszAccountName, const char* pszPassword) + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOnAnonymous() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + bool BSecure() + { + return true; + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool WasRestartRequested() + { + return false; + } + + void SetMaxPlayerCount(int cPlayersMax) + { + return; + } + + void SetBotPlayerCount(int cBotPlayers) + { + return; + } + + void SetServerName(const char* pszServerName) + { + return; + } + + void SetMapName(const char* pszMapName) + { + return; + } + + void SetPasswordProtected(bool bPasswordProtected) + { + return; + } + + void SetSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetSpectatorServerName(const char* pszSpectatorServerName) + { + return; + } + + void ClearAllKeyValues() + { + return; + } + + void SetKeyValue(const char* pKey, const char* pValue) + { + return; + } + + void SetGameTags(const char* pchGameTags) + { + return; + } + + void SetGameData(const char* pchGameData) + { + return; + } + + void SetRegion(const char* pchRegionName) + { + return; + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + uint32_t BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return NULL; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + uint32_t UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return NULL; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } + + void GetGameplayStats() + { + return; + } + + SteamAPICall_t GetServerReputation() + { + return NULL; + } + + uint32 GetPublicIP() + { + return NULL; + } + + bool HandleIncomingPacket(const void* pData, int cbData, uint32 srcIP, uint16 srcPort) + { + return false; + } + + int GetNextOutgoingPacket(void* pOut, int cbMaxOut, uint32* pNetAdr, uint16* pPort) + { + return NULL; + } + + void EnableHeartbeats(bool bActive) + { + return; + } + + void SetHeartbeatInterval(int iHeartbeatInterval) + { + return; + } + + void ForceHeartbeat() + { + return; + } + + SteamAPICall_t AssociateWithClan(CSteamID clanID) + { + return NULL; + } + + SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamID) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServer012.h b/src/InterfacesEmulation/SteamGameServer012.h new file mode 100644 index 0000000..b8510fc --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServer012.h @@ -0,0 +1,251 @@ +#pragma once +#include "../public SDK/ISteamGameServer012.h" +#include "../Bridge.h" + + +class SteamGameServerIn012 : public ISteamGameServer012 +{ +public: + bool InitGameServer(uint32 unGameIP, uint16 unGamePort, uint16 usQueryPort, uint32 unServerFlags, AppId_t nAppID, const char* pchVersion) + { + return true; + } + + void SetProduct(const char* pchProductName) + { + return; + } + + void SetGameDescription(const char* pchGameDescription) + { + return; + } + + void SetModDir(const char* pchModDir) + { + return; + } + + void SetDedicatedServer(bool bDedicatedServer) + { + return; + } + + void LogOn(const char* pszUnk) + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOnAnonymous() + { + { + SteamServersConnected_t* Response = (SteamServersConnected_t*)malloc(sizeof(SteamServersConnected_t)); + auto RequestID = SteamCallback::RegisterCall(true); + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + + { + GSPolicyResponse_t* Response = (GSPolicyResponse_t*)malloc(sizeof(GSPolicyResponse_t)); + auto RequestID = SteamCallback::RegisterCall(true); + + Response->m_bSecure = false; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + } + + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + bool BSecure() + { + return true; + } + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool WasRestartRequested() + { + return false; + } + + void SetMaxPlayerCount(int cPlayersMax) + { + return; + } + + + void SetBotPlayerCount(int cBotPlayers) + { + return; + } + + void SetServerName(const char* pszServerName) + { + return; + } + + void SetMapName(const char* pszMapName) + { + return; + } + + void SetPasswordProtected(bool bPasswordProtected) + { + return; + } + + void SetSpectatorPort(uint16 unSpectatorPort) + { + return; + } + + void SetSpectatorServerName(const char* pszSpectatorServerName) + { + return; + } + + void ClearAllKeyValues() + { + return; + } + + void SetKeyValue(const char* pKey, const char* pValue) + { + return; + } + + void SetGameTags(const char* pchGameTags) + { + return; + } + + void SetGameData(const char* pchGameData) + { + return; + } + + void SetRegion(const char* pchRegionName) + { + return; + } + + bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) + { + return false; + } + + CSteamID CreateUnauthenticatedUserConnection() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + void SendUserDisconnect(CSteamID steamIDUser) + { + return; + } + + bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) + { + return false; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + uint32_t BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return NULL; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + uint32_t UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return NULL; + } + + bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + return false; + } + + void GetGameplayStats() + { + return; + } + + SteamAPICall_t GetServerReputation() + { + return NULL; + } + + uint32 GetPublicIP() + { + return NULL; + } + + bool HandleIncomingPacket(const void* pData, int cbData, uint32 srcIP, uint16 srcPort) + { + return true; + } + + int GetNextOutgoingPacket(void* pOut, int cbMaxOut, uint32* pNetAdr, uint16* pPort) + { + return NULL; + } + + void EnableHeartbeats(bool bActive) + { + return; + } + + void SetHeartbeatInterval(int iHeartbeatInterval) + { + return; + } + + void ForceHeartbeat() + { + return; + } + + SteamAPICall_t AssociateWithClan(CSteamID clanID) + { + return NULL; + } + + SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamID) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamGameServerStats001.h b/src/InterfacesEmulation/SteamGameServerStats001.h new file mode 100644 index 0000000..0b71ca2 --- /dev/null +++ b/src/InterfacesEmulation/SteamGameServerStats001.h @@ -0,0 +1,51 @@ +#pragma once +#include "../public SDK/ISteamGameServerStats001.h" +#include "../Bridge.h" + + +class SteamGameServerStatsIn001 : public ISteamGameServerStats001 +{ +public: + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return true; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return true; + } + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return true; + } + bool SetUserStat(CSteamID steamIDUser, const char* pchName, int32 nData) + { + return true; + } + bool SetUserStat(CSteamID steamIDUser, const char* pchName, float fData) + { + return true; + } + bool UpdateUserAvgRateStat(CSteamID steamIDUser, const char* pchName, float flCountThisSession, double dSessionLength) + { + return true; + } + + bool SetUserAchievement(CSteamID steamIDUser, const char* pchName) + { + return true; + } + bool ClearUserAchievement(CSteamID steamIDUser, const char* pchName) + { + return true; + } + + SteamAPICall_t StoreUserStats(CSteamID steamIDUser) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTMLSurface002.h b/src/InterfacesEmulation/SteamHTMLSurface002.h new file mode 100644 index 0000000..245724e --- /dev/null +++ b/src/InterfacesEmulation/SteamHTMLSurface002.h @@ -0,0 +1,164 @@ +#pragma once +#include "../public SDK/ISteamHTMLSurface002.h" + + +class SteamHTMLSurfaceIn002 : public ISteamHTMLSurface002 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + SteamAPICall_t CreateBrowser(const char* pchUserAgent, const char* pchUserCSS) + { + return NULL; + } + + void RemoveBrowser(HHTMLBrowser unBrowserHandle) + { + return; + } + + void LoadURL(HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) + { + return; + } + + void SetSize(HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight) + { + return; + } + + void StopLoad(HHTMLBrowser unBrowserHandle) + { + return; + } + void Reload(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoBack(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoForward(HHTMLBrowser unBrowserHandle) + { + return; + } + + void AddHeader(HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) + { + return; + } + void ExecuteJavascript(HHTMLBrowser unBrowserHandle, const char* pchScript) + { + return; + } + + + void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + void MouseWheel(HHTMLBrowser unBrowserHandle, int32 nDelta) + { + return; + } + + + void KeyDown(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyUp(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyChar(HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + + void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + + void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) + { + return; + } + + void ViewSource(HHTMLBrowser unBrowserHandle) + { + return; + } + void CopyToClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + void PasteFromClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + + void Find(HHTMLBrowser unBrowserHandle, const char* pchSearchStr, bool bCurrentlyInFind, bool bReverse) + { + return; + } + void StopFind(HHTMLBrowser unBrowserHandle) + { + return; + } + + void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + + void SetCookie(const char* pchHostname, const char* pchKey, const char* pchValue, const char* pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false) + { + return; + } + + void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) + { + return; + } + + void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) + { + return; + } + + void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) + { + return; + } + + void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, const char** pchSelectedFiles) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTMLSurface003.h b/src/InterfacesEmulation/SteamHTMLSurface003.h new file mode 100644 index 0000000..effbdd0 --- /dev/null +++ b/src/InterfacesEmulation/SteamHTMLSurface003.h @@ -0,0 +1,169 @@ +#pragma once +#include "../public SDK/ISteamHTMLSurface003.h" + + +class SteamHTMLSurfaceIn003 : public ISteamHTMLSurface003 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + SteamAPICall_t CreateBrowser(const char* pchUserAgent, const char* pchUserCSS) + { + return NULL; + } + + void RemoveBrowser(HHTMLBrowser unBrowserHandle) + { + return; + } + + void LoadURL(HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) + { + return; + } + + void SetSize(HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight) + { + return; + } + + void StopLoad(HHTMLBrowser unBrowserHandle) + { + return; + } + void Reload(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoBack(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoForward(HHTMLBrowser unBrowserHandle) + { + return; + } + + void AddHeader(HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) + { + return; + } + void ExecuteJavascript(HHTMLBrowser unBrowserHandle, const char* pchScript) + { + return; + } + + + void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + void MouseWheel(HHTMLBrowser unBrowserHandle, int32 nDelta) + { + return; + } + + + void KeyDown(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyUp(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyChar(HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + + void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + + void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) + { + return; + } + + void ViewSource(HHTMLBrowser unBrowserHandle) + { + return; + } + void CopyToClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + void PasteFromClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + + void Find(HHTMLBrowser unBrowserHandle, const char* pchSearchStr, bool bCurrentlyInFind, bool bReverse) + { + return; + } + void StopFind(HHTMLBrowser unBrowserHandle) + { + return; + } + + void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + + void SetCookie(const char* pchHostname, const char* pchKey, const char* pchValue, const char* pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false) + { + return; + } + + void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) + { + return; + } + + void SetBackgroundMode(uint32, bool) + { + return; + } + + void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) + { + return; + } + + void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) + { + return; + } + + void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, const char** pchSelectedFiles) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTMLSurface004.h b/src/InterfacesEmulation/SteamHTMLSurface004.h new file mode 100644 index 0000000..ac88811 --- /dev/null +++ b/src/InterfacesEmulation/SteamHTMLSurface004.h @@ -0,0 +1,172 @@ +#pragma once +#include "../public SDK/ISteamHTMLSurface004.h" + + +class SteamHTMLSurfaceIn004 : public ISteamHTMLSurface004 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + SteamAPICall_t CreateBrowser(const char* pchUserAgent, const char* pchUserCSS) + { + return NULL; + } + + void RemoveBrowser(HHTMLBrowser unBrowserHandle) + { + return; + } + + void LoadURL(HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) + { + return; + } + + void SetSize(HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight) + { + return; + } + + void StopLoad(HHTMLBrowser unBrowserHandle) + { + return; + } + void Reload(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoBack(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoForward(HHTMLBrowser unBrowserHandle) + { + return; + } + + void AddHeader(HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) + { + return; + } + void ExecuteJavascript(HHTMLBrowser unBrowserHandle, const char* pchScript) + { + return; + } + + void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + void MouseWheel(HHTMLBrowser unBrowserHandle, int32 nDelta) + { + return; + } + + void KeyDown(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyUp(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyChar(HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + + void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + + void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) + { + return; + } + + void ViewSource(HHTMLBrowser unBrowserHandle) + { + return; + } + void CopyToClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + void PasteFromClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + + void Find(HHTMLBrowser unBrowserHandle, const char* pchSearchStr, bool bCurrentlyInFind, bool bReverse) + { + return; + } + void StopFind(HHTMLBrowser unBrowserHandle) + { + return; + } + + void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + + void SetCookie(const char* pchHostname, const char* pchKey, const char* pchValue, const char* pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false) + { + return; + } + + void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) + { + return; + } + + void SetBackgroundMode(HHTMLBrowser unBrowserHandle, bool bBackgroundMode) + { + return; + } + + void SetDPIScalingFactor(HHTMLBrowser unBrowserHandle, float flDPIScaling) + { + return; + } + + void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) + { + return; + } + + void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) + { + return; + } + + void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, const char** pchSelectedFiles) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTMLSurface005.h b/src/InterfacesEmulation/SteamHTMLSurface005.h new file mode 100644 index 0000000..5e6ef88 --- /dev/null +++ b/src/InterfacesEmulation/SteamHTMLSurface005.h @@ -0,0 +1,177 @@ +#pragma once +#include "../public SDK/ISteamHTMLSurface005.h" + + +class SteamHTMLSurfaceIn005 : public ISteamHTMLSurface005 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + SteamAPICall_t CreateBrowser(const char* pchUserAgent, const char* pchUserCSS) + { + return NULL; + } + + void RemoveBrowser(HHTMLBrowser unBrowserHandle) + { + return; + } + + void LoadURL(HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) + { + return; + } + + void SetSize(HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight) + { + return; + } + + void StopLoad(HHTMLBrowser unBrowserHandle) + { + return; + } + void Reload(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoBack(HHTMLBrowser unBrowserHandle) + { + return; + } + void GoForward(HHTMLBrowser unBrowserHandle) + { + return; + } + + void AddHeader(HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) + { + return; + } + void ExecuteJavascript(HHTMLBrowser unBrowserHandle, const char* pchScript) + { + return; + } + + void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + return; + } + void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + void MouseWheel(HHTMLBrowser unBrowserHandle, int32 nDelta) + { + return; + } + + void KeyDown(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey = false) + { + return; + } + void KeyUp(HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + void KeyChar(HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) + { + return; + } + + void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) + { + return; + } + + void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) + { + return; + } + + void ViewSource(HHTMLBrowser unBrowserHandle) + { + return; + } + void CopyToClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + void PasteFromClipboard(HHTMLBrowser unBrowserHandle) + { + return; + } + + void Find(HHTMLBrowser unBrowserHandle, const char* pchSearchStr, bool bCurrentlyInFind, bool bReverse) + { + return; + } + void StopFind(HHTMLBrowser unBrowserHandle) + { + return; + } + + void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) + { + return; + } + + void SetCookie(const char* pchHostname, const char* pchKey, const char* pchValue, const char* pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false) + { + return; + } + + void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) + { + return; + } + + void SetBackgroundMode(HHTMLBrowser unBrowserHandle, bool bBackgroundMode) + { + return; + } + + void SetDPIScalingFactor(HHTMLBrowser unBrowserHandle, float flDPIScaling) + { + return; + } + + void OpenDeveloperTools(HHTMLBrowser unBrowserHandle) + { + return; + } + + void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) + { + return; + } + + void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) + { + return; + } + + void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, const char** pchSelectedFiles) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTTP001.h b/src/InterfacesEmulation/SteamHTTP001.h new file mode 100644 index 0000000..1c5131d --- /dev/null +++ b/src/InterfacesEmulation/SteamHTTP001.h @@ -0,0 +1,80 @@ +#pragma once +#include "../public SDK/ISteamHTTP001.h" + +class SteamHTTPIn001 : public ISteamHTTP001 +{ +public: + HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, const char* pchAbsoluteURL) + { + return NULL; + } + bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, uint64 ulContextValue) + { + return false; + } + + bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) + { + return false; + } + + bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, const char* pchHeaderValue) + { + return false; + } + + bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, const char* pchParamName, const char* pchParamValue) + { + return false; + } + + bool SendHTTPRequest(HTTPRequestHandle hRequest, SteamAPICall_t* pCallHandle) + { + return false; + } + + bool DeferHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPResponseHeaderSize(HTTPRequestHandle hRequest, const char* pchHeaderName, uint32* unResponseHeaderSize) + { + return false; + } + + bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, uint8* pHeaderValueBuffer, uint32 unBufferSize) + { + return false; + } + + bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, uint32* unBodySize) + { + return false; + } + + bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, uint8* pBodyDataBuffer, uint32 unBufferSize) + { + return false; + } + + bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, float* pflPercentOut) + { + return false; + } + + bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, const char* pchContentType, uint8* pubBody, uint32 unBodyLen) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTTP002.h b/src/InterfacesEmulation/SteamHTTP002.h new file mode 100644 index 0000000..e7b4b71 --- /dev/null +++ b/src/InterfacesEmulation/SteamHTTP002.h @@ -0,0 +1,131 @@ +#pragma once +#include "../public SDK/ISteamHTTP002.h" + +class SteamHTTPIn002 : public ISteamHTTP002 +{ +public: + HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, const char* pchAbsoluteURL) + { + return NULL; + } + + bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, uint64 ulContextValue) + { + return false; + } + + bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) + { + return false; + } + + bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, const char* pchHeaderValue) + { + return false; + } + + bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, const char* pchParamName, const char* pchParamValue) + { + return false; + } + + bool SendHTTPRequest(HTTPRequestHandle hRequest, SteamAPICall_t* pCallHandle) + { + return false; + } + + bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, SteamAPICall_t* pCallHandle) + { + return false; + } + + bool DeferHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPResponseHeaderSize(HTTPRequestHandle hRequest, const char* pchHeaderName, uint32* unResponseHeaderSize) + { + return false; + } + + bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, uint8* pHeaderValueBuffer, uint32 unBufferSize) + { + return false; + } + + bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, uint32* unBodySize) + { + return false; + } + + bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, uint8* pBodyDataBuffer, uint32 unBufferSize) + { + return false; + } + + bool GetHTTPStreamingResponseBodyData(HTTPRequestHandle hRequest, uint32 cOffset, uint8* pBodyDataBuffer, uint32 unBufferSize) + { + return false; + } + + bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, float* pflPercentOut) + { + return false; + } + + bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, const char* pchContentType, uint8* pubBody, uint32 unBodyLen) + { + return false; + } + + HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) + { + return NULL; + } + + bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) + { + return false; + } + + bool SetCookie(HTTPCookieContainerHandle hCookieContainer, const char* pchHost, const char* pchUrl, const char* pchCookie) + { + return false; + } + + bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) + { + return false; + } + + bool SetHTTPRequestUserAgentInfo(HTTPRequestHandle hRequest, const char* pchUserAgentInfo) + { + return false; + } + + bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) + { + return false; + } + + bool SetHTTPRequestAbsoluteTimeoutMS(HTTPRequestHandle hRequest, uint32 unMilliseconds) + { + return false; + } + + bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, bool* pbWasTimedOut) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamHTTP003.h b/src/InterfacesEmulation/SteamHTTP003.h new file mode 100644 index 0000000..d376e00 --- /dev/null +++ b/src/InterfacesEmulation/SteamHTTP003.h @@ -0,0 +1,130 @@ +#pragma once +#include "../public SDK/ISteamHTTP003.h" + +class SteamHTTPIn003 : public ISteamHTTP003 +{ +public: + HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, const char* pchAbsoluteURL) + { + return 0; + } + + bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, uint64 ulContextValue) + { + return false; + } + + bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) + { + return false; + } + + bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, const char* pchHeaderValue) + { + return false; + } + + bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, const char* pchParamName, const char* pchParamValue) + { + return false; + } + + bool SendHTTPRequest(HTTPRequestHandle hRequest, SteamAPICall_t* pCallHandle) + { + return false; + } + + bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, SteamAPICall_t* pCallHandle) + { + return false; + } + bool DeferHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPResponseHeaderSize(HTTPRequestHandle hRequest, const char* pchHeaderName, uint32* unResponseHeaderSize) + { + return false; + } + + bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, const char* pchHeaderName, uint8* pHeaderValueBuffer, uint32 unBufferSize) + { + return false; + } + + bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, uint32* unBodySize) + { + return false; + } + + bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, uint8* pBodyDataBuffer, uint32 unBufferSize) + { + return false; + } + + bool GetHTTPStreamingResponseBodyData(HTTPRequestHandle hRequest, uint32 cOffset, uint8* pBodyDataBuffer, uint32 unBufferSize) + { + return false; + } + + bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) + { + return false; + } + + bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, float* pflPercentOut) + { + return false; + } + + bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, const char* pchContentType, uint8* pubBody, uint32 unBodyLen) + { + return false; + } + + HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) + { + return 0; + } + + bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) + { + return false; + } + + bool SetCookie(HTTPCookieContainerHandle hCookieContainer, const char* pchHost, const char* pchUrl, const char* pchCookie) + { + return false; + } + + bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) + { + return false; + } + + bool SetHTTPRequestUserAgentInfo(HTTPRequestHandle hRequest, const char* pchUserAgentInfo) + { + return false; + } + + bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) + { + return false; + } + + bool SetHTTPRequestAbsoluteTimeoutMS(HTTPRequestHandle hRequest, uint32 unMilliseconds) + { + return false; + } + + bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, bool* pbWasTimedOut) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamInput001.h b/src/InterfacesEmulation/SteamInput001.h new file mode 100644 index 0000000..0a14ce6 --- /dev/null +++ b/src/InterfacesEmulation/SteamInput001.h @@ -0,0 +1,176 @@ +#pragma once +#include "../public SDK/ISteamImput001.h" + +class SteamInputIn001 : public ISteamInput001 +{ +public: + bool Init() + { + return true; + } + bool Shutdown() + { + return true; + } + + void RunFrame() + { + return; + } + + int GetConnectedControllers(InputHandle_t* handlesOut) + { + return NULL; + } + + InputActionSetHandle_t GetActionSetHandle(const char* pszActionSetName) + { + return NULL; + } + + void ActivateActionSet(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle) + { + return; + } + InputActionSetHandle_t GetCurrentActionSet(InputHandle_t inputHandle) + { + return NULL; + } + + void ActivateActionSetLayer(InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateActionSetLayer(InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle) + { + return; + } + void DeactivateAllActionSetLayers(InputHandle_t inputHandle) + { + return; + } + int GetActiveActionSetLayers(InputHandle_t inputHandle, InputActionSetHandle_t* handlesOut) + { + return NULL; + } + + InputDigitalActionHandle_t GetDigitalActionHandle(const char* pszActionName) + { + return NULL; + } + + InputDigitalActionData_t GetDigitalActionData(InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle) + { + InputDigitalActionData_t dt; + dt.bActive = false; + dt.bState = false; + return dt; + } + + int GetDigitalActionOrigins(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin* originsOut) + { + return NULL; + } + + InputAnalogActionHandle_t GetAnalogActionHandle(const char* pszActionName) + { + return NULL; + } + + InputAnalogActionData_t GetAnalogActionData(InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle) + { + InputAnalogActionData_t dt; + dt.bActive = false; + dt.eMode = k_EInputSourceMode_None; + dt.x = 0; + dt.y = 0; + return dt; + } + + int GetAnalogActionOrigins(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin* originsOut) + { + return NULL; + } + + const char* GetGlyphForActionOrigin(EInputActionOrigin eOrigin) + { + return ""; + } + + const char* GetStringForActionOrigin(EInputActionOrigin eOrigin) + { + return ""; + } + + void StopAnalogActionMomentum(InputHandle_t inputHandle, InputAnalogActionHandle_t eAction) + { + return; + } + + InputMotionData_t GetMotionData(InputHandle_t inputHandle) + { + InputMotionData_t dt; + dt = { 0 }; + return dt; + } + + void TriggerVibration(InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed) + { + return; + } + + void SetLEDColor(InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags) + { + return; + } + + void TriggerHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) + { + return; + } + + void TriggerRepeatedHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) + { + return; + } + + bool ShowBindingPanel(InputHandle_t inputHandle) + { + return false; + } + + ESteamInputType GetInputTypeForHandle(InputHandle_t inputHandle) + { + return k_ESteamInputType_Unknown; + } + + InputHandle_t GetControllerForGamepadIndex(int nIndex) + { + return NULL; + } + + int GetGamepadIndexForController(InputHandle_t ulinputHandle) + { + return NULL; + } + + const char* GetStringForXboxOrigin(EXboxOrigin eOrigin) + { + return ""; + } + + const char* GetGlyphForXboxOrigin(EXboxOrigin eOrigin) + { + return ""; + } + + EInputActionOrigin GetActionOriginFromXboxOrigin(InputHandle_t inputHandle, EXboxOrigin eOrigin) + { + return k_EInputActionOrigin_None; + } + + EInputActionOrigin TranslateActionOrigin(ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin) + { + return k_EInputActionOrigin_None; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamInventory001.h b/src/InterfacesEmulation/SteamInventory001.h new file mode 100644 index 0000000..aba85e2 --- /dev/null +++ b/src/InterfacesEmulation/SteamInventory001.h @@ -0,0 +1,132 @@ +#pragma once +#include "../public SDK/ISteamInventory001.h" + +class SteamInventoryIn001 : public ISteamInventory001 +{ +public: + EResult GetResultStatus(SteamInventoryResult_t resultHandle) + { + return k_EResultOK; + } + + bool GetResultItems(SteamInventoryResult_t resultHandle, + OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t* pOutItemsArray, + uint32* punOutItemsArraySize) + { + return false; + } + + uint32 GetResultTimestamp(SteamInventoryResult_t resultHandle) + { + return NULL; + } + + bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) + { + return true; + } + + void DestroyResult(SteamInventoryResult_t resultHandle) + { + return; + } + + + bool GetAllItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + + bool GetItemsByID(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unCountInstanceIDs) const SteamItemInstanceID_t* pInstanceIDs, uint32 unCountInstanceIDs) + { + return false; + } + + + bool SerializeResult(SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void* pOutBuffer, uint32* punOutBufferSize) + { + return false; + } + + bool DeserializeResult(SteamInventoryResult_t* pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void* pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) + { + return false; + } + + + bool GenerateItems(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32* punArrayQuantity, uint32 unArrayLength) + { + return false; + } + + bool GrantPromoItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + bool AddPromoItem(SteamInventoryResult_t* pResultHandle, SteamItemDef_t itemDef) + { + return false; + } + bool AddPromoItems(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, uint32 unArrayLength) + { + return false; + } + + bool ConsumeItem(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) + { + return false; + } + + bool ExchangeItems(SteamInventoryResult_t* pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t* pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32* punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t* pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32* punArrayDestroyQuantity, uint32 unArrayDestroyLength) + { + return false; + } + + + bool TransferItemQuantity(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) + { + return false; + } + + + void SendItemDropHeartbeat() + { + return; + } + + bool TriggerItemDrop(SteamInventoryResult_t* pResultHandle, SteamItemDef_t dropListDefinition) + { + return false; + } + + + bool TradeItems(SteamInventoryResult_t* pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t* pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32* pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t* pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32* pArrayGetQuantity, uint32 nArrayGetLength) + { + return false; + } + + + bool LoadItemDefinitions() + { + return false; + } + + bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t* pItemDefIDs, + DESC(Size of array is passed inand actual size used is returned in this param) uint32* punItemDefIDsArraySize) + { + return false; + } + + bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, const char* pchPropertyName, + OUT_STRING_COUNT(punValueBufferSize) char* pchValueBuffer, uint32* punValueBufferSize) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamInventory002.h b/src/InterfacesEmulation/SteamInventory002.h new file mode 100644 index 0000000..f724582 --- /dev/null +++ b/src/InterfacesEmulation/SteamInventory002.h @@ -0,0 +1,217 @@ +#pragma once +#include "../public SDK/ISteamInventory002.h" + +class SteamInventoryIn002 : public ISteamInventory002 +{ +public: + EResult GetResultStatus(SteamInventoryResult_t resultHandle) + { + return k_EResultOK; + } + + bool GetResultItems(SteamInventoryResult_t resultHandle, + SteamItemDetails_t* pOutItemsArray, + uint32* punOutItemsArraySize) + { + return false; + } + + bool GetResultItemProperty(SteamInventoryResult_t resultHandle, + uint32 unItemIndex, + const char* pchPropertyName, + char* pchValueBuffer, uint32* punValueBufferSizeOut) + { + return false; + } + + uint32 GetResultTimestamp(SteamInventoryResult_t resultHandle) + { + return NULL; + } + + bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) + { + return false; + } + + void DestroyResult(SteamInventoryResult_t resultHandle) + { + return; + } + + + bool GetAllItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + + bool GetItemsByID(SteamInventoryResult_t* pResultHandle, const SteamItemInstanceID_t* pInstanceIDs, uint32 unCountInstanceIDs) + { + return false; + } + + + bool SerializeResult(SteamInventoryResult_t resultHandle, void* pOutBuffer, uint32* punOutBufferSize) + { + return false; + } + + bool DeserializeResult(SteamInventoryResult_t* pOutResultHandle, const void* pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) + { + return false; + } + + + bool GenerateItems(SteamInventoryResult_t* pResultHandle, const SteamItemDef_t* pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32* punArrayQuantity, uint32 unArrayLength) + { + return false; + } + + + METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligibleand grants the items(one time only).) + bool GrantPromoItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + bool AddPromoItem(SteamInventoryResult_t* pResultHandle, SteamItemDef_t itemDef) + { + return false; + } + bool AddPromoItems(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, uint32 unArrayLength) + { + return false; + } + + + METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + bool ConsumeItem(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) + { + return false; + } + + bool ExchangeItems(SteamInventoryResult_t* pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t* pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32* punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t* pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32* punArrayDestroyQuantity, uint32 unArrayDestroyLength) + { + return false; + } + + + bool TransferItemQuantity(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) + { + return false; + } + + + + METHOD_DESC(Deprecated method.Playtime accounting is performed on the Steam servers.) + void SendItemDropHeartbeat() + { + return; + } + + + METHOD_DESC(Playtime credit must be consumedand turned into item drops by your game.) + bool TriggerItemDrop(SteamInventoryResult_t* pResultHandle, SteamItemDef_t dropListDefinition) + { + return false; + } + bool TradeItems(SteamInventoryResult_t* pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t* pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32* pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t* pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32* pArrayGetQuantity, uint32 nArrayGetLength) + { + return false; + } + + + + METHOD_DESC(LoadItemDefinitions triggers the automatic loadand refresh of item definitions.) + bool LoadItemDefinitions() + { + return false; + } + + bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t* pItemDefIDs, + DESC(Size of array is passed inand actual size used is returned in this param) uint32* punItemDefIDsArraySize) + { + return false; + } + + bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, const char* pchPropertyName, + OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut) + { + return false; + } + + SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) + { + return NULL; + } + + bool GetEligiblePromoItemDefinitionIDs( + CSteamID steamID, + OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t* pItemDefIDs, + DESC(Size of array is passed inand actual size used is returned in this param) uint32* punItemDefIDsArraySize) + { + return false; + } + + SteamAPICall_t StartPurchase(ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32* punArrayQuantity, uint32 unArrayLength) + { + return NULL; + } + + SteamAPICall_t RequestPrices() + { + return NULL; + } + + uint32 GetNumItemsWithPrices() + { + return NULL; + } + + bool GetItemsWithPrices(ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t* pArrayItemDefs, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64* pPrices, + uint32 unArrayLength) + { + return false; + } + + bool GetItemPrice(SteamItemDef_t iDefinition, uint64* pPrice) + { + return false; + } + + SteamInventoryUpdateHandle_t StartUpdateProperties() + { + return NULL; + } + bool RemoveProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, const char* pchPropertyValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, bool bValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, int64 nValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, float flValue) + { + return false; + } + bool SubmitUpdateProperties(SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t* pResultHandle) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamInventory003.h b/src/InterfacesEmulation/SteamInventory003.h new file mode 100644 index 0000000..a2aafc4 --- /dev/null +++ b/src/InterfacesEmulation/SteamInventory003.h @@ -0,0 +1,242 @@ +#pragma once +#include "../public SDK/ISteamInventory003.h" + +class SteamInventoryIn003 : public ISteamInventory003 +{ +public: + METHOD_DESC(Find out the status of an asynchronous inventory result handle.) + EResult GetResultStatus(SteamInventoryResult_t resultHandle) + { + return k_EResultOK; + } + + // Copies the contents of a result set into a flat array. The specific + // contents of the result set depend on which query which was used. + METHOD_DESC(Copies the contents of a result set into a flat array.The specific contents of the result set depend on which query which was used.) + bool GetResultItems(SteamInventoryResult_t resultHandle, + OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t* pOutItemsArray, + uint32* punOutItemsArraySize) + { + return false; + } + + bool GetResultItemProperty(SteamInventoryResult_t resultHandle, + uint32 unItemIndex, + const char* pchPropertyName, + OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut) + { + return false; + } + + // Returns the server time at which the result was generated. Compare against + // the value of IClientUtils::GetServerRealTime() to determine age. + METHOD_DESC(Returns the server time at which the result was generated.Compare against the value of IClientUtils::GetServerRealTime() to determine age.) + uint32 GetResultTimestamp(SteamInventoryResult_t resultHandle) + { + return NULL; + } + + // Returns true if the result belongs to the target steam ID, false if the + // result does not. This is important when using DeserializeResult, to verify + // that a remote player is not pretending to have a different user's inventory. + METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not.This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) + bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) + { + return false; + } + + // Destroys a result handle and frees all associated memory. + METHOD_DESC(Destroys a result handleand frees all associated memory.) + void DestroyResult(SteamInventoryResult_t resultHandle) + { + return; + } + + + + METHOD_DESC(Captures the entire state of the current users Steam inventory.) + bool GetAllItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + + // Captures the state of a subset of the current user's Steam inventory, + // identified by an array of item instance IDs. The results from this call + // can be serialized and passed to other players to "prove" that the current + // user owns specific items, without exposing the user's entire inventory. + // For example, you could call GetItemsByID with the IDs of the user's + // currently equipped cosmetic items and serialize this to a buffer, and + // then transmit this buffer to other players upon joining a game. + METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) + bool GetItemsByID(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unCountInstanceIDs) const SteamItemInstanceID_t* pInstanceIDs, uint32 unCountInstanceIDs) + { + return false; + } + + + bool SerializeResult(SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void* pOutBuffer, uint32* punOutBufferSize) + { + return false; + } + + bool DeserializeResult(SteamInventoryResult_t* pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void* pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) + { + return false; + } + + + bool GenerateItems(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32* punArrayQuantity, uint32 unArrayLength) + { + return false; + } + + // GrantPromoItems() checks the list of promotional items for which the user may be eligible + // and grants the items (one time only). On success, the result set will include items which + // were granted, if any. If no items were granted because the user isn't eligible for any + // promotions, this is still considered a success. + METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligibleand grants the items(one time only).) + bool GrantPromoItems(SteamInventoryResult_t* pResultHandle) + { + return false; + } + + bool AddPromoItem(SteamInventoryResult_t* pResultHandle, SteamItemDef_t itemDef) + { + return false; + } + bool AddPromoItems(SteamInventoryResult_t* pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, uint32 unArrayLength) + { + return false; + } + + + METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + bool ConsumeItem(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) + { + return false; + } + + bool ExchangeItems(SteamInventoryResult_t* pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t* pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32* punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t* pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32* punArrayDestroyQuantity, uint32 unArrayDestroyLength) + { + return false; + } + + + bool TransferItemQuantity(SteamInventoryResult_t* pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) + { + return false; + } + + METHOD_DESC(Deprecated method.Playtime accounting is performed on the Steam servers.) + void SendItemDropHeartbeat() + { + return; + } + + + METHOD_DESC(Playtime credit must be consumedand turned into item drops by your game.) + bool TriggerItemDrop(SteamInventoryResult_t* pResultHandle, SteamItemDef_t dropListDefinition) + { + return false; + } + + + bool TradeItems(SteamInventoryResult_t* pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t* pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32* pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t* pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32* pArrayGetQuantity, uint32 nArrayGetLength) + { + return false; + } + + METHOD_DESC(LoadItemDefinitions triggers the automatic loadand refresh of item definitions.) + bool LoadItemDefinitions() + { + return false; + } + + bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t* pItemDefIDs, + DESC(Size of array is passed inand actual size used is returned in this param) uint32* punItemDefIDsArraySize) + { + return false; + } + + bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, const char* pchPropertyName, + OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut) + { + return false; + } + + SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) + { + return NULL; + } + + bool GetEligiblePromoItemDefinitionIDs( + CSteamID steamID, + OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t* pItemDefIDs, + DESC(Size of array is passed inand actual size used is returned in this param) uint32* punItemDefIDsArraySize) + { + return false; + } + + SteamAPICall_t StartPurchase(ARRAY_COUNT(unArrayLength) const SteamItemDef_t* pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32* punArrayQuantity, uint32 unArrayLength) + { + return NULL; + } + + SteamAPICall_t RequestPrices() + { + return NULL; + } + + uint32 GetNumItemsWithPrices() + { + return NULL; + } + + bool GetItemsWithPrices(ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t* pArrayItemDefs, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64* pCurrentPrices, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64* pBasePrices, + uint32 unArrayLength) + { + return false; + } + + bool GetItemPrice(SteamItemDef_t iDefinition, uint64* pCurrentPrice, uint64* pBasePrice) + { + return false; + } + + SteamInventoryUpdateHandle_t StartUpdateProperties() + { + return NULL; + } + bool RemoveProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, const char* pchPropertyValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, bool bValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, int64 nValue) + { + return false; + } + bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char* pchPropertyName, float flValue) + { + return false; + } + bool SubmitUpdateProperties(SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t* pResultHandle) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamMatchmaking001.h b/src/InterfacesEmulation/SteamMatchmaking001.h new file mode 100644 index 0000000..64d7b00 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking001.h @@ -0,0 +1,135 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking001.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn001 : public ISteamMatchmaking001 +{ +public: + int GetFavoriteGameCount() + { + return 0; + } + + bool GetFavoriteGame(int iGame, uint32* pnAppID, uint32* pnIP, uint16* pnConnPort, uint32* punFlags, uint32* pRTime32LastPlayedOnServer) + { + return false; + } + int AddFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) + { + return NULL; + } + bool RemoveFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags) + { + return false; + } + + + bool GetFavoriteGame2(int iGame, uint32* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, uint32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame2(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) + { + return false; + } + + bool RemoveFavoriteGame2(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + void RequestLobbyList(uint64 ulGameID, MatchMakingKeyValuePair_t* pFilters, uint32 nFilters) + { + return; + } + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + void CreateLobby(uint64 ulGameID, bool bPrivate) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + } + void JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + const char* GetLobbyData(CSteamID SteamIDLobby, const char* pchKey) + { + return ""; + } + void SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + void ChangeLobbyAdmin(CSteamID steamIDLobby, CSteamID steamIDNewAdmin) + { + return; + } + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking002.h b/src/InterfacesEmulation/SteamMatchmaking002.h new file mode 100644 index 0000000..a25a5f2 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking002.h @@ -0,0 +1,122 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking002.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn002 : public ISteamMatchmaking002 +{ +public: + int GetFavoriteGameCount() + { + return 0; + } + + bool GetFavoriteGame(int iGame, uint32* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, RTime32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + void RequestLobbyList() + { + return; + } + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + void CreateLobby(bool bPrivate) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + } + void JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + const char* GetLobbyData(CSteamID SteamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking003.h b/src/InterfacesEmulation/SteamMatchmaking003.h new file mode 100644 index 0000000..5609842 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking003.h @@ -0,0 +1,165 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking003.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn003 : public ISteamMatchmaking003 +{ +public: + int GetFavoriteGameCount() + { + return 0; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, RTime32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListFilter(const char* pchKeyToMatch, const char* pchValueToMatch) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, int nComparisonType) + { + return; + } + OBSOLETE_FUNCTION void AddRequestLobbyListSlotsAvailableFilter() + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + void CreateLobby(bool bPrivate) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + } + + void JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + OBSOLETE_FUNCTION void SetLobbyVoiceEnabled(CSteamID steamIDLobby, bool bEnabled) + { + return; + } + + bool RequestFriendsLobbies() + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking004.h b/src/InterfacesEmulation/SteamMatchmaking004.h new file mode 100644 index 0000000..320f090 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking004.h @@ -0,0 +1,158 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking004.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn004 : public ISteamMatchmaking004 +{ +public: + int GetFavoriteGameCount() + { + return 0; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, RTime32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + void RequestLobbyList() + { + return; + } + void AddRequestLobbyListFilter(const char* pchKeyToMatch, const char* pchValueToMatch) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, int nComparisonType) + { + return; + } + OBSOLETE_FUNCTION void AddRequestLobbyListSlotsAvailableFilter() + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + void CreateLobby(bool bPrivate) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + } + void JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + } + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool RequestFriendsLobbies() + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking005.h b/src/InterfacesEmulation/SteamMatchmaking005.h new file mode 100644 index 0000000..d2a7231 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking005.h @@ -0,0 +1,184 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking005.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn005 : public ISteamMatchmaking005 +{ +public: + int GetFavoriteGameCount() + { + return NULL; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, RTime32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListFilter(const char* pchKeyToMatch, const char* pchValueToMatch) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, int nComparisonType) + { + return; + } + OBSOLETE_FUNCTION void AddRequestLobbyListSlotsAvailableFilter() + { + return; + } + void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo) + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + SteamAPICall_t CreateLobby(ELobbyType eLobbyType) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + return RequestID; + } + + SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool RequestFriendsLobbies() + { + return false; + } + + bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + return false; + } + + CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + OBSOLETE_FUNCTION double GetLobbyDistance(CSteamID steamIDLobby) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking006.h b/src/InterfacesEmulation/SteamMatchmaking006.h new file mode 100644 index 0000000..f4cf38e --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking006.h @@ -0,0 +1,170 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking006.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn006 : public ISteamMatchmaking006 +{ +public: + int GetFavoriteGameCount() + { + return NULL; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, RTime32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListFilter(const char* pchKeyToMatch, const char* pchValueToMatch) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, int nComparisonType) + { + return; + } + void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo) + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + SteamAPICall_t CreateLobby(ELobbyType eLobbyType) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + + return RequestID; + } + + SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + return false; + } + + CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + return CSteamID((uint64)Steam_Config::UserID); + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking007.h b/src/InterfacesEmulation/SteamMatchmaking007.h new file mode 100644 index 0000000..08cd5a7 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking007.h @@ -0,0 +1,199 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking007.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn007 : public ISteamMatchmaking007 +{ +public: + int GetFavoriteGameCount() + { + return NULL; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, uint32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo) + { + return; + } + void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable) + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + SteamAPICall_t CreateLobby(ELobbyType eLobbyType, int) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + + return RequestID; + } + + SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + int GetLobbyDataCount(CSteamID steamIDLobby) + { + return NULL; + } + + bool GetLobbyDataByIndex(CSteamID steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize, char* pchValue, int cchValueBufferSize) + { + return false; + } + + bool DeleteLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + return false; + } + + bool SetLobbyJoinable(CSteamID steamIDLobby, bool bLobbyJoinable) + { + return false; + } + + CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SetLobbyOwner(CSteamID steamIDLobby, CSteamID steamIDNewOwner) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking008.h b/src/InterfacesEmulation/SteamMatchmaking008.h new file mode 100644 index 0000000..a8bcb4b --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking008.h @@ -0,0 +1,207 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking008.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn008 : public ISteamMatchmaking008 +{ +public: + int GetFavoriteGameCount() + { + return NULL; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, uint32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo) + { + return; + } + void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable) + { + return; + } + void AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter eLobbyDistanceFilter) + { + return; + } + void AddRequestLobbyListResultCountFilter(int cMaxResults) + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + SteamAPICall_t CreateLobby(ELobbyType eLobbyType, int) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + + return RequestID; + } + + SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + int GetLobbyDataCount(CSteamID steamIDLobby) + { + return NULL; + } + + bool GetLobbyDataByIndex(CSteamID steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize, char* pchValue, int cchValueBufferSize) + { + return false; + } + + bool DeleteLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + return false; + } + + bool SetLobbyJoinable(CSteamID steamIDLobby, bool bLobbyJoinable) + { + return false; + } + + CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SetLobbyOwner(CSteamID steamIDLobby, CSteamID steamIDNewOwner) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmaking009.h b/src/InterfacesEmulation/SteamMatchmaking009.h new file mode 100644 index 0000000..a8af433 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmaking009.h @@ -0,0 +1,217 @@ +#pragma once +#include "../public SDK/ISteamMatchmaking009.h" +#include "../Bridge.h" + + +class SteamMatchmakingIn009 : public ISteamMatchmaking009 +{ +public: + int GetFavoriteGameCount() + { + return NULL; + } + + bool GetFavoriteGame(int iGame, AppId_t* pnAppID, uint32* pnIP, uint16* pnConnPort, uint16* pnQueryPort, uint32* punFlags, uint32* pRTime32LastPlayedOnServer) + { + return false; + } + + int AddFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) + { + return NULL; + } + + bool RemoveFavoriteGame(AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) + { + return false; + } + + SteamAPICall_t RequestLobbyList() + { + return NULL; + } + void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType) + { + return; + } + void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo) + { + return; + } + void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable) + { + return; + } + void AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter eLobbyDistanceFilter) + { + return; + } + void AddRequestLobbyListResultCountFilter(int cMaxResults) + { + return; + } + + void AddRequestLobbyListCompatibleMembersFilter(CSteamID steamID) + { + return; + } + + CSteamID GetLobbyByIndex(int iLobby) + { + CSteamID idata = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat); + return idata; + } + + SteamAPICall_t CreateLobby(ELobbyType eLobbyType, int) + { + LobbyCreated_t* Response = nullptr; + CSteamID ID = CSteamID(1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat); // Init a CSteamID structure + + auto RequestID = SteamCallback::RegisterCall(true); + + Response = static_cast(malloc(sizeof(LobbyCreated_t))); // alloc memory to set a new fake Lobby response + Response->m_eResult = k_EResultOK; + Response->m_ulSteamIDLobby = ID.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + JoinLobby(ID); + + return RequestID; + } + + SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + LobbyEnter_t* Response = nullptr; + + auto RequestID = SteamCallback::RegisterCall(true); + Response = static_cast(malloc(sizeof(LobbyEnter_t))); + Response->m_bLocked = false; + Response->m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + Response->m_rgfChatPermissions = (EChatPermission)0xFFFFFFFF; + Response->m_ulSteamIDLobby = steamIDLobby.ConvertToUint64(); + + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + void LeaveLobby(CSteamID steamIDLobby) + { + auto RequestID = SteamCallback::RegisterCall(true); + + LobbyChatUpdate_t* retvals = (LobbyChatUpdate_t*)malloc(sizeof(LobbyChatUpdate_t)); + retvals->m_rgfChatMemberStateChange = EChatMemberStateChange::k_EChatMemberStateChangeLeft; + retvals->m_ulSteamIDLobby = steamIDLobby; + retvals->m_ulSteamIDMakingChange = Steam_Config::UserID; + retvals->m_ulSteamIDUserChanged = Steam_Config::UserID; + SteamCallback::CreateNewRequest(retvals, sizeof(*retvals), retvals->k_iCallback, RequestID); + } + + bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + return false; + } + + int GetNumLobbyMembers(CSteamID steamIDLobby) + { + return 1; + } + CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return ""; + } + bool SetLobbyData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return false; + } + + int GetLobbyDataCount(CSteamID steamIDLobby) + { + return NULL; + } + + bool GetLobbyDataByIndex(CSteamID steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize, char* pchValue, int cchValueBufferSize) + { + return false; + } + + bool DeleteLobbyData(CSteamID steamIDLobby, const char* pchKey) + { + return false; + } + + const char* GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, const char* pchKey) + { + return ""; + } + void SetLobbyMemberData(CSteamID steamIDLobby, const char* pchKey, const char* pchValue) + { + return; + } + + bool SendLobbyChatMsg(CSteamID steamIDLobby, const void* pvMsgBody, int cubMsgBody) + { + return false; + } + int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, CSteamID* pSteamIDUser, void* pvData, int cubData, EChatEntryType* peChatEntryType) + { + return NULL; + } + + bool RequestLobbyData(CSteamID steamIDLobby) + { + return false; + } + + void SetLobbyGameServer(CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer) + { + return; + } + bool GetLobbyGameServer(CSteamID steamIDLobby, uint32* punGameServerIP, uint16* punGameServerPort, CSteamID* psteamIDGameServer) + { + return false; + } + + bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + return false; + } + int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + return 1; + } + + bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + return false; + } + + bool SetLobbyJoinable(CSteamID steamIDLobby, bool bLobbyJoinable) + { + return false; + } + + CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool SetLobbyOwner(CSteamID steamIDLobby, CSteamID steamIDNewOwner) + { + return false; + } + + bool SetLinkedLobby(CSteamID steamIDLobby, CSteamID steamIDLobby2) + { + return false; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmakingServers001.h b/src/InterfacesEmulation/SteamMatchmakingServers001.h new file mode 100644 index 0000000..d686c94 --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmakingServers001.h @@ -0,0 +1,84 @@ +#pragma once +#include "../public SDK/ISteamMatchmakingServers001.h" +#include "../Bridge.h" + + +class SteamMatchmakingServersIn001 : public ISteamMatchmakingServers001 +{ +public: + void RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + void RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + void RequestFriendsServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + void RequestFavoritesServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + void RequestHistoryServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + void RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001* pRequestServersResponse) + { + return; + } + + gameserveritem_t* GetServerDetails(EMatchMakingType eType, int iServer) + { + return nullptr; + } + + void CancelQuery(EMatchMakingType eType) + { + return; + } + + void RefreshQuery(EMatchMakingType eType) + { + return; + } + + bool IsRefreshing(EMatchMakingType eType) + { + return false; + } + + int GetServerCount(EMatchMakingType eType) + { + return NULL; + } + + void RefreshServer(EMatchMakingType eType, int iServer) + { + return; + } + + + int32_t PingServer(uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse* pRequestServersResponse) + { + return NULL; + } + + int32_t PlayerDetails(uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse* pRequestServersResponse) + { + return NULL; + } + + int32_t ServerRules(uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse* pRequestServersResponse) + { + return NULL; + } + + void CancelServerQuery(int32_t hServerQuery) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamMatchmakingServers002.h b/src/InterfacesEmulation/SteamMatchmakingServers002.h new file mode 100644 index 0000000..9ca1dbf --- /dev/null +++ b/src/InterfacesEmulation/SteamMatchmakingServers002.h @@ -0,0 +1,89 @@ +#pragma once +#include "../public SDK/ISteamMatchmakingServers002.h" +#include "../Bridge.h" + + +class SteamMatchmakingServersIn002 : public ISteamMatchmakingServers002 +{ +public: + HServerListRequest RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + HServerListRequest RequestFriendsServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + HServerListRequest RequestFavoritesServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + HServerListRequest RequestHistoryServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse* pRequestServersResponse) + { + return NULL; + } + + void ReleaseRequest(HServerListRequest hServerListRequest) + { + return; + } + + gameserveritem_t* GetServerDetails(HServerListRequest hRequest, int iServer) + { + return NULL; + } + + void CancelQuery(HServerListRequest hRequest) + { + return; + } + + void RefreshQuery(HServerListRequest hRequest) + { + return; + } + + bool IsRefreshing(HServerListRequest hRequest) + { + return false; + } + + int GetServerCount(HServerListRequest hRequest) + { + return NULL; + } + + void RefreshServer(HServerListRequest hRequest, int iServer) + { + return; + } + + + int32_t PingServer(uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse* pRequestServersResponse) + { + return NULL; + } + + int32_t PlayerDetails(uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse* pRequestServersResponse) + { + return NULL; + } + + int32_t ServerRules(uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse* pRequestServersResponse) + { + return NULL; + } + + void CancelServerQuery(int32_t hServerQuery) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamMusic001.h b/src/InterfacesEmulation/SteamMusic001.h new file mode 100644 index 0000000..79698c4 --- /dev/null +++ b/src/InterfacesEmulation/SteamMusic001.h @@ -0,0 +1,48 @@ +#pragma once +#include "../public SDK/ISteamMusic001.h" +#include "../Bridge.h" + + +class SteamMusicIn001 : public ISteamMusic001 +{ +public: + bool BIsEnabled() + { + return false; + } + bool BIsPlaying() + { + return false; + } + + AudioPlayback_Status GetPlaybackStatus() + { + return AudioPlayback_Undefined; + } + + void Play() + { + return; + } + void Pause() + { + return; + } + void PlayPrevious() + { + return; + } + void PlayNext() + { + return; + } + + void SetVolume(float flVolume) + { + return; + } + float GetVolume() + { + return 0; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamMusicRemote001.h b/src/InterfacesEmulation/SteamMusicRemote001.h new file mode 100644 index 0000000..808f226 --- /dev/null +++ b/src/InterfacesEmulation/SteamMusicRemote001.h @@ -0,0 +1,141 @@ +#pragma once +#include "../public SDK/ISteamMusicRemote001.h" + +class SteamMusicRemoteIn001 : public ISteamMusicRemote001 +{ +public: + bool RegisterSteamMusicRemote(const char* pchName) + { + return false; + } + bool DeregisterSteamMusicRemote() + { + return false; + } + bool BIsCurrentMusicRemote() + { + return false; + } + bool BActivationSuccess(bool bValue) + { + return false; + } + + bool SetDisplayName(const char* pchDisplayName) + { + return false; + } + bool SetPNGIcon_64x64(void* pvBuffer, uint32 cbBufferLength) + { + return false; + } + + bool EnablePlayPrevious(bool bValue) + { + return false; + } + bool EnablePlayNext(bool bValue) + { + return false; + } + bool EnableShuffled(bool bValue) + { + return false; + } + bool EnableLooped(bool bValue) + { + return false; + } + bool EnableQueue(bool bValue) + { + return false; + } + bool EnablePlaylists(bool bValue) + { + return false; + } + + bool UpdatePlaybackStatus(AudioPlayback_Status nStatus) + { + return false; + } + bool UpdateShuffled(bool bValue) + { + return false; + } + bool UpdateLooped(bool bValue) + { + return false; + } + bool UpdateVolume(float flValue) + { + return false; + } + + bool CurrentEntryWillChange() + { + return false; + } + bool CurrentEntryIsAvailable(bool bAvailable) + { + return false; + } + bool UpdateCurrentEntryText(const char* pchText) + { + return false; + } + bool UpdateCurrentEntryElapsedSeconds(int nValue) + { + return false; + } + bool UpdateCurrentEntryCoverArt(void* pvBuffer, uint32 cbBufferLength) + { + return false; + } + bool CurrentEntryDidChange() + { + return false; + } + + bool QueueWillChange() + { + return false; + } + bool ResetQueueEntries() + { + return false; + } + bool SetQueueEntry(int nID, int nPosition, const char* pchEntryText) + { + return false; + } + bool SetCurrentQueueEntry(int nID) + { + return false; + } + bool QueueDidChange() + { + return false; + } + + bool PlaylistWillChange() + { + return false; + } + bool ResetPlaylistEntries() + { + return false; + } + bool SetPlaylistEntry(int nID, int nPosition, const char* pchEntryText) + { + return false; + } + bool SetCurrentPlaylistEntry(int nID) + { + return false; + } + bool PlaylistDidChange() + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamNetworking001.h b/src/InterfacesEmulation/SteamNetworking001.h new file mode 100644 index 0000000..39b55ce --- /dev/null +++ b/src/InterfacesEmulation/SteamNetworking001.h @@ -0,0 +1,66 @@ +#pragma once +#include "../public SDK/ISteamNetworking001.h" +#include "../Bridge.h" + + +class SteamNetworkingIn001 : public ISteamNetworking001 +{ +public: + SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, uint32 nIP, uint16 nPort) + { + return NULL; + } + + SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec) + { + return NULL; + } + SNetSocket_t CreateConnectionSocket(uint32 nIP, uint16 nPort, int nTimeoutSec) + { + return NULL; + } + + bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + + bool SendDataOnSocket(SNetSocket_t hSocket, void* pubData, uint32 cubData, bool bReliable) + { + return false; + } + + bool IsDataAvailableOnSocket(SNetSocket_t hSocket, uint32* pcubMsgSize) + { + return false; + } + + bool RetrieveDataFromSocket(SNetSocket_t hSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return false; + } + + bool IsDataAvailable(SNetListenSocket_t hListenSocket, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool RetrieveData(SNetListenSocket_t hListenSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool GetSocketInfo(SNetSocket_t hSocket, CSteamID* pSteamIDRemote, int* peSocketStatus, uint32* punIPRemote, uint16* punPortRemote) + { + return false; + } + + bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, uint32* pnIP, uint16* pnPort) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamNetworking002.h b/src/InterfacesEmulation/SteamNetworking002.h new file mode 100644 index 0000000..eb0f966 --- /dev/null +++ b/src/InterfacesEmulation/SteamNetworking002.h @@ -0,0 +1,76 @@ +#pragma once +#include "../public SDK/ISteamNetworking002.h" +#include "../Bridge.h" + + +class SteamNetworkingIn002 : public ISteamNetworking002 +{ +public: + SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay) + { + return NULL; + } + + SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + return NULL; + } + SNetSocket_t CreateConnectionSocket(uint32 nIP, uint16 nPort, int nTimeoutSec) + { + return NULL; + } + + bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + + bool SendDataOnSocket(SNetSocket_t hSocket, void* pubData, uint32 cubData, bool bReliable) + { + return false; + } + + bool IsDataAvailableOnSocket(SNetSocket_t hSocket, uint32* pcubMsgSize) + { + return false; + } + + bool RetrieveDataFromSocket(SNetSocket_t hSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return false; + } + + bool IsDataAvailable(SNetListenSocket_t hListenSocket, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool RetrieveData(SNetListenSocket_t hListenSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool GetSocketInfo(SNetSocket_t hSocket, CSteamID* pSteamIDRemote, int* peSocketStatus, uint32* punIPRemote, uint16* punPortRemote) + { + return false; + } + + bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, uint32* pnIP, uint16* pnPort) + { + return false; + } + + ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + return k_ESNetSocketConnectionTypeNotConnected; + } + + int GetMaxPacketSize(SNetSocket_t hSocket) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamNetworking003.h b/src/InterfacesEmulation/SteamNetworking003.h new file mode 100644 index 0000000..0e3bc34 --- /dev/null +++ b/src/InterfacesEmulation/SteamNetworking003.h @@ -0,0 +1,107 @@ +#pragma once +#include "../public SDK/ISteamNetworking003.h" +#include "../Bridge.h" + + +class SteamNetworkingIn003 : public ISteamNetworking003 +{ +public: + bool SendP2PPacket(CSteamID steamIDRemote, const void* pubData, uint32 cubData, EP2PSend eP2PSendType) + { + return false; + } + + bool IsP2PPacketAvailable(uint32* pcubMsgSize) + { + return false; + } + + bool ReadP2PPacket(void* pubDest, uint32 cubDest, uint32* pcubMsgSize, CSteamID* psteamIDRemote) + { + return false; + } + + bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool CloseP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool GetP2PSessionState(CSteamID steamIDRemote, P2PSessionState_t* pConnectionState) + { + return false; + } + + + SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay) + { + return NULL; + } + + SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + return NULL; + } + SNetSocket_t CreateConnectionSocket(uint32 nIP, uint16 nPort, int nTimeoutSec) + { + return NULL; + } + + bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + + bool SendDataOnSocket(SNetSocket_t hSocket, void* pubData, uint32 cubData, bool bReliable) + { + return false; + } + + bool IsDataAvailableOnSocket(SNetSocket_t hSocket, uint32* pcubMsgSize) + { + return false; + } + + bool RetrieveDataFromSocket(SNetSocket_t hSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return false; + } + + bool IsDataAvailable(SNetListenSocket_t hListenSocket, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool RetrieveData(SNetListenSocket_t hListenSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool GetSocketInfo(SNetSocket_t hSocket, CSteamID* pSteamIDRemote, int* peSocketStatus, uint32* punIPRemote, uint16* punPortRemote) + { + return false; + } + + bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, uint32* pnIP, uint16* pnPort) + { + return false; + } + + ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + return k_ESNetSocketConnectionTypeNotConnected; + } + + int GetMaxPacketSize(SNetSocket_t hSocket) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamNetworking004.h b/src/InterfacesEmulation/SteamNetworking004.h new file mode 100644 index 0000000..19ab07d --- /dev/null +++ b/src/InterfacesEmulation/SteamNetworking004.h @@ -0,0 +1,107 @@ +#pragma once +#include "../public SDK/ISteamNetworking004.h" +#include "../Bridge.h" + + +class SteamNetworkingIn004 : public ISteamNetworking004 +{ +public: + bool SendP2PPacket(CSteamID steamIDRemote, const void* pubData, uint32 cubData, EP2PSend eP2PSendType, int iVirtualPort) + { + return false; + } + + bool IsP2PPacketAvailable(uint32* pcubMsgSize, int iVirtualPort) + { + return false; + } + + bool ReadP2PPacket(void* pubDest, uint32 cubDest, uint32* pcubMsgSize, CSteamID* psteamIDRemote, int iVirtualPort) + { + return false; + } + + bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool CloseP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool GetP2PSessionState(CSteamID steamIDRemote, P2PSessionState_t* pConnectionState) + { + return false; + } + + + SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay) + { + return NULL; + } + + SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + return NULL; + } + SNetSocket_t CreateConnectionSocket(uint32 nIP, uint16 nPort, int nTimeoutSec) + { + return NULL; + } + + bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + + bool SendDataOnSocket(SNetSocket_t hSocket, void* pubData, uint32 cubData, bool bReliable) + { + return false; + } + + bool IsDataAvailableOnSocket(SNetSocket_t hSocket, uint32* pcubMsgSize) + { + return false; + } + + bool RetrieveDataFromSocket(SNetSocket_t hSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return false; + } + + bool IsDataAvailable(SNetListenSocket_t hListenSocket, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool RetrieveData(SNetListenSocket_t hListenSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool GetSocketInfo(SNetSocket_t hSocket, CSteamID* pSteamIDRemote, int* peSocketStatus, uint32* punIPRemote, uint16* punPortRemote) + { + return false; + } + + bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, uint32* pnIP, uint16* pnPort) + { + return false; + } + + ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + return k_ESNetSocketConnectionTypeNotConnected; + } + + int GetMaxPacketSize(SNetSocket_t hSocket) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamNetworking005.h b/src/InterfacesEmulation/SteamNetworking005.h new file mode 100644 index 0000000..16bd622 --- /dev/null +++ b/src/InterfacesEmulation/SteamNetworking005.h @@ -0,0 +1,116 @@ +#pragma once +#include "../public SDK/ISteamNetworking005.h" +#include "../Bridge.h" + + +class SteamNetworkingIn005 : public ISteamNetworking005 +{ +public: + bool SendP2PPacket(CSteamID steamIDRemote, const void* pubData, uint32 cubData, EP2PSend eP2PSendType, int iVirtualPort) + { + return false; + } + + bool IsP2PPacketAvailable(uint32* pcubMsgSize, int iVirtualPort) + { + return false; + } + + bool ReadP2PPacket(void* pubDest, uint32 cubDest, uint32* pcubMsgSize, CSteamID* psteamIDRemote, int iVirtualPort) + { + return false; + } + + bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool CloseP2PSessionWithUser(CSteamID steamIDRemote) + { + return false; + } + + bool CloseP2PChannelWithUser(CSteamID steamIDRemote, int iVirtualPort) + { + return false; + } + + bool GetP2PSessionState(CSteamID steamIDRemote, P2PSessionState_t* pConnectionState) + { + return false; + } + + bool AllowP2PPacketRelay(bool bAllow) + { + return false; + } + + SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay) + { + return NULL; + } + + SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + return NULL; + } + SNetSocket_t CreateConnectionSocket(uint32 nIP, uint16 nPort, int nTimeoutSec) + { + return NULL; + } + + bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + return false; + } + + bool SendDataOnSocket(SNetSocket_t hSocket, void* pubData, uint32 cubData, bool bReliable) + { + return false; + } + + bool IsDataAvailableOnSocket(SNetSocket_t hSocket, uint32* pcubMsgSize) + { + return false; + } + + bool RetrieveDataFromSocket(SNetSocket_t hSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize) + { + return false; + } + + bool IsDataAvailable(SNetListenSocket_t hListenSocket, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool RetrieveData(SNetListenSocket_t hListenSocket, void* pubDest, uint32 cubDest, uint32* pcubMsgSize, SNetSocket_t* phSocket) + { + return false; + } + + bool GetSocketInfo(SNetSocket_t hSocket, CSteamID* pSteamIDRemote, int* peSocketStatus, uint32* punIPRemote, uint16* punPortRemote) + { + return false; + } + + bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, uint32* pnIP, uint16* pnPort) + { + return false; + } + + ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + return k_ESNetSocketConnectionTypeNotConnected; + } + + int GetMaxPacketSize(SNetSocket_t hSocket) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamParentalSettings001.h b/src/InterfacesEmulation/SteamParentalSettings001.h new file mode 100644 index 0000000..badf538 --- /dev/null +++ b/src/InterfacesEmulation/SteamParentalSettings001.h @@ -0,0 +1,34 @@ +#pragma once +#include "../public SDK/isteamparentalsettings.h" + + +class SteamParentalSettingsIn001 : public ISteamParentalSettings001 +{ +public: + bool BIsParentalLockEnabled() + { + return false; + } + bool BIsParentalLockLocked() + { + return false; + } + + bool BIsAppBlocked(AppId_t nAppID) + { + return false; + } + bool BIsAppInBlockList(AppId_t nAppID) + { + return false; + } + + bool BIsFeatureBlocked(EParentalFeature eFeature) + { + return false; + } + bool BIsFeatureInBlockList(EParentalFeature eFeature) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamParties002.h b/src/InterfacesEmulation/SteamParties002.h new file mode 100644 index 0000000..8e4db5d --- /dev/null +++ b/src/InterfacesEmulation/SteamParties002.h @@ -0,0 +1,63 @@ +#pragma once +#include "../public SDK/ISteamParties002.h" + +class SteamPartiesIn002 : public ISteamParties002 +{ +public: + uint32 GetNumActiveBeacons() + { + return NULL; + } + PartyBeaconID_t GetBeaconByIndex(uint32 unIndex) + { + return NULL; + } + bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, CSteamID* pSteamIDBeaconOwner, SteamPartyBeaconLocation_t* pLocation, char* pchMetadata, int cchMetadata) + { + return false; + } + + SteamAPICall_t JoinParty(PartyBeaconID_t ulBeaconID) + { + return NULL; + } + + bool GetNumAvailableBeaconLocations(uint32* puNumLocations) + { + return false; + } + bool GetAvailableBeaconLocations(SteamPartyBeaconLocation_t* pLocationList, uint32 uMaxNumLocations) + { + return false; + } + + SteamAPICall_t CreateBeacon(uint32 unOpenSlots, SteamPartyBeaconLocation_t* pBeaconLocation, const char* pchConnectString, const char* pchMetadata) + { + return NULL; + } + + void OnReservationCompleted(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) + { + return; + } + + void CancelReservation(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) + { + return; + } + + SteamAPICall_t ChangeNumOpenSlots(PartyBeaconID_t ulBeacon, uint32 unOpenSlots) + { + return NULL; + } + + bool DestroyBeacon(PartyBeaconID_t ulBeacon) + { + return false; + } + + bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char* pchDataStringOut, int cchDataStringOut) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamRemotePlay001.h b/src/InterfacesEmulation/SteamRemotePlay001.h new file mode 100644 index 0000000..09a4be4 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemotePlay001.h @@ -0,0 +1,37 @@ +#pragma once +#include "../public SDK/ISteamRemotePlay001.h" +#include "../Bridge.h" + +class SteamRemotePlayIn001 : public ISteamRemotePlay001 +{ +public: + uint32 GetSessionCount() + { + return NULL; + } + + uint32 GetSessionID(int iSessionIndex) + { + return NULL; + } + + CSteamID GetSessionSteamID(uint32 unSessionID) + { + return CSteamID((uint64)Steam_Config::UserID); + } + + const char* GetSessionClientName(uint32 unSessionID) + { + return NULL; + } + + ESteamDeviceFormFactor GetSessionClientFormFactor(uint32 unSessionID) + { + return k_ESteamDeviceFormFactorUnknown; + } + + bool BGetSessionClientResolution(uint32 unSessionID, int* pnResolutionX, int* pnResolutionY) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamRemoteStorage001.h b/src/InterfacesEmulation/SteamRemoteStorage001.h new file mode 100644 index 0000000..2aa9668 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage001.h @@ -0,0 +1,122 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage001.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn001 : public ISteamRemoteStorage001 +{ +public: + bool FileWrite(const char* filename, void const* data, int sizebytestowrite) + { + if (!Steam_Config::RemoteStorage) + return true; + if (sizebytestowrite < NULL) + return false; + if(data == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(filename), "wb"); + if (File) + { + std::fwrite(data, sizebytestowrite, 1, File); + std::fclose(File); + return true; + } + return false; + } + + uint32 GetFileSize(const char* filename) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(filename); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + + bool FileRead(const char* filename, void* buffer, int size) + { + if (!Steam_Config::RemoteStorage) + return false; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(filename), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + std::fread(buffer, min(size, FileSize), 1, File); + std::fclose(File); + return true; + } + return false; + } + + bool FileExists(const char* filename) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(filename)) != INVALID_FILE_ATTRIBUTES); + } + OBSOLETE_FUNCTION bool FileDelete(const char* filename) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(filename); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + + uint32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + + const char* GetFileNameAndSize(int index, int* size) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + + if (index <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(index); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *size = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int* current, int* maximum) + { + *current = NULL; + *maximum = INT_MAX; + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamRemoteStorage002.h b/src/InterfacesEmulation/SteamRemoteStorage002.h new file mode 100644 index 0000000..0e8337d --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage002.h @@ -0,0 +1,111 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage002.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn002 : public ISteamRemoteStorage002 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage003.h b/src/InterfacesEmulation/SteamRemoteStorage003.h new file mode 100644 index 0000000..14b1dee --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage003.h @@ -0,0 +1,251 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage003.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn003 : public ISteamRemoteStorage003 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledThisApp() + { + return true; + } + bool SetCloudEnabledThisApp(bool bEnable) + { + return true; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage004.h b/src/InterfacesEmulation/SteamRemoteStorage004.h new file mode 100644 index 0000000..3a05d4c --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage004.h @@ -0,0 +1,257 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage004.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn004 : public ISteamRemoteStorage004 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage005.h b/src/InterfacesEmulation/SteamRemoteStorage005.h new file mode 100644 index 0000000..2225857 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage005.h @@ -0,0 +1,295 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage005.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn005 : public ISteamRemoteStorage005 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t UpdatePublishedFile(RemoteStorageUpdatePublishedFileRequest_t updatePublishedFileRequest) + { + return NULL; + } + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 unStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 unStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } +}; + diff --git a/src/InterfacesEmulation/SteamRemoteStorage006.h b/src/InterfacesEmulation/SteamRemoteStorage006.h new file mode 100644 index 0000000..f3f4139 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage006.h @@ -0,0 +1,363 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage006.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn006 : public ISteamRemoteStorage006 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, int32* pnBytesDownloaded, int32* pnBytesExpected) + { + *pnBytesDownloaded = 10; + *pnBytesExpected = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(const char* cszFileName, const char* cszPreviewFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage007.h b/src/InterfacesEmulation/SteamRemoteStorage007.h new file mode 100644 index 0000000..79a00e8 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage007.h @@ -0,0 +1,362 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage007.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn007 : public ISteamRemoteStorage007 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, uint32* puDownloadedBytes, uint32* puTotalBytes) + { + *puDownloadedBytes = 10; + *puTotalBytes = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage008.h b/src/InterfacesEmulation/SteamRemoteStorage008.h new file mode 100644 index 0000000..83d86c0 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage008.h @@ -0,0 +1,380 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage008.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn008 : public ISteamRemoteStorage008 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + bool FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return true; + } + bool FileWriteStreamClose(GID_t hStream) + { + return true; + } + bool FileWriteStreamCancel(GID_t hStream) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, int32* pnBytesDownloaded, int32* pnBytesExpected) + { + *pnBytesDownloaded = 10; + *pnBytesExpected = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage009.h b/src/InterfacesEmulation/SteamRemoteStorage009.h new file mode 100644 index 0000000..c015031 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage009.h @@ -0,0 +1,379 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage009.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn009 : public ISteamRemoteStorage009 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + EResult FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return k_EResultOK; + } + EResult FileWriteStreamClose(GID_t hStream) + { + return k_EResultOK; + } + EResult FileWriteStreamCancel(GID_t hStream) + { + return k_EResultOK; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, uint32* puDownloadedBytes, uint32* puTotalBytes) + { + *puDownloadedBytes = 10; + *puTotalBytes = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 uOffset) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return true; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage010.h b/src/InterfacesEmulation/SteamRemoteStorage010.h new file mode 100644 index 0000000..b206d0e --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage010.h @@ -0,0 +1,385 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage010.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn010 : public ISteamRemoteStorage010 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + bool FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return true; + } + bool FileWriteStreamClose(GID_t hStream) + { + return true; + } + bool FileWriteStreamCancel(GID_t hStream) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint32 uUnk) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, int32* pnBytesDownloaded, int32* pnBytesExpected) + { + *pnBytesDownloaded = 10; + *pnBytesExpected = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 uOffset) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } + + SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, const char* cszLocation, uint32 uUnk) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamRemoteStorage011.h b/src/InterfacesEmulation/SteamRemoteStorage011.h new file mode 100644 index 0000000..3ce36c9 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage011.h @@ -0,0 +1,384 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage011.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn011 : public ISteamRemoteStorage011 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + bool FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return true; + } + bool FileWriteStreamClose(GID_t hStream) + { + return true; + } + bool FileWriteStreamCancel(GID_t hStream) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint32 uUnk) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, int32* pnBytesDownloaded, int32* pnBytesExpected) + { + *pnBytesDownloaded = 10; + *pnBytesExpected = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 uOffset) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId, uint32) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } + + SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, const char* cszLocation, uint32 uUnk) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage012.h b/src/InterfacesEmulation/SteamRemoteStorage012.h new file mode 100644 index 0000000..476211c --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage012.h @@ -0,0 +1,384 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage012.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn012 : public ISteamRemoteStorage012 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + EResult FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return k_EResultOK; + } + EResult FileWriteStreamClose(GID_t hStream) + { + return k_EResultOK; + } + EResult FileWriteStreamCancel(GID_t hStream) + { + return k_EResultOK; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint32 uUnk) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, uint32* puDownloadedBytes, uint32* puTotalBytes) + { + *puDownloadedBytes = 10; + *puTotalBytes = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 uOffset, EUGCReadAction eAction) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId, uint32) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } + + SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, const char* cszLocation, uint32 unPriority) + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage013.h b/src/InterfacesEmulation/SteamRemoteStorage013.h new file mode 100644 index 0000000..82852fd --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage013.h @@ -0,0 +1,401 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage013.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn013 : public ISteamRemoteStorage013 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) // <------ Steam saves + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + + SteamAPICall_t FileWriteAsync(const char* pchFile, const void* pvData, uint32 cubData) + { + return NULL; + } + SteamAPICall_t FileReadAsync(const char* pchFile, uint32 nOffset, uint32 cubToRead) + { + return NULL; + } + bool FileReadAsyncComplete(SteamAPICall_t hReadCall, void* pvBuffer, uint32 cubToRead) + { + return true; + } + + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + GID_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + EResult FileWriteStreamWriteChunk(GID_t hStream, const void* pvData, int32 cubData) + { + return k_EResultOK; + } + EResult FileWriteStreamClose(GID_t hStream) + { + return k_EResultOK; + } + EResult FileWriteStreamCancel(GID_t hStream) + { + return k_EResultOK; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(int32* pnTotalBytes, int32* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint32 uUnk) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + bool GetUGCDownloadProgress(UGCHandle_t hContent, uint32* puDownloadedBytes, uint32* puTotalBytes) + { + *puDownloadedBytes = 10; + *puTotalBytes = 10; + return true; + } + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 uOffset, EUGCReadAction eAction) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + JobID_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(JobID_t hUpdateRequest, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(JobID_t hUpdateRequest, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(JobID_t hUpdateRequest, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(JobID_t hUpdateRequest, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(JobID_t hUpdateRequest, SteamParamStringArray_t* pTags) + { + return false; + } + SteamAPICall_t CommitPublishedFileUpdate(JobID_t hUpdateRequest) + { + return NULL; + } + + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId, uint32) + { + return NULL; + } + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + bool UpdatePublishedFileSetChangeDescription(JobID_t hUpdateRequest, const char* cszDescription) + { + return false; + } + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserSharedWorkshopFiles(AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, AppId_t nConsumerAppId, const char* cszTitle, const char* cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 uStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } + + SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, const char* cszLocation, uint32 uUnk) + { + return NULL; + } + + private: + void* FileBuffer = 0; +}; diff --git a/src/InterfacesEmulation/SteamRemoteStorage014.h b/src/InterfacesEmulation/SteamRemoteStorage014.h new file mode 100644 index 0000000..b0d2b29 --- /dev/null +++ b/src/InterfacesEmulation/SteamRemoteStorage014.h @@ -0,0 +1,448 @@ +#pragma once +#include "../public SDK/ISteamRemoteStorage014.h" +#include "../Bridge.h" +#include "../ColdManager.h" + +class SteamRemoteStorageIn014 : public ISteamRemoteStorage014 +{ +public: + bool FileWrite(const char* pchFile, const void* pvData, int32 cubData) + { + if (!Steam_Config::RemoteStorage) + return true; + if (cubData < NULL) + return false; + if (pvData == NULL) + return false; + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "wb"); + if (File) + { + std::fwrite(pvData, cubData, 1, File); + std::fclose(File); + return true; + } + return false; + } + int32 FileRead(const char* pchFile, void* pvData, int32 cubDataToRead) + { + if (!Steam_Config::RemoteStorage) + return NULL; + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(pchFile), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + return NULL; + } + + + SteamAPICall_t FileWriteAsync(const char* pchFile, const void* pvData, uint32 cubData) + { + return NULL; + } + + + SteamAPICall_t FileReadAsync(const char* pchFile, uint32 nOffset, uint32 cubToRead) + { + return NULL; + } + bool FileReadAsyncComplete(SteamAPICall_t hReadCall, void* pvBuffer, uint32 cubToRead) + { + return true; + } + + bool FileForget(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + bool FileDelete(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + if (GetFileAttributesA(myfile) == INVALID_FILE_ATTRIBUTES) + return false; + return (DeleteFileA(myfile) == TRUE); + } + + SteamAPICall_t FileShare(const char* pchFile) + { + return NULL; + } + bool SetSyncPlatforms(const char* pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + return true; + } + + UGCFileWriteStreamHandle_t FileWriteStreamOpen(const char* pchFile) + { + return NULL; + } + bool FileWriteStreamWriteChunk(UGCFileWriteStreamHandle_t writeHandle, const void* pvData, int32 cubData) + { + return true; + } + bool FileWriteStreamClose(UGCFileWriteStreamHandle_t writeHandle) + { + return true; + } + bool FileWriteStreamCancel(UGCFileWriteStreamHandle_t writeHandle) + { + return true; + } + + bool FileExists(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return (GetFileAttributesA(ColdAPI_Storage::ConnectDirectoryToFile(pchFile)) != INVALID_FILE_ATTRIBUTES); + } + bool FilePersisted(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return false; + return true; + } + int32 GetFileSize(const char* pchFile) + { + if (!Steam_Config::RemoteStorage) + return NULL; + const char* myfile = ColdAPI_Storage::ConnectDirectoryToFile(pchFile); + // Let's use std as more faster. + std::FILE* File = std::fopen(myfile, "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + return FileSize; + } + return NULL; + } + int64 GetFileTimestamp(const char* pchFile) + { + return time(NULL) - 3000; + } + ERemoteStoragePlatform GetSyncPlatforms(const char* pchFile) + { + return k_ERemoteStoragePlatformAll; + } + + int32 GetFileCount() + { + if (!Steam_Config::RemoteStorage) + return NULL; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + return FilesMatrix.size(); // Return the vector size + } + const char* GetFileNameAndSize(int iFile, int32* pnFileSizeInBytes) + { + if (!Steam_Config::RemoteStorage) + return ""; + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetStorageDirectory()); + + if (iFile <= FilesMatrix.size()) + { + std::string FileName = FilesMatrix.at(iFile); + + // Let's use std as more faster. + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnFileSizeInBytes = FileSize; + return FileName.c_str(); + } + } + return ""; + } + + bool GetQuota(uint64* pnTotalBytes, uint64* puAvailableBytes) + { + *pnTotalBytes = NULL; + *puAvailableBytes = INT_MAX; + return true; + } + bool IsCloudEnabledForAccount() + { + return true; + } + bool IsCloudEnabledForApp() + { + return true; + } + void SetCloudEnabledForApp(bool bEnabled) + { + return; + } + + SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint32 unPriority) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + + auto Response = new RemoteStorageDownloadUGCResult_t(); + auto RequestID = SteamCallback::RegisterCall(true); + Response->m_eResult = k_EResultOK; + Response->m_hFile = hContent; + Response->m_nAppID = Steam_Config::AppId; + Response->m_nSizeInBytes = FileSize; + std::memcpy(Response->m_pchFileName, FileName.c_str(), MAX_PATH); + Response->m_ulSteamIDOwner = Steam_Config::UserID; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + return RequestID; + } + } + return NULL; + } + + bool GetUGCDownloadProgress(UGCHandle_t hContent, int32* pnBytesDownloaded, int32* pnBytesExpected) + { + *pnBytesDownloaded = 10; + *pnBytesExpected = 10; + return true; + } + + bool GetUGCDetails(UGCHandle_t hContent, AppId_t* pnAppID, char** ppchName, int32* pnFileSizeInBytes, CSteamID* pSteamIDOwner) + { + if (!Steam_Config::RemoteStorage) + return false; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + std::fclose(File); + *pnAppID = Steam_Config::AppId; + *ppchName = (char*)std::malloc(std::strlen(FileName.c_str()) + 10); + std::strcpy(*ppchName, FileName.c_str()); + *pnFileSizeInBytes = FileSize; + *pSteamIDOwner = Steam_Config::UserID; + return true; + } + } + return false; + } + + int32 UGCRead(UGCHandle_t hContent, void* pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction) + { + if (!Steam_Config::RemoteStorage) + return NULL; + + ColdAPI_Storage::FillFileStructure(ColdAPI_Storage::GetUGCDirectory()); + + if (FilesMatrix.size() >= hContent) + { + // Read the UGC File. + std::string FileName = FilesMatrix.at(hContent); + std::FILE* File = std::fopen(ColdAPI_Storage::ConnectUGCDirectoryToFile(FileName.c_str()), "rb"); + if (File) + { + std::fseek(File, 0, SEEK_END); + long FileSize = std::ftell(File); + std::fseek(File, 0, SEEK_SET); + + // Let's check always if the read size is not bigger than the FileSize. We'll do it with min. + int32_t Min = min(cubDataToRead, FileSize); + std::fread(pvData, Min, 1, File); + std::fclose(File); + return Min; + } + } + return NULL; + } + + int32 GetCachedUGCCount() + { + return NULL; + } + UGCHandle_t GetCachedUGCHandle(int32 iCachedContent) + { + return NULL; + } + +#if defined(_PS3) || defined(_SERVER) + + void GetFileListFromServer() + { + return; + } + bool FileFetch(const char* pchFile) + { + return true; + } + bool FilePersist(const char* pchFile) + { + return true; + } + bool SynchronizeToClient() + { + return true; + } + bool SynchronizeToServer() + { + return true; + } + bool ResetFileRequestState() + { + return true; + } +#endif + + SteamAPICall_t PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags, EWorkshopFileType eWorkshopFileType) + { + return NULL; + } + PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileFile(PublishedFileUpdateHandle_t updateHandle, const char* pchFile) + { + return false; + } + bool UpdatePublishedFilePreviewFile(PublishedFileUpdateHandle_t updateHandle, const char* pchPreviewFile) + { + return false; + } + bool UpdatePublishedFileTitle(PublishedFileUpdateHandle_t updateHandle, const char* pchTitle) + { + return false; + } + bool UpdatePublishedFileDescription(PublishedFileUpdateHandle_t updateHandle, const char* pchDescription) + { + return false; + } + bool UpdatePublishedFileVisibility(PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool UpdatePublishedFileTags(PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t* pTags) + { + return false; + } + + SteamAPICall_t CommitPublishedFileUpdate(PublishedFileUpdateHandle_t updateHandle) + { + return NULL; + } + SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld) + { + return NULL; + } + + SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + SteamAPICall_t EnumerateUserPublishedFiles(uint32 unStartIndex) + { + return NULL; + } + + SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + SteamAPICall_t EnumerateUserSubscribedFiles(uint32 unStartIndex) + { + return NULL; + } + + SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + bool UpdatePublishedFileSetChangeDescription(PublishedFileUpdateHandle_t updateHandle, const char* pchChangeDescription) + { + return false; + } + + SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + return NULL; + } + + SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + return NULL; + } + + SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t* pRequiredTags, SteamParamStringArray_t* pExcludedTags) + { + return NULL; + } + + SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, const char* pchVideoAccount, const char* pchVideoIdentifier, const char* pchPreviewFile, AppId_t nConsumerAppId, const char* pchTitle, const char* pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t* pTags) + { + return NULL; + } + + SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + return NULL; + } + + SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint32 unStartIndex) + { + return NULL; + } + SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t* pTags, SteamParamStringArray_t* pUserTags) + { + return NULL; + } + + + SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, const char* pchLocation, uint32 unPriority) + { + return NULL; + } + + private: + void* FileBuffer = 0; +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamScreenshots001.h b/src/InterfacesEmulation/SteamScreenshots001.h new file mode 100644 index 0000000..5b7b1c8 --- /dev/null +++ b/src/InterfacesEmulation/SteamScreenshots001.h @@ -0,0 +1,36 @@ +#pragma once +#include "../public SDK/ISteamScreenshots001.h" + +class SteamScreenshotsIn001 : public ISteamScreenshots001 +{ +public: + ScreenshotHandle WriteScreenshot(void* pubRGB, uint32 cubRGB, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + ScreenshotHandle AddScreenshotToLibrary(const char* pchFilename, const char* pchThumbnailFilename, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + void TriggerScreenshot() + { + return; + } + + void HookScreenshots(bool bHook) + { + return; + } + + bool SetLocation(ScreenshotHandle hScreenshot, const char* pchLocation) + { + return false; + } + + bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamScreenshots002.h b/src/InterfacesEmulation/SteamScreenshots002.h new file mode 100644 index 0000000..2d96382 --- /dev/null +++ b/src/InterfacesEmulation/SteamScreenshots002.h @@ -0,0 +1,41 @@ +#pragma once +#include "../public SDK/ISteamScreenshots002.h" + +class SteamScreenshotsIn002 : public ISteamScreenshots002 +{ +public: + ScreenshotHandle WriteScreenshot(void* pubRGB, uint32 cubRGB, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + ScreenshotHandle AddScreenshotToLibrary(const char* pchFilename, const char* pchThumbnailFilename, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + void TriggerScreenshot() + { + return; + } + + void HookScreenshots(bool bHook) + { + return; + } + + bool SetLocation(ScreenshotHandle hScreenshot, const char* pchLocation) + { + return false; + } + + bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID) + { + return false; + } + + bool TagPublishedFile(ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamScreenshots003.h b/src/InterfacesEmulation/SteamScreenshots003.h new file mode 100644 index 0000000..7995382 --- /dev/null +++ b/src/InterfacesEmulation/SteamScreenshots003.h @@ -0,0 +1,51 @@ +#pragma once +#include "../public SDK/ISteamScreenshots003.h" + +class SteamScreenshotsIn003 : public ISteamScreenshots003 +{ +public: + ScreenshotHandle WriteScreenshot(void* pubRGB, uint32 cubRGB, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + ScreenshotHandle AddScreenshotToLibrary(const char* pchFilename, const char* pchThumbnailFilename, int nWidth, int nHeight) + { + return INVALID_SCREENSHOT_HANDLE; + } + + void TriggerScreenshot() + { + return; + } + + void HookScreenshots(bool bHook) + { + return; + } + + bool SetLocation(ScreenshotHandle hScreenshot, const char* pchLocation) + { + return false; + } + + bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID) + { + return false; + } + + bool TagPublishedFile(ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID) + { + return false; + } + + bool IsScreenshotsHooked() + { + return false; + } + + ScreenshotHandle AddVRScreenshotToLibrary(int eType, const char* pchFilename, const char* pchVRFilename) + { + return INVALID_SCREENSHOT_HANDLE; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC001.h b/src/InterfacesEmulation/SteamUGC001.h new file mode 100644 index 0000000..dcf184b --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC001.h @@ -0,0 +1,71 @@ +#pragma once +#include "../public SDK/ISteamUGC001.h" + +class SteamUGCIn001 : public ISteamUGC001 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC002.h b/src/InterfacesEmulation/SteamUGC002.h new file mode 100644 index 0000000..4d1e421 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC002.h @@ -0,0 +1,145 @@ +#pragma once +#include "../public SDK/ISteamUGC002.h" + +class SteamUGCIn002 : public ISteamUGC002 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize) + { + return false; + } + bool GetItemUpdateInfo(PublishedFileId_t nPublishedFileID, bool* pbNeedsUpdate, bool* pbIsDownloading, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC003.h b/src/InterfacesEmulation/SteamUGC003.h new file mode 100644 index 0000000..830408c --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC003.h @@ -0,0 +1,145 @@ +#pragma once +#include "../public SDK/ISteamUGC003.h" + +class SteamUGCIn003 : public ISteamUGC003 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, bool* pbLegacyItem) + { + return false; + } + bool GetItemUpdateInfo(PublishedFileId_t nPublishedFileID, bool* pbNeedsUpdate, bool* pbIsDownloading, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC004.h b/src/InterfacesEmulation/SteamUGC004.h new file mode 100644 index 0000000..d6a8712 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC004.h @@ -0,0 +1,156 @@ +#pragma once +#include "../public SDK/ISteamUGC004.h" + +class SteamUGCIn004 : public ISteamUGC004 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC005.h b/src/InterfacesEmulation/SteamUGC005.h new file mode 100644 index 0000000..5558788 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC005.h @@ -0,0 +1,209 @@ +#pragma once +#include "../public SDK/ISteamUGC005.h" + +class SteamUGCIn005 : public ISteamUGC005 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32* pStatValue) + { + return false; + } + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, bool* pbIsImage) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC007.h b/src/InterfacesEmulation/SteamUGC007.h new file mode 100644 index 0000000..6735a2b --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC007.h @@ -0,0 +1,259 @@ +#pragma once +#include "../public SDK/ISteamUGC007.h" + +class SteamUGCIn007 : public ISteamUGC007 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32* pStatValue) + { + return false; + } + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, bool* pbIsImage) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + + void SuspendDownloads(bool bSuspend) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC008.h b/src/InterfacesEmulation/SteamUGC008.h new file mode 100644 index 0000000..539be27 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC008.h @@ -0,0 +1,292 @@ +#pragma once +#include "../public SDK/ISteamUGC008.h" + +class SteamUGCIn008 : public ISteamUGC008 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32* pStatValue) + { + return false; + } + + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchUpdateLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetadata) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) + { + return false; + } + bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) + { + return false; + } + bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) + { + return false; + } + bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) + { + return false; + } + bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + void SuspendDownloads(bool bSuspend) + { + return; + } + + SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC009.h b/src/InterfacesEmulation/SteamUGC009.h new file mode 100644 index 0000000..ad916b9 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC009.h @@ -0,0 +1,296 @@ +#pragma once +#include "../public SDK/ISteamUGC009.h" + +class SteamUGCIn009 : public ISteamUGC009 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64* pStatValue) + { + return false; + } + + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchUpdateLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetadata) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + + bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) + { + return false; + } + bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) + { + return false; + } + bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) + { + return false; + } + bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) + { + return false; + } + bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) + { + return false; + } + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + void SuspendDownloads(bool bSuspend) + { + return; + } + + SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC010.h b/src/InterfacesEmulation/SteamUGC010.h new file mode 100644 index 0000000..f971feb --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC010.h @@ -0,0 +1,338 @@ +#pragma once +#include "../public SDK/ISteamUGC010.h" + +class SteamUGCIn010 : public ISteamUGC010 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchURLSize) char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchMetadatasize) char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64* pStatValue) + { + return false; + } + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, OUT_STRING_COUNT(cchURLSize) char* pchURLOrVideoID, uint32 cchURLSize, OUT_STRING_COUNT(cchURLSize) char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, OUT_STRING_COUNT(cchKeySize) char* pchKey, uint32 cchKeySize, OUT_STRING_COUNT(cchValueSize) char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) + { + return false; + } + bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) + { + return false; + } + bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) + { + return false; + } + bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) + { + return false; + } + bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) + { + return false; + } + + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, OUT_STRING_COUNT(cchFolderSize) char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + + void SuspendDownloads(bool bSuspend) + { + return; + } + + SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + return NULL; + } + + SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + + SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + + SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC012.h b/src/InterfacesEmulation/SteamUGC012.h new file mode 100644 index 0000000..2944587 --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC012.h @@ -0,0 +1,346 @@ +#pragma once +#include "../public SDK/ISteamUGC012.h" + +class SteamUGCIn012 : public ISteamUGC012 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char* pchCursor = NULL) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64* pStatValue) + { + return false; + } + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) + { + return false; + } + bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) + { + return false; + } + bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) + { + return false; + } + bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) + { + return false; + } + bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) + { + return false; + } + + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + + void SuspendDownloads(bool bSuspend) + { + return; + } + + SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + return NULL; + } + + SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + + SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + + SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUGC013.h b/src/InterfacesEmulation/SteamUGC013.h new file mode 100644 index 0000000..b8555aa --- /dev/null +++ b/src/InterfacesEmulation/SteamUGC013.h @@ -0,0 +1,344 @@ +#pragma once +#include "../public SDK/ISteamUGC013.h" + +class SteamUGCIn013 : public ISteamUGC013 +{ +public: + UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char* pchCursor = NULL) + { + return NULL; + } + + UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + + SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + return NULL; + } + + bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) + { + return false; + } + bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) + { + return false; + } + bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) + { + return false; + } + bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return false; + } + bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64* pStatValue) + { + return false; + } + uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) + { + return false; + } + uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) + { + return NULL; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) + { + return false; + } + bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, const char* pchKey, char* pchValue, uint32 cchValueSize) + { + return false; + } + + bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + return false; + } + + bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) + { + return false; + } + bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + return false; + } + bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + return false; + } + bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + return false; + } + bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + return false; + } + bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + return false; + } + bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + return false; + } + bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) + { + return false; + } + + bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + return false; + } + bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) + { + return false; + } + bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) + { + return false; + } + bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) + { + return false; + } + + SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) + { + return NULL; + } + + SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + return NULL; + } + + UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) + { + return false; + } + bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) + { + return false; + } + bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchLanguage) + { + return false; + } + bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) + { + return false; + } + bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + return false; + } + bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) + { + return false; + } + bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) + { + return false; + } + bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) + { + return false; + } + bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload) + { + return false; + } + bool RemoveAllItemKeyValueTags(UGCUpdateHandle_t handle) + { + return false; + } + bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) + { + return false; + } + bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) + { + return false; + } + bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) + { + return false; + } + bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) + { + return false; + } + bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) + { + return false; + } + bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) + { + return false; + } + + SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) + { + return NULL; + } + EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) + { + return k_EItemUpdateStatusInvalid; + } + + SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + return NULL; + } + SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + uint32 GetNumSubscribedItems() + { + return NULL; + } + uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) + { + return NULL; + } + + uint32 GetItemState(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) + { + return false; + } + + bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) + { + return false; + } + + bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + return false; + } + + bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + + void SuspendDownloads(bool bSuspend) + { + return; + } + + SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) + { + return NULL; + } + SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + return NULL; + } + + SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + return NULL; + } + + SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + return NULL; + } + SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) + { + return NULL; + } + + SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUnifiedMessages001.h b/src/InterfacesEmulation/SteamUnifiedMessages001.h new file mode 100644 index 0000000..26f0c3e --- /dev/null +++ b/src/InterfacesEmulation/SteamUnifiedMessages001.h @@ -0,0 +1,31 @@ +#pragma once +#include "../public SDK/ISteamUnifiedMessages001.h" + +class SteamUnifiedMessagesIn001 : public ISteamUnifiedMessages001 +{ +public: + ClientUnifiedMessageHandle SendMethod(const char* pchServiceMethod, const void* pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext) + { + return NULL; + } + + bool GetMethodResponseInfo(ClientUnifiedMessageHandle hHandle, uint32* punResponseSize, EResult* peResult) + { + return false; + } + + bool GetMethodResponseData(ClientUnifiedMessageHandle hHandle, void* pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease) + { + return false; + } + + bool ReleaseMethod(ClientUnifiedMessageHandle hHandle) + { + return false; + } + + bool SendNotification(const char* pchServiceNotification, const void* pNotificationBuffer, uint32 unNotificationBufferSize) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser004.h b/src/InterfacesEmulation/SteamUser004.h new file mode 100644 index 0000000..41698c2 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser004.h @@ -0,0 +1,129 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser004.h" + + +class SteamUserIn004 : public ISteamUser004 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + void LogOn(CSteamID steamID) + { + return; + } + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + ELogonState GetLogonState() + { + return k_ELogonStateLoggedOn; + } + bool BConnected() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID((uint64)Steam_Config::UserID); + } + + bool IsVACBanned(EVACBan eVACBan) + { + return false; + } + + bool RequireShowVACBannedMessage(EVACBan eVACBan) + { + return false; + } + + void AcknowledgeVACBanning(EVACBan eVACBan) + { + return; + } + + OBSOLETE_FUNCTION int NClientGameIDAdd(int nGameID) + { + return NULL; + } + OBSOLETE_FUNCTION void RemoveClientGame(int nClientGameID) + { + return; + } + OBSOLETE_FUNCTION void SetClientGameServer(int nClientGameID, uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void SetSteam2Ticket(uint8* pubTicket, int cubTicket) + { + return; + } + OBSOLETE_FUNCTION void AddServerNetAddress(uint32 unIP, uint16 unPort) + { + return; + } + + bool SetEmail(const char* pchEmail) + { + return true; + } + + OBSOLETE_FUNCTION int GetSteamGameConnectToken(void* pBlob, int cbMaxBlob) + { + return NULL; + } + + bool SetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, const char* pchValue) + { + return false; + } + bool GetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, char* pchValue, int cbValue) + { + return false; + } + bool SetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int iValue) + { + return false; + } + bool GetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int* piValue) + { + return false; + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void SetSelfAsPrimaryChatDestination() + { + return; + } + bool IsPrimaryChatDestination() + { + return true; + } + + void RequestLegacyCDKey(AppId_t iAppID) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamUser005.h b/src/InterfacesEmulation/SteamUser005.h new file mode 100644 index 0000000..60a76a7 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser005.h @@ -0,0 +1,188 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser005.h" + + +class SteamUserIn005 : public ISteamUser005 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + void LogOn(CSteamID steamID) + { + return; + } + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + ELogonState GetLogonState() + { + return k_ELogonStateNotLoggedOn; + } + bool BConnected() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + bool IsVACBanned(EVACBan eVACBan) + { + return false; + } + + bool RequireShowVACBannedMessage(EVACBan eVACBan) + { + return false; + } + + void AcknowledgeVACBanning(EVACBan eVACBan) + { + return; + } + + void SetSteam2Ticket(uint8* pubTicket, int cubTicket) + { + return; + } + OBSOLETE_FUNCTION void AddServerNetAddress(uint32 unIP, uint16 unPort) + { + return; + } + + bool SetEmail(const char* pchEmail) + { + return true; + } + + + bool SetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, const char* pchValue) + { + return false; + } + bool GetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, char* pchValue, int cbValue) + { + return false; + } + bool SetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int iValue) + { + return false; + } + bool GetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int* piValue) + { + return false; + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void SetSelfAsPrimaryChatDestination() + { + return; + } + bool IsPrimaryChatDestination() + { + return true; + } + + void RequestLegacyCDKey(AppId_t iAppID) + { + return; + } + + bool SendGuestPassByEmail(const char* pchEmailAccount, GID_t gidGuestPassID, bool bResending) + { + return false; + } + bool SendGuestPassByAccountID(uint32 uAccountID, GID_t gidGuestPassID, bool bResending) + { + return false; + } + + bool AckGuestPass(const char* pchGuestPassCode) + { + return false; + } + bool RedeemGuestPass(const char* pchGuestPassCode) + { + return false; + } + + uint32 GetGuestPassToGiveCount() + { + return NULL; + } + uint32 GetGuestPassToRedeemCount() + { + return NULL; + } + uint32 GetGuestPassLastUpdateTime() + { + return NULL; + } + + bool GetGuestPassToGiveInfo(uint32 nPassIndex, GID_t* pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed, char* pchRecipientAddress, int cRecipientAddressSize) + { + return false; + } + bool GetGuestPassToRedeemInfo(uint32 nPassIndex, GID_t* pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed) + { + return false; + } + bool GetGuestPassToRedeemSenderAddress(uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize) + { + return false; + } + bool GetGuestPassToRedeemSenderName(uint32 nPassIndex, char* pchSenderName, int cSenderNameSize) + { + return false; + } + void AcknowledgeMessageByGID(const char* pchMessageGID) + { + return; + } + + bool SetLanguage(const char* pchLanguage) + { + return (lstrcpyA(Steam_Config::Language, pchLanguage) != NULL); // Return boolean value (: + } + + void TrackAppUsageEvent(CGameID gameID, EAppUsageEvent eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + void SetAccountName(const char* pchAccountName) + { + return; + } + void SetPassword(const char* pchPassword) + { + return; + } + + void SetAccountCreationTime(RTime32 rtime32Time) + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamUser006.h b/src/InterfacesEmulation/SteamUser006.h new file mode 100644 index 0000000..69a44ce --- /dev/null +++ b/src/InterfacesEmulation/SteamUser006.h @@ -0,0 +1,64 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser006.h" + + +class SteamUserIn006 : public ISteamUser006 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + void LogOn(CSteamID steamID) + { + return; + } + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + bool SetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, const char* pchValue) + { + return false; + } + bool GetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, char* pchValue, int cbValue) + { + return false; + } + bool SetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int iValue) + { + return false; + } + bool GetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int* piValue) + { + return false; + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, EAppUsageEvent eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } +}; diff --git a/src/InterfacesEmulation/SteamUser007.h b/src/InterfacesEmulation/SteamUser007.h new file mode 100644 index 0000000..9dea6be --- /dev/null +++ b/src/InterfacesEmulation/SteamUser007.h @@ -0,0 +1,69 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser007.h" + + +class SteamUserIn007 : public ISteamUser007 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + void LogOn(CSteamID steamID) + { + return; + } + void LogOff() + { + return; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + bool SetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, const char* pchValue) + { + return false; + } + bool GetRegistryString(ERegistrySubTree eRegistrySubTree, const char* pchKey, char* pchValue, int cbValue) + { + return false; + } + bool SetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int iValue) + { + return false; + } + bool GetRegistryInt(ERegistrySubTree eRegistrySubTree, const char* pchKey, int* piValue) + { + return false; + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void* pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, EAppUsageEvent eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + void RefreshSteam2Login() + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser008.h b/src/InterfacesEmulation/SteamUser008.h new file mode 100644 index 0000000..fd1cedc --- /dev/null +++ b/src/InterfacesEmulation/SteamUser008.h @@ -0,0 +1,43 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser008.h" + + +class SteamUserIn008 : public ISteamUser008 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void* pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, EAppUsageEvent eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + void RefreshSteam2Login() + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser009.h b/src/InterfacesEmulation/SteamUser009.h new file mode 100644 index 0000000..0bc6bd0 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser009.h @@ -0,0 +1,43 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser009.h" + + +class SteamUserIn009 : public ISteamUser009 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + void RefreshSteam2Login() + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser010.h b/src/InterfacesEmulation/SteamUser010.h new file mode 100644 index 0000000..6eca9c9 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser010.h @@ -0,0 +1,38 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser010.h" + + +class SteamUserIn010 : public ISteamUser010 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pBlob, int cbMaxBlob, CSteamID steamID, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser011.h b/src/InterfacesEmulation/SteamUser011.h new file mode 100644 index 0000000..ec599e9 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser011.h @@ -0,0 +1,66 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser011.h" + + +class SteamUserIn011 : public ISteamUser011 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetCompressedVoice(void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser012.h b/src/InterfacesEmulation/SteamUser012.h new file mode 100644 index 0000000..133c727 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser012.h @@ -0,0 +1,90 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser012.h" + +class SteamUserIn012 : public ISteamUser012 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetCompressedVoice(void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser013.h b/src/InterfacesEmulation/SteamUser013.h new file mode 100644 index 0000000..ded4600 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser013.h @@ -0,0 +1,100 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser013.h" + +class SteamUserIn013 : public ISteamUser013 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed) + { + return k_EVoiceResultNoData; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser014.h b/src/InterfacesEmulation/SteamUser014.h new file mode 100644 index 0000000..12a21ce --- /dev/null +++ b/src/InterfacesEmulation/SteamUser014.h @@ -0,0 +1,127 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser014.h" +class SteamUserIn014 : public ISteamUser014 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed) + { + return k_EVoiceResultNoData; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten) + { + return k_EVoiceResultNoData; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID ); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser015.h b/src/InterfacesEmulation/SteamUser015.h new file mode 100644 index 0000000..b6f8c40 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser015.h @@ -0,0 +1,133 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser015.h" +class SteamUserIn015 : public ISteamUser015 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, EAppUsageEvent eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed) + { + return k_EVoiceResultNoData; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nSamplesPerSec) + { + return k_EVoiceResultNoData; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + ///static unsigned char TicketData[128]; + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser016.h b/src/InterfacesEmulation/SteamUser016.h new file mode 100644 index 0000000..5ef53b0 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser016.h @@ -0,0 +1,133 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser016.h" +class SteamUserIn016 : public ISteamUser016 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } +/// static unsigned char TicketData[128]; + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser017.h b/src/InterfacesEmulation/SteamUser017.h new file mode 100644 index 0000000..a78dcac --- /dev/null +++ b/src/InterfacesEmulation/SteamUser017.h @@ -0,0 +1,143 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser017.h" +class SteamUserIn017 : public ISteamUser017 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nDesiredSampleRate) + { + return k_EVoiceResultNoData; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + ///static unsigned char TicketData[128]; + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } + + int GetGameBadgeLevel(int nSeries, bool bFoil) + { + return NULL; + } + + int GetPlayerSteamLevel() + { + return 10; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser018.h b/src/InterfacesEmulation/SteamUser018.h new file mode 100644 index 0000000..6a38fdd --- /dev/null +++ b/src/InterfacesEmulation/SteamUser018.h @@ -0,0 +1,149 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser018.h" +class SteamUserIn018 : public ISteamUser018 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultOK; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32* nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate) + { + return k_EVoiceResultOK; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nDesiredSampleRate) + { + return k_EVoiceResultOK; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + + + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } + + int GetGameBadgeLevel(int nSeries, bool bFoil) + { + return NULL; + } + + int GetPlayerSteamLevel() + { + return 10; + } + + SteamAPICall_t RequestStoreAuthURL(const char* pchRedirectURL) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser019.h b/src/InterfacesEmulation/SteamUser019.h new file mode 100644 index 0000000..28d7a37 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser019.h @@ -0,0 +1,169 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser019.h" + +class SteamUserIn019 : public ISteamUser019 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0) + { + return k_EVoiceResultOK; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed_Deprecated = false, void* pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32* nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0) + { + return k_EVoiceResultOK; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nDesiredSampleRate) + { + return k_EVoiceResultOK; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } + + int GetGameBadgeLevel(int nSeries, bool bFoil) + { + return NULL; + } + + int GetPlayerSteamLevel() + { + return 10; + } + + SteamAPICall_t RequestStoreAuthURL(const char* pchRedirectURL) + { + return NULL; + } + + bool BIsPhoneVerified() + { + return true; + } + + bool BIsTwoFactorEnabled() + { + return true; + } + + bool BIsPhoneIdentifying() + { + return false; + } + + bool BIsPhoneRequiringVerification() + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUser020.h b/src/InterfacesEmulation/SteamUser020.h new file mode 100644 index 0000000..1413711 --- /dev/null +++ b/src/InterfacesEmulation/SteamUser020.h @@ -0,0 +1,173 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUser020.h" + +class SteamUserIn020 : public ISteamUser020 +{ +public: + HSteamUser GetHSteamUser() + { + return NULL; + } + + bool BLoggedOn() + { + return Steam_Config::OnlineMod; + } + + CSteamID GetSteamID() + { + return CSteamID(Steam_Config::UserID); + } + + int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) + { + return cbMaxAuthBlob; + } + + void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) + { + return; + } + + void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, const char* pchExtraInfo = "") + { + return; + } + + bool GetUserDataFolder(char* pchBuffer, int cubBuffer) + { + const char* mydir = ColdAPI_Storage::GetStorageDirectory(); + + std::memcpy(pchBuffer, mydir, cubBuffer); + return true; + } + + void StartVoiceRecording() + { + return; + } + + void StopVoiceRecording() + { + return; + } + + EVoiceResult GetAvailableVoice(uint32* pcbCompressed, uint32* pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0) + { + return k_EVoiceResultOK; + } + + EVoiceResult GetVoice(bool bWantCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, bool bWantUncompressed_Deprecated = false, void* pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32* nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0) + { + return k_EVoiceResultOK; + } + + EVoiceResult DecompressVoice(const void* pCompressed, uint32 cbCompressed, void* pDestBuffer, uint32 cbDestBufferSize, uint32* nBytesWritten, uint32 nDesiredSampleRate) + { + return k_EVoiceResultOK; + } + + uint32 GetVoiceOptimalSampleRate() + { + return NULL; + } + + HAuthTicket GetAuthSessionTicket(void* pTicket, int cbMaxTicket, uint32* pcbTicket) + { + return NULL; + } + + EBeginAuthSessionResult BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + return k_EBeginAuthSessionResultOK; + } + + void EndAuthSession(CSteamID steamID) + { + return; + } + + void CancelAuthTicket(HAuthTicket hAuthTicket) + { + return; + } + + EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + return k_EUserHasLicenseResultHasLicense; + } + + bool BIsBehindNAT() + { + return true; + } + + void AdvertiseGame(CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer) + { + return; + } + + SteamAPICall_t RequestEncryptedAppTicket(void* pDataToInclude, int cbDataToInclude) + { + + // Create a new fake ticket + + std::memset(TicketData, 0, sizeof(TicketData)); + std::memcpy(TicketData, pDataToInclude, min(cbDataToInclude, sizeof(TicketData))); + + auto RequestID = SteamCallback::RegisterCall(true); + auto Response = new EncryptedAppTicketResponse_t(); + + Response->m_eResult = k_EResultOK; + SteamCallback::CreateNewRequest(Response, sizeof(*Response), Response->k_iCallback, RequestID); + + return RequestID; + } + + bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, uint32 * pcbTicket) + { + std::memcpy(pTicket, TicketData, min(cbMaxTicket, (unsigned int)sizeof(TicketData))); + *pcbTicket = sizeof(TicketData); + return true; + } + + int GetGameBadgeLevel(int nSeries, bool bFoil) + { + return NULL; + } + + int GetPlayerSteamLevel() + { + return 10; + } + + SteamAPICall_t RequestStoreAuthURL(const char* pchRedirectURL) + { + return NULL; + } + + bool BIsPhoneVerified() + { + return true; + } + + bool BIsTwoFactorEnabled() + { + return true; + } + + bool BIsPhoneIdentifying() + { + return false; + } + + bool BIsPhoneRequiringVerification() + { + return false; + } + SteamAPICall_t GetMarketEligibility() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats001.h b/src/InterfacesEmulation/SteamUserStats001.h new file mode 100644 index 0000000..6579db0 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats001.h @@ -0,0 +1,130 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats001.h" + +class SteamUserStatsIn001 : public ISteamUserStats001 +{ +public: + uint32 GetNumStats(CGameID nGameID) + { + return NULL; + } + const char* GetStatName(CGameID nGameID, uint32 iStat) + { + return ""; + } + ESteamUserStatType GetStatType(CGameID nGameID, const char* pchName) + { + return k_ESteamUserStatTypeINT; + } + uint32 GetNumAchievements(CGameID nGameID) + { + return NULL; + } + const char* GetAchievementName(CGameID nGameID, uint32 iAchievement) + { + return "Achievement"; + } + + OBSOLETE_FUNCTION uint32 GetNumGroupAchievements(CGameID) + { + return NULL; + } + OBSOLETE_FUNCTION const char* GetGroupAchievementName(CGameID, uint32 iAchievement) + { + return "Achievement"; + } + + bool RequestCurrentStats(CGameID nGameID) + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(CGameID nGameID, const char* pchName, int32* pData) + { + return false; + } + bool GetStat(CGameID nGameID, const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(CGameID nGameID, const char* pchName, float* pData) + { + return false; + } + bool GetStat(CGameID nGameID, const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(CGameID nGameID, const char* pchName, int32 nData) + { + return false; + } + bool SetStat(CGameID nGameID, const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(CGameID nGameID, const char* pchName, float fData) + { + return false; + } + bool SetStat(CGameID nGameID, const char* pchName, int32 nData) + { + return false; + } +#endif + + bool UpdateAvgRateStat(CGameID nGameID, const char* pchName, float, double dSessionLength) + { + return false; + } + + bool GetAchievement(CGameID nGameID, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetGroupAchievement(CGameID nGameID, const char* pchName, bool* pbAchieved) + { + return false; + } + + bool SetAchievement(CGameID nGameID, const char* pchName) + { + return false; + } + bool SetGroupAchievement(CGameID nGameID, const char* pchName) + { + return false; + } + + bool StoreStats(CGameID nGameID) + { + return true; + } + + bool ClearAchievement(CGameID nGameID, const char* pchName) + { + return true; + } + bool ClearGroupAchievement(CGameID nGameID, const char* pchName) + { + return true; + } + + int GetAchievementIcon(CGameID nGameID, const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(CGameID nGameID, const char* pchName, const char* pchKey) + { + return ""; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats002.h b/src/InterfacesEmulation/SteamUserStats002.h new file mode 100644 index 0000000..a80d2e5 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats002.h @@ -0,0 +1,111 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats002.h" + +class SteamUserStatsIn002 : public ISteamUserStats002 +{ +public: + uint32 GetNumStats(CGameID nGameID) + { + return NULL; + } + const char* GetStatName(CGameID nGameID, uint32 iStat) + { + return ""; + } + ESteamUserStatType GetStatType(CGameID nGameID, const char* pchName) + { + return k_ESteamUserStatTypeINT; + } + uint32 GetNumAchievements(CGameID nGameID) + { + return NULL; + } + const char* GetAchievementName(CGameID nGameID, uint32 iAchievement) + { + return "Achievement"; + } + + bool RequestCurrentStats(CGameID nGameID) + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(CGameID nGameID, const char* pchName, int32* pData) + { + return false; + } + bool GetStat(CGameID nGameID, const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(CGameID nGameID, const char* pchName, float* pData) + { + return false; + } + bool GetStat(CGameID nGameID, const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(CGameID nGameID, const char* pchName, int32 nData) + { + return false; + } + bool SetStat(CGameID nGameID, const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(CGameID nGameID, const char* pchName, float fData) + { + return false; + } + bool SetStat(CGameID nGameID, const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(CGameID nGameID, const char* pchName, uint32 nCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(CGameID nGameID, const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(CGameID nGameID, const char* pchName) + { + return false; + } + bool ClearAchievement(CGameID nGameID, const char* pchName) + { + return true; + } + + bool StoreStats(CGameID nGameID) + { + return true; + } + + int GetAchievementIcon(CGameID nGameID, const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(CGameID nGameID, const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(CGameID nGameID, const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats003.h b/src/InterfacesEmulation/SteamUserStats003.h new file mode 100644 index 0000000..d57ff48 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats003.h @@ -0,0 +1,91 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats003.h" + +class SteamUserStatsIn003 : public ISteamUserStats003 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float, double dSessionLength) + { + return false; + } + + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats004.h b/src/InterfacesEmulation/SteamUserStats004.h new file mode 100644 index 0000000..d76cb62 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats004.h @@ -0,0 +1,127 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats004.h" + +class SteamUserStatsIn004 : public ISteamUserStats004 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool StoreStats() + { + return true; + } + + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats005.h b/src/InterfacesEmulation/SteamUserStats005.h new file mode 100644 index 0000000..367d50c --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats005.h @@ -0,0 +1,170 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats005.h" + +class SteamUserStatsIn005 : public ISteamUserStats005 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t* pLeaderboardEntry, int32* pDetails, int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, int32 nScore, int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats006.h b/src/InterfacesEmulation/SteamUserStats006.h new file mode 100644 index 0000000..d209aa7 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats006.h @@ -0,0 +1,178 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats006.h" + +class SteamUserStatsIn006 : public ISteamUserStats006 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + + +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return false; + } + + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t* pLeaderboardEntry, int32* pDetails, int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } +}; diff --git a/src/InterfacesEmulation/SteamUserStats007.h b/src/InterfacesEmulation/SteamUserStats007.h new file mode 100644 index 0000000..fdf248d --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats007.h @@ -0,0 +1,186 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats007.h" + +class SteamUserStatsIn007 : public ISteamUserStats007 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + + +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t* pLeaderboardEntry, int32* pDetails, int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats008.h b/src/InterfacesEmulation/SteamUserStats008.h new file mode 100644 index 0000000..fe1ed77 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats008.h @@ -0,0 +1,192 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats008.h" + +class SteamUserStatsIn008 : public ISteamUserStats008 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t* pLeaderboardEntry, int32* pDetails, int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t AttachLeaderboardUGC(SteamLeaderboard_t hSteamLeaderboard, uint64_t hUGC) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats009.h b/src/InterfacesEmulation/SteamUserStats009.h new file mode 100644 index 0000000..2946128 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats009.h @@ -0,0 +1,197 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats009.h" + +class SteamUserStatsIn009 : public ISteamUserStats009 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, const char* pchName, bool* pbAchieved, RTime32* prtTime) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + + SteamAPICall_t DownloadLeaderboardEntriesForUsers(SteamLeaderboard_t hSteamLeaderboard, CSteamID* prgUsers, int cUsers) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t* pLeaderboardEntry, int32* pDetails, int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t AttachLeaderboardUGC(SteamLeaderboard_t hSteamLeaderboard, uint64_t hUGC) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats010.h b/src/InterfacesEmulation/SteamUserStats010.h new file mode 100644 index 0000000..3062e3e --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats010.h @@ -0,0 +1,263 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats010.h" + +class SteamUserStatsIn010 : public ISteamUserStats010 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, uint32* punUnlockTime) + { + return false; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, const char* pchName, bool* pbAchieved, uint32* punUnlockTime) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + SteamAPICall_t DownloadLeaderboardEntriesForUsers(SteamLeaderboard_t hSteamLeaderboard, CSteamID* prgUsers, int cUsers) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t* pLeaderboardEntry, int32 pDetails[], int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t AttachLeaderboardUGC(SteamLeaderboard_t hSteamLeaderboard, uint64_t hUGC) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } + + SteamAPICall_t RequestGlobalAchievementPercentages() + { + return NULL; + } + + int GetMostAchievedAchievementInfo(char* pchName, uint32 unNameBufLen, float* pflPercent, bool* pbAchieved) + { + return NULL; + } + + int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, uint32 unNameBufLen, float* pflPercent, bool* pbAchieved) + { + return NULL; + } + + bool GetAchievementAchievedPercent(const char* pchName, float* pflPercent) + { + return false; + } + + SteamAPICall_t RequestGlobalStats(int nHistoryDays) + { + return NULL; + } + + // Gets the lifetime totals for an aggregated stat +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetGlobalStat(const char* pchStatName, int64* pData) + { + return false; + } + bool GetGlobalStat(const char* pchStatName, double* pData) + { + return false; + } +#else + bool GetGlobalStat(const char* pchStatName, double* pData) + { + return false; + } + bool GetGlobalStat(const char* pchStatName, int64* pData) + { + return false; + } +#endif + + // Gets history for an aggregated stat. pData will be filled with daily values, starting with today. + // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, + // etc. cubData is the size in bytes of the pubData buffer. Returns the number of + // elements actually set. +#if !(defined(_WIN32) && defined(__GNUC__)) + int32 GetGlobalStatHistory(const char* pchStatName, int64* pData, uint32 cubData) + { + return NULL; + } + int32 GetGlobalStatHistory(const char* pchStatName, double* pData, uint32 cubData) + { + return NULL; + } +#else + int32 GetGlobalStatHistory(const char* pchStatName, double* pData, uint32 cubData) + { + return NULL; + } + int32 GetGlobalStatHistory(const char* pchStatName, int64* pData, uint32 cubData) + { + return NULL; + } +#endif +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUserStats011.h b/src/InterfacesEmulation/SteamUserStats011.h new file mode 100644 index 0000000..455d682 --- /dev/null +++ b/src/InterfacesEmulation/SteamUserStats011.h @@ -0,0 +1,273 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUserStats011.h" + +class SteamUserStatsIn011 : public ISteamUserStats011 +{ +public: + bool RequestCurrentStats() + { + return true; + } + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetStat(const char* pchName, int32* pData) + { + return false; + } + bool GetStat(const char* pchName, float* pData) + { + return false; + } +#else + bool GetStat(const char* pchName, float* pData) + { + return false; + } + bool GetStat(const char* pchName, int32* pData) + { + return false; + } +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + bool SetStat(const char* pchName, int32 nData) + { + return false; + } + bool SetStat(const char* pchName, float fData) + { + return false; + } +#else + bool SetStat(const char* pchName, float fData) + { + return false; + } + bool SetStat(const char* pchName, int32 nData) + { + return false; + } +#endif + bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength) + { + return false; + } + + bool GetAchievement(const char* pchName, bool* pbAchieved) + { + return false; + } + bool SetAchievement(const char* pchName) + { + return false; + } + bool ClearAchievement(const char* pchName) + { + return true; + } + + bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, uint32* punUnlockTime) + { + return false; + } + + bool StoreStats() + { + return true; + } + + int GetAchievementIcon(const char* pchName) + { + return NULL; + } + const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey) + { + return ""; + } + + bool IndicateAchievementProgress(const char* pchName, uint32 nCurProgress, uint32 nMaxProgress) + { + return false; + } + + uint32 GetNumAchievements() + { + return NULL; + } + const char* GetAchievementName(uint32 iAchievement) + { + return ""; + } + + SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + return NULL; + } + + +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } +#else + bool GetUserStat(CSteamID steamIDUser, const char* pchName, float* pData) + { + return false; + } + bool GetUserStat(CSteamID steamIDUser, const char* pchName, int32* pData) + { + return false; + } +#endif + bool GetUserAchievement(CSteamID steamIDUser, const char* pchName, bool* pbAchieved) + { + return false; + } + bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, const char* pchName, bool* pbAchieved, uint32* punUnlockTime) + { + return false; + } + + bool ResetAllStats(bool bAchievementsToo) + { + return true; + } + + SteamAPICall_t FindOrCreateLeaderboard(const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + return NULL; + } + + SteamAPICall_t FindLeaderboard(const char* pchLeaderboardName) + { + return NULL; + } + + const char* GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + return ""; + } + + int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + return NULL; + } + + ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardSortMethodNone; + } + + ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + return k_ELeaderboardDisplayTypeNone; + } + + SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + return NULL; + } + SteamAPICall_t DownloadLeaderboardEntriesForUsers(SteamLeaderboard_t hSteamLeaderboard, CSteamID* prgUsers, int cUsers) + { + return NULL; + } + + bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t* pLeaderboardEntry, int32 pDetails[], int cDetailsMax) + { + return false; + } + + SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32* pScoreDetails, int cScoreDetailsCount) + { + return NULL; + } + + SteamAPICall_t AttachLeaderboardUGC(SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC) + { + return NULL; + } + + SteamAPICall_t GetNumberOfCurrentPlayers() + { + return NULL; + } + + SteamAPICall_t RequestGlobalAchievementPercentages() + { + return NULL; + } + + int GetMostAchievedAchievementInfo(char* pchName, uint32 unNameBufLen, float* pflPercent, bool* pbAchieved) + { + return NULL; + } + + int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, uint32 unNameBufLen, float* pflPercent, bool* pbAchieved) + { + return NULL; + } + + bool GetAchievementAchievedPercent(const char* pchName, float* pflPercent) + { + return false; + } + + SteamAPICall_t RequestGlobalStats(int nHistoryDays) + { + return NULL; + } + + // Gets the lifetime totals for an aggregated stat +#if !(defined(_WIN32) && defined(__GNUC__)) + bool GetGlobalStat(const char* pchStatName, int64* pData) + { + return false; + } + bool GetGlobalStat(const char* pchStatName, double* pData) + { + return false; + } +#else + bool GetGlobalStat(const char* pchStatName, double* pData) + { + return false; + } + bool GetGlobalStat(const char* pchStatName, int64* pData) + { + return false; + } +#endif + + // Gets history for an aggregated stat. pData will be filled with daily values, starting with today. + // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, + // etc. cubData is the size in bytes of the pubData buffer. Returns the number of + // elements actually set. +#if !(defined(_WIN32) && defined(__GNUC__)) + int32 GetGlobalStatHistory(const char* pchStatName, int64* pData, uint32 cubData) + { + return NULL; + } + int32 GetGlobalStatHistory(const char* pchStatName, double* pData, uint32 cubData) + { + return NULL; + } +#else + int32 GetGlobalStatHistory(const char* pchStatName, double* pData, uint32 cubData) + { + return NULL; + } + int32 GetGlobalStatHistory(const char* pchStatName, int64* pData, uint32 cubData) + { + return NULL; + } +#endif + +}; diff --git a/src/InterfacesEmulation/SteamUtils001.h b/src/InterfacesEmulation/SteamUtils001.h new file mode 100644 index 0000000..ad523fa --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils001.h @@ -0,0 +1,28 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils001.h" + +class SteamUtilsIn001 : public ISteamUtils001 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return NULL; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils002.h b/src/InterfacesEmulation/SteamUtils002.h new file mode 100644 index 0000000..c9ac7e3 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils002.h @@ -0,0 +1,74 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils002.h" + +class SteamUtilsIn002 : public ISteamUtils002 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + uint32 GetAppID() + { + return Steam_Config::AppId; + } + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils003.h b/src/InterfacesEmulation/SteamUtils003.h new file mode 100644 index 0000000..fc64ee4 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils003.h @@ -0,0 +1,91 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils003.h" + +class SteamUtilsIn003 : public ISteamUtils003 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return 10; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils004.h b/src/InterfacesEmulation/SteamUtils004.h new file mode 100644 index 0000000..ace4007 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils004.h @@ -0,0 +1,96 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils004.h" + +class SteamUtilsIn004 : public ISteamUtils004 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + RTime32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return 10; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils005.h b/src/InterfacesEmulation/SteamUtils005.h new file mode 100644 index 0000000..81b7199 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils005.h @@ -0,0 +1,119 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils005.h" + +class SteamUtilsIn005 : public ISteamUtils005 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return 10; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } + + bool BOverlayNeedsPresent() + { + return ColdAPI_General::OverlayNeedsPresent(); + } + + SteamAPICall_t CheckFileSignature(const char* szFileName) + { + return k_ECheckFileSignatureValidSignature; + } + + bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eInputLineMode, const char* szText, uint32 uMaxLength) + { + return true; + } + uint32 GetEnteredGamepadTextLength() + { + return NULL; + } + bool GetEnteredGamepadTextInput(char* pchValue, uint32 cchValueMax) + { + return true; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils006.h b/src/InterfacesEmulation/SteamUtils006.h new file mode 100644 index 0000000..6b62cea --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils006.h @@ -0,0 +1,129 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils006.h" + +class SteamUtilsIn006 : public ISteamUtils006 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return 10; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } + + bool BOverlayNeedsPresent() + { + return ColdAPI_General::OverlayNeedsPresent(); + } + + SteamAPICall_t CheckFileSignature(const char* szFileName) + { + return k_ECheckFileSignatureValidSignature; + } + + bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eInputLineMode, const char* szText, uint32 uMaxLength) + { + return true; + } + uint32 GetEnteredGamepadTextLength() + { + return NULL; + } + bool GetEnteredGamepadTextInput(char* pchValue, uint32 cchValueMax) + { + return true; + } + + const char* GetSteamUILanguage() + { + return Steam_Config::Language; + } + + bool IsSteamRunningInVR() + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils007.h b/src/InterfacesEmulation/SteamUtils007.h new file mode 100644 index 0000000..6bab516 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils007.h @@ -0,0 +1,134 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils007.h" + +class SteamUtilsIn007 : public ISteamUtils007 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return 10; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } + + bool BOverlayNeedsPresent() + { + return ColdAPI_General::OverlayNeedsPresent(); + } + + SteamAPICall_t CheckFileSignature(const char* szFileName) + { + return k_ECheckFileSignatureValidSignature; + } + + bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eInputLineMode, const char* pchDescription, uint32 unCharMax, const char* pchExistingText) + { + return false; + } + uint32 GetEnteredGamepadTextLength() + { + return NULL; + } + bool GetEnteredGamepadTextInput(char* pchValue, uint32 cchValueMax) + { + return true; + } + + const char* GetSteamUILanguage() + { + return Steam_Config::Language; + } + + bool IsSteamRunningInVR() + { + return false; + } + + void SetOverlayNotificationInset(int32, int32) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils008.h b/src/InterfacesEmulation/SteamUtils008.h new file mode 100644 index 0000000..c1d40b3 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils008.h @@ -0,0 +1,145 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils008.h" + +class SteamUtilsIn008 : public ISteamUtils008 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } + + bool BOverlayNeedsPresent() + { + return ColdAPI_General::OverlayNeedsPresent(); + } + + SteamAPICall_t CheckFileSignature(const char* szFileName) + { + return k_ECheckFileSignatureValidSignature; + } + + bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char* pchDescription, uint32 unCharMax, const char* pchExistingText) + { + return false; + } + + uint32 GetEnteredGamepadTextLength() + { + return NULL; + } + bool GetEnteredGamepadTextInput(char* pchText, uint32 cchText) + { + return true; + } + + const char* GetSteamUILanguage() + { + return Steam_Config::Language; + } + + bool IsSteamRunningInVR() + { + return false; + } + + void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) + { + return; + } + + bool IsSteamInBigPictureMode() + { + return false; + } + + void StartVRDashboard() + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamUtils009.h b/src/InterfacesEmulation/SteamUtils009.h new file mode 100644 index 0000000..051b266 --- /dev/null +++ b/src/InterfacesEmulation/SteamUtils009.h @@ -0,0 +1,155 @@ +#pragma once +#include "../Bridge.h" +#include "../public SDK/ISteamUtils009.h" + +class SteamUtilsIn009 : public ISteamUtils009 +{ +public: + uint32 GetSecondsSinceAppActive() + { + return 10; + } + uint32 GetSecondsSinceComputerActive() + { + return 10; + } + + EUniverse GetConnectedUniverse() + { + return k_EUniverseInternal; + } + + uint32 GetServerRealTime() + { + // Return fake time milliseconds + + return (uint32)std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + } + + const char* GetIPCountry() + { + return ColdAPI_General::GetCountryFromLanguage(Steam_Config::Language); + } + + bool GetImageSize(int iImage, uint32* pnWidth, uint32* pnHeight) + { + return false; + } + + bool GetImageRGBA(int iImage, uint8* pubDest, int nDestBufferSize) + { + return false; + } + + bool GetCSERIPPort(uint32* unIP, uint16* usPort) + { + return false; + } + + uint8 GetCurrentBatteryPower() + { + return 10; + } + + uint32 GetAppID() + { + return Steam_Config::AppId; + } + + void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + ColdAPI_General::SetOverlayNotification(eNotificationPosition); + } + + bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, bool* pbFailed) + { + return true; + } + ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + return k_ESteamAPICallFailureNone; + } + bool GetAPICallResult(SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed) + { + return true; + } + + void RunFrame() + { + return; + } + + uint32 GetIPCCallCount() + { + return NULL; + } + + void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + return; + } + + bool IsOverlayEnabled() + { + return ColdAPI_General::IsOverlayNeededOrEnabled(); + } + + bool BOverlayNeedsPresent() + { + return ColdAPI_General::OverlayNeedsPresent(); + } + + SteamAPICall_t CheckFileSignature(const char* szFileName) + { + return k_ECheckFileSignatureValidSignature; + } + + bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char* pchDescription, uint32 unCharMax, const char* pchExistingText) + { + return false; + } + + uint32 GetEnteredGamepadTextLength() + { + return NULL; + } + bool GetEnteredGamepadTextInput(char* pchText, uint32 cchText) + { + return true; + } + + const char* GetSteamUILanguage() + { + return Steam_Config::Language; + } + + bool IsSteamRunningInVR() + { + return false; + } + + void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) + { + return; + } + + bool IsSteamInBigPictureMode() + { + return false; + } + + void StartVRDashboard() + { + return; + } + + bool IsVRHeadsetStreamingEnabled() + { + return false; + } + + void SetVRHeadsetStreamingEnabled(bool bEnabled) + { + return; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamVideo001.h b/src/InterfacesEmulation/SteamVideo001.h new file mode 100644 index 0000000..c747512 --- /dev/null +++ b/src/InterfacesEmulation/SteamVideo001.h @@ -0,0 +1,16 @@ +#pragma once +#include "../public SDK/ISteamVideo001.h" + +class SteamVideoIn001 : public ISteamVideo001 +{ +public: + void GetVideoURL(AppId_t unVideoAppID) + { + return; + } + + bool IsBroadcasting(int* pnNumViewers) + { + return false; + } +}; \ No newline at end of file diff --git a/src/InterfacesEmulation/SteamVideo002.h b/src/InterfacesEmulation/SteamVideo002.h new file mode 100644 index 0000000..d85110b --- /dev/null +++ b/src/InterfacesEmulation/SteamVideo002.h @@ -0,0 +1,25 @@ +#pragma once +#include "../public SDK/ISteamVideo002.h" + +class SteamVideoIn002 : public ISteamVideo002 +{ +public: + void GetVideoURL(AppId_t unVideoAppID) + { + return; + } + + bool IsBroadcasting(int* pnNumViewers) + { + return false; + } + + void GetOPFSettings(AppId_t unVideoAppID) + { + return; + } + bool GetOPFStringForApp(AppId_t unVideoAppID, char* pchBuffer, int32* pnBufferSize) + { + return false; + } +}; \ No newline at end of file diff --git a/src/SteamStubBypass/SteamStub.cpp b/src/SteamStubBypass/SteamStub.cpp new file mode 100644 index 0000000..63a8f96 --- /dev/null +++ b/src/SteamStubBypass/SteamStub.cpp @@ -0,0 +1,272 @@ +#include "SteamStub.h" +ULONG_PTR BindStrt = 0; +ULONG_PTR BindEndt = 0; + +BYTE int3bp[2] = { 0xCC, 0x90 }; +BYTE orgdata[2] = { 0 }; +BYTE orgdata2[2] = { 0 }; +#ifdef _WIN64 +BYTE VirtualAllocOrgData[12] = { 0 }; +#else +BYTE VirtualAllocOrgData[6] = { 0 }; +#endif + +BYTE StubPattern1[2] = { 0x3C, 0x30 }; +BYTE StubPatternPatch1[2] = { 0x38, 0xC0 }; +BYTE StubPattern2[5] = { 0x3D, 0x10, 0x27, 0x00, 0x00 }; +BYTE StubPatternPatch2[5] = { 0x39, 0xC0, 0x90, 0x90, 0x90 }; +BYTE operators[3] = { 0x0F, 0x74, 0x76 }; +FARPROC IsDebuggerPresentAPI = 0; +FARPROC _GetFileSize = 0; +FARPROC GetTickCountAPI = 0; +FARPROC VirtualAllocAPI = 0; +HMODULE hKernelBase = 0; +HMODULE hNtdll = 0; +HMODULE hKernel = 0; +int found = 0; +DWORD OldProtect = 0; +void* fakeGetTickCount = nullptr; +LPVOID StubBuf[10000] = { 0 }; +SIZE_T StubBufSize[10000] = { 0 }; +long long data = 0; + +typedef NTSTATUS(WINAPI* _NtAllocateVirtualMemory)(_In_ HANDLE, _Inout_ PVOID*, _In_ ULONG_PTR, _Inout_ PSIZE_T, _In_ ULONG, _In_ ULONG); +_NtAllocateVirtualMemory __NtAllocateVirtualMemory; + +bool checked = false; + +extern "C" _declspec(dllexport) LPVOID WVirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect) +{ + NTSTATUS status = __NtAllocateVirtualMemory(GetCurrentProcess(), &lpAddress, NULL, &dwSize, flAllocationType, flProtect); + if (!status) + { + if (lpAddress) + { + StubBuf[data] = lpAddress; + StubBufSize[data] = dwSize; + data++; + return lpAddress; + } + } + + return NULL; +} + + +LONG WINAPI handledExceptionFilter(EXCEPTION_POINTERS* pExceptionInfo) //Handler +{ + + if (pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) + { + if (found) + return EXCEPTION_CONTINUE_SEARCH; + + ULONG_PTR returnAddress = 0; + ULONG_PTR returnAddress2 = 0; + bool isstub = false; +#ifndef _WIN64 + memcpy(&returnAddress, (void*)pExceptionInfo->ContextRecord->Esp, 4); +#else + memcpy(&returnAddress, (void*)pExceptionInfo->ContextRecord->Rsp, 8); +#endif + bool found = false; + ULONG_PTR addrs = 0; + for (long long i = 0; i < data; i++) { + addrs = (ULONG_PTR)StubBuf[i]; + for (SIZE_T b = 0; b < StubBufSize[i]; b++) { + if (addrs == returnAddress) { + found = true; + break; + } + addrs++; + } + if (found) + break; + } + isstub = found; + ULONG_PTR oldaddr = returnAddress; + if (isstub) + { + DWORD old = 0; + int patternfound = 0; + ULONG_PTR pattern1addr, pattern2addr; + for (;;) + { + if (patternfound == 0) + { + if (memcmp((void*)returnAddress, StubPattern1, sizeof(StubPattern1)) == 0) + { + for (int b = 0; b < sizeof(operators); b++) + { + if (memcmp((void*)((ULONG_PTR)returnAddress + 2), &operators[b], 1) == 0) + { + patternfound = 1; + pattern1addr = returnAddress; + break; + } + } + } + } + + if (patternfound == 1) + { + if (memcmp((void*)returnAddress, StubPattern2, sizeof(StubPattern2)) == 0) + { + for (int b = 0; b < sizeof(operators); b++) + { + if (memcmp((void*)((ULONG_PTR)returnAddress + 5), &operators[b], 1) == 0) + { + patternfound = 2; + pattern2addr = returnAddress; + break; + } + } + } + } + if (patternfound == 2) + break; + returnAddress++; + } + if (patternfound == 2) + { + DWORD POLD; + VirtualProtect((void*)pattern1addr, sizeof(StubPatternPatch1), PAGE_EXECUTE_READWRITE, &POLD); + memcpy((void*)pattern1addr, StubPatternPatch1, sizeof(StubPatternPatch1)); + VirtualProtect((void*)pattern1addr, sizeof(StubPatternPatch1), POLD, &POLD); + VirtualProtect((void*)pattern2addr, sizeof(StubPatternPatch2), PAGE_EXECUTE_READWRITE, &POLD); + memcpy((void*)pattern2addr, StubPatternPatch2, sizeof(StubPatternPatch2)); + VirtualProtect((void*)pattern2addr, sizeof(StubPatternPatch2), POLD, &POLD); + memcpy((void*)IsDebuggerPresentAPI, orgdata, sizeof(orgdata)); + memcpy((void*)GetTickCountAPI, orgdata2, sizeof(orgdata2)); + memcpy((void*)VirtualAllocAPI, VirtualAllocOrgData, sizeof(VirtualAllocOrgData)); + found++; + } + + + } +#ifdef _WIN64 + if (pExceptionInfo->ContextRecord->Rip == (ULONG_PTR)GetTickCountAPI) + { + pExceptionInfo->ContextRecord->Rip = (ULONG_PTR)fakeGetTickCount; + return EXCEPTION_CONTINUE_EXECUTION; + } + + pExceptionInfo->ContextRecord->Rax = (ULONG_PTR)0; + pExceptionInfo->ContextRecord->Rsp = pExceptionInfo->ContextRecord->Rsp + 8; + pExceptionInfo->ContextRecord->Rip = oldaddr; +#else + if (pExceptionInfo->ContextRecord->Eip == (ULONG_PTR)GetTickCountAPI) + { + pExceptionInfo->ContextRecord->Eip = (ULONG_PTR)fakeGetTickCount; + return EXCEPTION_CONTINUE_EXECUTION; + } + + pExceptionInfo->ContextRecord->Eax = (ULONG_PTR)0; + pExceptionInfo->ContextRecord->Esp = pExceptionInfo->ContextRecord->Esp + 4; + pExceptionInfo->ContextRecord->Eip = oldaddr; +#endif // _WIN64 + return EXCEPTION_CONTINUE_EXECUTION; + } + return EXCEPTION_CONTINUE_SEARCH; +} +namespace SteamStubBypass +{ + bool PatchSteamStub(ULONG_PTR BindStart, ULONG_PTR BindEnd, ULONG_PTR entryexe) + { + hKernel = GetModuleHandleA("kernel32.dll"); // Hooks + hNtdll = GetModuleHandleA("ntdll.dll"); + hKernelBase = GetModuleHandleA("kernelbase.dll"); + if (!hKernel) + return false; + if (!hNtdll) + return false; + if (!hKernelBase) + return false; + + IsDebuggerPresentAPI = GetProcAddress(hKernel, "IsDebuggerPresent"); + GetTickCountAPI = GetProcAddress(hKernel, "GetTickCount"); + __NtAllocateVirtualMemory = (_NtAllocateVirtualMemory)GetProcAddress(hNtdll, "NtAllocateVirtualMemory"); + VirtualAllocAPI = GetProcAddress(hKernelBase, "VirtualAlloc"); + ULONG_PTR myWrapper = (ULONG_PTR)GetProcAddress(SteamApimod, "WVirtualAlloc"); + + + if (!IsDebuggerPresentAPI) + return false; + if (!GetTickCountAPI) + return false; + if (!__NtAllocateVirtualMemory) + return false; + if (!VirtualAllocAPI) + return false; + +#ifdef _WIN64 + BYTE VirtualAllocHookData[12] = { 0x48, 0xB8 }; + memcpy(&VirtualAllocHookData[2], &myWrapper, 8); + VirtualAllocHookData[10] = 0xFF; + VirtualAllocHookData[11] = 0xE0; +#else + BYTE VirtualAllocHookData[6] = { 0x68 }; + memcpy(&VirtualAllocHookData[1], &myWrapper, 4); + VirtualAllocHookData[5] = 0xC3; +#endif + + if (!VirtualProtect((void*)IsDebuggerPresentAPI, sizeof(int3bp), PAGE_EXECUTE_READWRITE, &OldProtect)) + return false; + if (!VirtualProtect((void*)GetTickCountAPI, sizeof(int3bp), PAGE_EXECUTE_READWRITE, &OldProtect)) + return false; + if (!VirtualProtect((void*)VirtualAllocAPI, sizeof(VirtualAllocHookData), PAGE_EXECUTE_READWRITE, &OldProtect)) + return false; + + memcpy(orgdata, (void*)IsDebuggerPresentAPI, sizeof(orgdata)); + memcpy((void*)IsDebuggerPresentAPI, int3bp, sizeof(int3bp)); + fakeGetTickCount = VirtualAlloc(NULL, 1000, MEM_COMMIT, PAGE_EXECUTE_READWRITE); + long funcsize = 0; + BYTE endfbyte[1] = { 0xC3 }; + ULONG_PTR func = (ULONG_PTR)GetTickCountAPI; + while (memcmp((void*)func, endfbyte, 1) != 0) + { + func++; + funcsize++; + } + funcsize++; + memcpy(fakeGetTickCount, (void*)GetTickCountAPI, funcsize); + memcpy(orgdata2, (void*)GetTickCountAPI, sizeof(orgdata2)); + memcpy((void*)GetTickCountAPI, int3bp, sizeof(int3bp)); + memcpy(VirtualAllocOrgData, (void*)VirtualAllocAPI, sizeof(VirtualAllocOrgData)); + memcpy((void*)VirtualAllocAPI, VirtualAllocHookData, sizeof(VirtualAllocHookData)); + AddVectoredExceptionHandler(true, handledExceptionFilter); + + BindEndt = BindEnd; + BindStrt = BindStart; + return true; + } + void Patch() + { + HMODULE hExe = GetModuleHandleA(NULL); + auto DosHeader = (IMAGE_DOS_HEADER*)hExe; + auto ntheader = (IMAGE_NT_HEADERS*)((ULONG_PTR)hExe + DosHeader->e_lfanew); + auto psection = IMAGE_FIRST_SECTION(ntheader); + int stubdetected = 0; + ULONG_PTR strt1, end1; + for (int i = 0; i < ntheader->FileHeader.NumberOfSections; i++) + { + if (strcmp((char*)psection->Name, ".bind") == 0) + { + strt1 = (ULONG_PTR)hExe + psection->VirtualAddress; + end1 = (ULONG_PTR)strt1 + psection->Misc.VirtualSize; + stubdetected = 1; + break; + } + psection++; + } + ULONG_PTR entrypoint = (ULONG_PTR)hExe + ntheader->OptionalHeader.AddressOfEntryPoint; + for (ULONG_PTR i = strt1; i < end1; i++) { + if (entrypoint == i) { + stubdetected = 2; + break; + } + } + if (stubdetected == 2) + PatchSteamStub(strt1, end1, (ULONG_PTR)hExe + ntheader->OptionalHeader.AddressOfEntryPoint); + } +} \ No newline at end of file diff --git a/src/SteamStubBypass/SteamStub.h b/src/SteamStubBypass/SteamStub.h new file mode 100644 index 0000000..2bf1496 --- /dev/null +++ b/src/SteamStubBypass/SteamStub.h @@ -0,0 +1,8 @@ +#pragma once +#include +#include "../Bridge.h" +namespace SteamStubBypass +{ + bool PatchSteamStub(ULONG_PTR BindStart, ULONG_PTR BindEnd, ULONG_PTR entryexe); + void Patch(); +} diff --git a/src/Steam_data.cpp b/src/Steam_data.cpp new file mode 100644 index 0000000..a9ec577 --- /dev/null +++ b/src/Steam_data.cpp @@ -0,0 +1,307 @@ +#include "Steam_data.h" +#include "Bridge.h" +// Steam standard functions. +EXPORTMYFUNC bool SteamAPI_Init() +{ + return ColdAPI_InitAndShutDown::ColdClientInitializzation(); +} +EXPORTMYFUNC bool SteamAPI_InitSafe() +{ + return SteamAPI_Init(); +} +EXPORTMYFUNC void SteamAPI_Shutdown() +{ + ColdAPI_InitAndShutDown::ColdClientShutDown(); +} +EXPORTMYFUNC bool SteamAPI_IsSteamRunning() +{ + return true; +} +EXPORTMYFUNC const char* SteamAPI_GetSteamInstallPath() +{ + return ColdAPI_General::ColdAPI_GetSteamInstallPath(); +} +EXPORTMYFUNC bool SteamAPI_RestartAppIfNecessary(uint32_t unOwnAppID) +{ + Steam_Config::AppId = unOwnAppID; + return false; +} + +// SteamCustom attempt. +EXPORTMYFUNC void SteamAPI_ReleaseCurrentThreadMemory() +{ + return; +} +EXPORTMYFUNC void Steam_RegisterInterfaceFuncs(void* hModule) +{ + return; +} + +// SteamMiniDump Attempt. +EXPORTMYFUNC void SteamAPI_SetMiniDumpComment(const char* pchMsg) +{ + return; +} +EXPORTMYFUNC void SteamAPI_WriteMiniDump(uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID) +{ + // A bit useless, implement it if you need. + return; +} + +// SteamInternal attempt. +EXPORTMYFUNC void* SteamInternal_CreateInterface(const char* interfacename) +{ + return ColdAPI_General::ProvideInterface(NULL, interfacename, true); +} +EXPORTMYFUNC void* SteamInternal_FindOrCreateUserInterface(int32_t hSteamUser, const char* pszVersion) +{ + return SteamInternal_CreateInterface(pszVersion); +} +EXPORTMYFUNC void* SteamInternal_FindOrCreateGameServerInterface(int32_t hSteamUser, const char* pszVersion) +{ + return SteamInternal_CreateInterface(pszVersion); +} +EXPORTMYFUNC void* SteamInternal_ContextInit(void* pContextInitData) +{ + return ColdAPI_General::ContextInitializzation(pContextInitData); +} + +// SteamAccessors attempt. +EXPORTMYFUNC void* SteamApps() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_APPS, NULL, false); +} +EXPORTMYFUNC void* SteamClient() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_CLIENT, NULL, false); +} +EXPORTMYFUNC void* SteamController() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_CONTROLLER, NULL, false); +} +EXPORTMYFUNC void* SteamBilling() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_BILLING, NULL, false); +} +EXPORTMYFUNC void* SteamContentServer() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_CONTENTSERVER, NULL, false); +} +EXPORTMYFUNC void* SteamFriends() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_FRIENDS, NULL, false); +} +EXPORTMYFUNC void* SteamParentalSettings() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_PARENTALSETTINGS, NULL, false); +} +EXPORTMYFUNC void* SteamGameSearch() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESEARCH, NULL, false); +} +EXPORTMYFUNC void* SteamInput() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_INPUT, NULL, false); +} +EXPORTMYFUNC void* SteamParties() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_PARTIES, NULL, false); +} +EXPORTMYFUNC void* SteamGameServer() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVER, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerHTTP() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERHTTP, NULL, false); +} +EXPORTMYFUNC void* SteamGameCoordinator() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMECOORDINATOR, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerInventory() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERINVENTORY, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerNetworking() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERNETWORKING, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerStats() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERSTATS, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerUGC() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERUGC, NULL, false); +} +EXPORTMYFUNC void* SteamGameServerUtils() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_GAMESERVERUTILS, NULL, false); +} +EXPORTMYFUNC void* SteamHTMLSurface() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_HTMLSURFACE, NULL, false); +} +EXPORTMYFUNC void* SteamAppList() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_APPLIST, NULL, false); +} +EXPORTMYFUNC void* SteamHTTP() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_HTTP, NULL, false); +} +EXPORTMYFUNC void* SteamInventory() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_INVENTORY, NULL, false); +} +EXPORTMYFUNC void* SteamMatchmaking() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_MATCHMAKING, NULL, false); +} +EXPORTMYFUNC void* SteamMatchmakingServers() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_MATCHMAKINGSERVERS, NULL, false); +} +EXPORTMYFUNC void* SteamMusic() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_MUSIC, NULL, false); +} +EXPORTMYFUNC void* SteamMusicRemote() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_MUSICREMOTE, NULL, false); +} +EXPORTMYFUNC void* SteamNetworking() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_NETWORKING, NULL, false); +} +EXPORTMYFUNC void* SteamRemoteStorage() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_REMOTESTORAGE, NULL, false); +} +EXPORTMYFUNC void* SteamScreenshots() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_SCREENSHOTS, NULL, false); +} +EXPORTMYFUNC void* SteamUnifiedMessages() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_UNIFIEDMESSAGES, NULL, false); +} +EXPORTMYFUNC void* SteamUGC() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_UGC, NULL, false); +} +EXPORTMYFUNC void* SteamUser() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_USER, NULL, false); +} +EXPORTMYFUNC void* SteamUserStats() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_USERSTATS, NULL, false); +} +EXPORTMYFUNC void* SteamUtils() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_UTILS, NULL, false); +} +EXPORTMYFUNC void* SteamVideo() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_VIDEO, NULL, false); +} +EXPORTMYFUNC void* SteamMasterServerUpdater() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_MASTERSERVERUPDATER, NULL, false); +} +EXPORTMYFUNC void* SteamRemotePlay() +{ + return ColdAPI_General::ProvideInterface(CSteamInterface::STEAM_REMOTEPLAY, NULL, false); +} +// SteamHandlers attempt. +EXPORTMYFUNC int32_t GetHSteamUser() +{ + return 1; +} +EXPORTMYFUNC int32_t GetHSteamPipe() +{ + return 1; +} +EXPORTMYFUNC int32_t SteamAPI_GetHSteamUser() +{ + return 1; +} +EXPORTMYFUNC int32_t SteamAPI_GetHSteamPipe() +{ + return 1; +} +EXPORTMYFUNC int32_t SteamGameServer_GetHSteamUser() +{ + return 1; +} +EXPORTMYFUNC int32_t SteamGameServer_GetHSteamPipe() +{ + return 1; +} +EXPORTMYFUNC int32_t Steam_GetHSteamUserCurrent() +{ + return 1; +} + +// SteamCallBacks attempt. +EXPORTMYFUNC void SteamAPI_RunCallbacks() +{ + SteamCallback::RunCallbacks(); +} +EXPORTMYFUNC void SteamAPI_SetTryCatchCallbacks(bool bTryCatchCallbacks) +{ + return; +} +EXPORTMYFUNC void SteamAPI_RegisterCallback(void* pCallback, int iCallback) +{ + if(pCallback) + SteamCallback::RegisterCallback((CCallbackBase*)pCallback, iCallback); +} +EXPORTMYFUNC void SteamAPI_UnregisterCallback(void* pCallback, int iCallback) +{ + if (pCallback) + SteamCallback::UnregisterCallback((CCallbackBase*)pCallback, iCallback); +} +EXPORTMYFUNC void SteamAPI_RegisterCallResult(void* pCallback, uint64_t hAPICall) +{ + if (pCallback) + SteamCallback::RegisterCallResult((CCallbackBase*)pCallback, hAPICall); +} +EXPORTMYFUNC void SteamAPI_UnregisterCallResult(void* pCallback, uint64_t hAPICall) +{ + if (pCallback) + SteamCallback::UnregisterCallResult((CCallbackBase*)pCallback, hAPICall); +} +EXPORTMYFUNC bool SteamGameServer_BSecure() +{ + return true; +} +EXPORTMYFUNC void SteamGameServer_Shutdown() +{ + return; +} +EXPORTMYFUNC void SteamGameServer_RunCallbacks() +{ + return; +} + +// SteamServer attempt. +EXPORTMYFUNC uint64_t SteamGameServer_GetSteamID() +{ + return Steam_Config::UserID; +} + +EXPORTMYFUNC bool SteamGameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString) +{ + return true; +} +EXPORTMYFUNC bool SteamGameServer_InitSafe(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString) +{ + return true; +} +EXPORTMYFUNC bool SteamInternal_GameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString) +{ + return true; +} \ No newline at end of file diff --git a/src/Steam_data.h b/src/Steam_data.h new file mode 100644 index 0000000..8a94e11 --- /dev/null +++ b/src/Steam_data.h @@ -0,0 +1,92 @@ +#pragma once +#include "Bridge.h" +#include "public SDK/ClientCommon.h" +#include "public SDK/SteamTypes.h" + +// Steam standard functions. +EXPORTMYFUNC bool SteamAPI_Init(); +EXPORTMYFUNC bool SteamAPI_InitSafe(); +EXPORTMYFUNC void SteamAPI_Shutdown(); +EXPORTMYFUNC bool SteamAPI_IsSteamRunning(); +EXPORTMYFUNC const char* SteamAPI_GetSteamInstallPath(); +EXPORTMYFUNC bool SteamAPI_RestartAppIfNecessary(uint32_t unOwnAppID); + +// SteamCustom attempt. +EXPORTMYFUNC void SteamAPI_ReleaseCurrentThreadMemory(); +EXPORTMYFUNC void Steam_RegisterInterfaceFuncs(void* hModule); + +// SteamMiniDump Attempt. +EXPORTMYFUNC void SteamAPI_SetMiniDumpComment(const char* pchMsg); +EXPORTMYFUNC void SteamAPI_WriteMiniDump(uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID); + +// SteamInternal attempt. +EXPORTMYFUNC void* SteamInternal_CreateInterface(const char* interfacename); +EXPORTMYFUNC void* SteamInternal_FindOrCreateUserInterface(int32_t hSteamUser, const char* pszVersion); +EXPORTMYFUNC void* SteamInternal_FindOrCreateGameServerInterface(int32_t hSteamUser, const char* pszVersion); +EXPORTMYFUNC void* SteamInternal_ContextInit(void* pContextInitData); + +// SteamAccessors attempt. +EXPORTMYFUNC void* SteamApps(); +EXPORTMYFUNC void* SteamClient(); +EXPORTMYFUNC void* SteamController(); +EXPORTMYFUNC void* SteamBilling(); +EXPORTMYFUNC void* SteamContentServer(); +EXPORTMYFUNC void* SteamFriends(); +EXPORTMYFUNC void* SteamParentalSettings(); +EXPORTMYFUNC void* SteamGameSearch(); +EXPORTMYFUNC void* SteamInput(); +EXPORTMYFUNC void* SteamParties(); +EXPORTMYFUNC void* SteamGameServer(); +EXPORTMYFUNC void* SteamGameServerHTTP(); +EXPORTMYFUNC void* SteamGameCoordinator(); +EXPORTMYFUNC void* SteamGameServerInventory(); +EXPORTMYFUNC void* SteamGameServerNetworking(); +EXPORTMYFUNC void* SteamGameServerStats(); +EXPORTMYFUNC void* SteamGameServerUGC(); +EXPORTMYFUNC void* SteamGameServerUtils(); +EXPORTMYFUNC void* SteamHTMLSurface(); +EXPORTMYFUNC void* SteamAppList(); +EXPORTMYFUNC void* SteamHTTP(); +EXPORTMYFUNC void* SteamInventory(); +EXPORTMYFUNC void* SteamMatchmaking(); +EXPORTMYFUNC void* SteamMatchmakingServers(); +EXPORTMYFUNC void* SteamMusic(); +EXPORTMYFUNC void* SteamMusicRemote(); +EXPORTMYFUNC void* SteamNetworking(); +EXPORTMYFUNC void* SteamRemoteStorage(); +EXPORTMYFUNC void* SteamScreenshots(); +EXPORTMYFUNC void* SteamUnifiedMessages(); +EXPORTMYFUNC void* SteamUGC(); +EXPORTMYFUNC void* SteamUser(); +EXPORTMYFUNC void* SteamUserStats(); +EXPORTMYFUNC void* SteamUtils(); +EXPORTMYFUNC void* SteamVideo(); +EXPORTMYFUNC void* SteamMasterServerUpdater(); +EXPORTMYFUNC void* SteamRemotePlay(); + +// SteamHandlers attempt. +EXPORTMYFUNC int32_t GetHSteamUser(); +EXPORTMYFUNC int32_t GetHSteamPipe(); +EXPORTMYFUNC int32_t SteamAPI_GetHSteamUser(); +EXPORTMYFUNC int32_t SteamAPI_GetHSteamPipe(); +EXPORTMYFUNC int32_t SteamGameServer_GetHSteamUser(); +EXPORTMYFUNC int32_t SteamGameServer_GetHSteamPipe(); +EXPORTMYFUNC int32_t Steam_GetHSteamUserCurrent(); + +// SteamCallBacks attempt. +EXPORTMYFUNC void SteamAPI_RunCallbacks(); +EXPORTMYFUNC void SteamAPI_SetTryCatchCallbacks(bool bTryCatchCallbacks); +EXPORTMYFUNC void SteamAPI_RegisterCallback(void* pCallback, int iCallback); +EXPORTMYFUNC void SteamAPI_UnregisterCallback(void* pCallback, int iCallback); +EXPORTMYFUNC void SteamAPI_RegisterCallResult(void* pCallback, uint64_t hAPICall); +EXPORTMYFUNC void SteamAPI_UnregisterCallResult(void* pCallback, uint64_t hAPICall); +EXPORTMYFUNC bool SteamGameServer_BSecure(); +EXPORTMYFUNC void SteamGameServer_Shutdown(); +EXPORTMYFUNC void SteamGameServer_RunCallbacks(); + +// SteamServer attempt. +EXPORTMYFUNC uint64_t SteamGameServer_GetSteamID(); + +EXPORTMYFUNC bool SteamGameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString); +EXPORTMYFUNC bool SteamGameServer_InitSafe(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString); +EXPORTMYFUNC bool SteamInternal_GameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, uint32_t eServerMode, const char* pchVersionString); \ No newline at end of file diff --git a/src/dllmain.cpp b/src/dllmain.cpp new file mode 100644 index 0000000..edee434 --- /dev/null +++ b/src/dllmain.cpp @@ -0,0 +1,30 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include +#include +#include "Bridge.h" +#include "Steam_data.h" +unsigned char TicketData[128] = { 0 }; +char Steamapipath[MAX_PATH] = { 0 }; +HMODULE SteamApimod = 0; +BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + if (ul_reason_for_call == DLL_PROCESS_ATTACH) + { + SteamApimod = hModule; + char myfile[MAX_PATH] = { 0 }; + GetModuleFileNameA(hModule, myfile, MAX_PATH); + int size = lstrlenA(myfile); + for (int i = size; i > 0; i--) { + if (myfile[i] == '\\') { + RtlFillMemory(&myfile[i + 1], size - i + 1, NULL); + break; + + } + } + lstrcpyA(Steamapipath, myfile); + SteamAPI_Init(); + } + + return TRUE; +} + diff --git a/src/public SDK/AppListCommon.h b/src/public SDK/AppListCommon.h new file mode 100644 index 0000000..f9fbba2 --- /dev/null +++ b/src/public SDK/AppListCommon.h @@ -0,0 +1,41 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef APPLISTCOMMON_H +#define APPLISTCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define STEAMAPPLIST_INTERFACE_VERSION_001 "STEAMAPPLIST_INTERFACE_VERSION001" + +#pragma pack( push, 8 ) + +struct SteamAppInstalled_t +{ + enum { k_iCallback = k_iSteamAppListCallbacks + 1 }; + AppId_t m_nAppID; // ID of the app that installs +}; + +struct SteamAppUninstalled_t +{ + enum { k_iCallback = k_iSteamAppListCallbacks + 2 }; + AppId_t m_nAppID; // ID of the app that installs +}; + +#pragma pack( pop ) + +#endif // APPLISTCOMMON_H diff --git a/src/public SDK/AppTicketCommon.h b/src/public SDK/AppTicketCommon.h new file mode 100644 index 0000000..eea6c6d --- /dev/null +++ b/src/public SDK/AppTicketCommon.h @@ -0,0 +1,25 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef APPTICKETCOMMON_H +#define APPTICKETCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define STEAMAPPTICKET_INTERFACE_VERSION_001 "STEAMAPPTICKET_INTERFACE_VERSION001" + +#endif // APPTICKETCOMMON_H diff --git a/src/public SDK/AppsCommon.h b/src/public SDK/AppsCommon.h new file mode 100644 index 0000000..e46716a --- /dev/null +++ b/src/public SDK/AppsCommon.h @@ -0,0 +1,372 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef APPSCOMMON_H +#define APPSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTAPPS_INTERFACE_VERSION "CLIENTAPPS_INTERFACE_VERSION001" +#define CLIENTAPPMANAGER_INTERFACE_VERSION "CLIENTAPPMANAGER_INTERFACE_VERSION001" + +#define STEAMAPPS_INTERFACE_VERSION_001 "STEAMAPPS_INTERFACE_VERSION001" +#define STEAMAPPS_INTERFACE_VERSION_002 "STEAMAPPS_INTERFACE_VERSION002" +#define STEAMAPPS_INTERFACE_VERSION_003 "STEAMAPPS_INTERFACE_VERSION003" +#define STEAMAPPS_INTERFACE_VERSION_004 "STEAMAPPS_INTERFACE_VERSION004" +#define STEAMAPPS_INTERFACE_VERSION_005 "STEAMAPPS_INTERFACE_VERSION005" +#define STEAMAPPS_INTERFACE_VERSION_006 "STEAMAPPS_INTERFACE_VERSION006" +#define STEAMAPPS_INTERFACE_VERSION_007 "STEAMAPPS_INTERFACE_VERSION007" +#define STEAMAPPS_INTERFACE_VERSION_008 "STEAMAPPS_INTERFACE_VERSION008" + + +enum EAppState +{ + k_EAppStateInvalid = 0, + k_EAppStateUninstalled = 1, + k_EAppStateUpdateRequired = 2, + k_EAppStateFullyInstalled = 4, + k_EAppStateDataEncrypted = 8, + k_EAppStateSharedOnly = 64, + k_EAppStateDataLocked = 16, + k_EAppStateFilesMissing = 32, + k_EAppStateFilesCorrupt = 128, + k_EAppStateAppRunning = 8192, + k_EAppStateBackupRunning = 4096, + k_EAppStateUpdateRunning = 256, + k_EAppStateUpdateStopping = 8388608, + k_EAppStateUpdatePaused = 512, + k_EAppStateUpdateStarted = 1024, + k_EAppStateReconfiguring = 65536, + k_EAppStateAddingFiles = 262144, + k_EAppStateDownloading = 1048576, + k_EAppStateStaging = 2097152, + k_EAppStateCommitting = 4194304, + k_EAppStateUninstalling = 2048, + k_EAppStatePreallocating = 524288, + k_EAppStateValidating = 131072, +}; + +enum EAppEvent +{ + k_EAppEventDownloadComplete = 2, +}; + +enum EAppInfoSection +{ + k_EAppInfoSectionUnknown = 0, + k_EAppInfoSectionAll, + k_EAppInfoSectionCommon, + k_EAppInfoSectionExtended, + k_EAppInfoSectionConfig, + k_EAppInfoSectionStats, + k_EAppInfoSectionInstall, + k_EAppInfoSectionDepots, + k_EAppInfoSectionVac, + k_EAppInfoSectionDrm, + k_EAppInfoSectionUfs, + k_EAppInfoSectionOgg, + k_EAppInfoSectionItems, + k_EAppInfoSectionPolicies, + k_EAppInfoSectionSysreqs, + k_EAppInfoSectionCommunity +}; + +#pragma pack( push, 1 ) +struct AppUpdateInfo_s +{ + RTime32 m_timeUpdateStart; + uint64 m_unBytesToDownload; + uint64 m_unBytesDownloaded; + uint64 m_unBytesToProcess; + uint64 m_unBytesProcessed; + uint32 m_uUnk; +}; +#pragma pack( pop ) + +struct DownloadStats_s +{ + uint32 m_uIsDownloadEnabled; + uint32 m_unCurrentConnections; + uint32 m_unCurrentBytesPerSec; + uint64 m_unTotalBytesDownload; + CellID_t m_unCurrentCell; +}; + +enum EAppDownloadPriority +{ + k_EAppDownloadPriorityNone = 0, + k_EAppDownloadPriorityFirst = 1, + k_EAppDownloadPriorityUp = 2, + k_EAppDownloadPriorityDown = 3, + k_EAppDownloadPriorityLast = 4, + k_EAppDownloadPriorityPaused = 5, +}; + +enum EAppUpdateError +{ + k_EAppErrorNone = 0, + k_EAppErrorUnspecified = 1, + k_EAppErrorPaused = 2, + k_EAppErrorCanceled = 3, + k_EAppErrorSuspended = 4, + k_EAppErrorNoSubscription = 5, + k_EAppErrorNoConnection = 6, + k_EAppErrorTimeout = 7, + k_EAppErrorMissingKey = 8, + k_EAppErrorMissingConfig = 9, + k_EAppErrorDiskReadFailure = 10, + k_EAppErrorDiskWriteFailure = 11, + k_EAppErrorCorruptContent = 13, + k_EAppErrorWaitingForDisk = 14, + k_EAppErrorInvalidInstallPath = 15, + k_EAppErrorApplicationRunning = 16, + k_EAppErrorDependencyFailure = 17, + k_EAppErrorNotInstalled = 18, + k_EAppErrorUpdateRequired = 19, + k_EAppErrorStillBusy = 20, + k_EAppErrorNoConnectionToContentServers = 21, + k_EAppErrorInvalidApplicationConfiguration = 22, + k_EAppErrorInvalidContentConfiguration = 23, + k_EAppErrorMissingManifest = 24, + k_EAppErrorNotReleased = 25, + k_EAppErrorRegionRestricted = 26, + k_EAppErrorCorruptDepotCache = 27, + k_EAppErrorMissingExecutable = 28, + k_EAppErrorInvalidPlatform = 29, + k_EAppErrorInvalidFileSystem = 30, + k_EAppErrorCorruptUpdateFiles = 31, +}; + +//----------------------------------------------------------------------------- +// Purpose: possible results when registering an activation code +//----------------------------------------------------------------------------- +enum ERegisterActivactionCodeResult +{ + k_ERegisterActivactionCodeResultOK = 0, + k_ERegisterActivactionCodeResultFail = 1, + k_ERegisterActivactionCodeResultAlreadyRegistered = 2, + k_ERegisterActivactionCodeResultTimeout = 3, + k_ERegisterActivactionCodeAlreadyOwned = 4 +}; + +enum EAppOwernshipFlags +{ + k_EAppOwnershipFlags_None = 0x0000, // unknown + k_EAppOwnershipFlags_OwnsLicense = 0x0001, // owns license for this game + k_EAppOwnershipFlags_FreeLicense = 0x0002, // not paid for game + k_EAppOwnershipFlags_RegionRestricted = 0x0004, // owns app, but not allowed to play in current region + k_EAppOwnershipFlags_LowViolence = 0x0008, // only low violence version + k_EAppOwnershipFlags_InvalidPlatform = 0x0010, // app not supported on current platform + k_EAppOwnershipFlags_SharedLicense = 0x0020, // license was granted by authorized local device + k_EAppOwnershipFlags_FreeWeekend = 0x0040, // owned by a free weekend licenses + k_EAppOwnershipFlags_RetailLicense = 0x0080, // has a retail license for game, (CD-Key etc) + k_EAppOwnershipFlags_LicenseLocked = 0x0100, // shared license is locked (in use) by other user + k_EAppOwnershipFlags_LicensePending = 0x0200, // owns app, but transaction is still pending. Can't install or play + k_EAppOwnershipFlags_LicenseExpired = 0x0400, // doesn't own app anymore since license expired + k_EAppOwnershipFlags_LicensePermanent = 0x0800, // permanent license, not borrowed, or guest or freeweekend etc + k_EAppOwnershipFlags_LicenseRecurring = 0x1000, // Recurring license, user is charged periodically + k_EAppOwnershipFlags_LicenseCanceled = 0x2000, // Mark as canceled, but might be still active if recurring + k_EAppOwnershipFlags_AutoGrant = 0x4000, // Ownership is based on any kind of autogrant license + k_EAppOwnershipFlags_PendingGift = 0x8000, // user has pending gift to redeem +}; + +enum EAppReleaseState +{ + k_EAppReleaseStateUnknown = 0, + k_EAppReleaseStateUnavailable, + k_EAppReleaseStatePrerelease, + k_EAppReleaseStatePreloadonly, + k_EAppReleaseStateReleased, +}; + +enum EAppType +{ + k_EAppType_Invalid = 0x000, // unknown / invalid + k_EAppType_Game = 0x001, // playable game, default type + k_EAppType_Application = 0x002, // software application + k_EAppType_Tool = 0x004, // SDKs, editors & dedicated servers + k_EAppType_Demo = 0x008, // game demo + k_EAppType_Media_DEPRECATED = 0x010, // legacy - was used for game trailers, which are now just videos on the web + k_EAppType_DLC = 0x020, // down loadable content + k_EAppType_Guide = 0x040, // game guide, PDF etc + k_EAppType_Driver = 0x080, // hardware driver updater (ATI, Razor etc) + k_EAppType_Config = 0x100, // hidden app used to config Steam features (backpack, sales, etc) + k_EAppType_Hardware = 0x200, // a hardware device (Steam Machine, Steam Controller, Steam Link, etc.) + // 0x400 is up for grabs here + k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc) + k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps + k_EAppType_Music = 0x2000, // Music files + + k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only + k_EAppType_DepotOnly = 0x80000000, // placeholder since depots and apps share the same namespace +}; + +struct SHADigestWrapper_t +{ + uint32 A; + uint32 B; + uint32 C; + uint32 D; + uint32 E; +}; + +const int k_cubAppProofOfPurchaseKeyMax = 64; // max bytes of a legacy cd key we support + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: called when new information about an app has arrived +//----------------------------------------------------------------------------- +struct AppDataChanged_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 1 }; + + AppId_t m_nAppID; + + bool m_bBySteamUI; + bool m_bCDDBUpdate; +}; + +struct RequestAppCallbacksComplete_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 2 }; +}; + +struct AppInfoUpdateComplete_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 3 }; + + EResult m_EResult; + uint32 m_cAppsUpdated; + bool m_bSteam2CDDBChanged; +}; + +struct AppEventTriggered_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 4 }; + + AppId_t m_nAppID; + EAppEvent m_eAppEvent; +}; + +//----------------------------------------------------------------------------- +// Purpose: posted after the user gains ownership of DLC & that DLC is installed +//----------------------------------------------------------------------------- +struct DlcInstalled_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 5 }; + + AppId_t m_nAppID; // AppID of the DLC +}; + +struct AppEventStateChange_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 6 }; + + AppId_t m_nAppID; + uint32 m_eOldState; + uint32 m_eNewState; + EAppUpdateError m_eAppError; +}; + +struct AppValidationComplete_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 7 }; + + AppId_t m_nAppID; + bool m_bFinished; + + uint64 m_TotalBytesValidated; + uint64 m_TotalBytesFailed; + uint32 m_TotalFilesValidated; + uint32 m_TotalFilesFailed; + uint32 m_TotalFilesFailedCEGFiles; +}; + +//----------------------------------------------------------------------------- +// Purpose: response to RegisterActivationCode() +//----------------------------------------------------------------------------- +struct RegisterActivationCodeResponse_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 8 }; + + ERegisterActivactionCodeResult m_eResult; + uint32 m_unPackageRegistered; // package that was registered. Only set on success +}; + +struct DownloadScheduleChanged_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 9 }; + + bool m_bDownloadEnabled; + uint32 m_nTotalAppsScheduled; + unsigned int m_rgunAppSchedule[32]; +}; + +struct DlcInstallRequest_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 10 }; + + AppId_t m_nAppID; + bool m_bInstall; +}; + +struct AppLaunchTenFootOverlay_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 11 }; + + CGameID m_GameID; + uint64 m_nPid; + bool m_bCanShareSurfaces; +}; + +struct AppBackupStatus_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 12 }; + + AppId_t m_nAppID; + EResult m_eResult; + + uint64 m_unBytesToProcess; + uint64 m_unBytesProcessed; + uint64 m_unTotalBytesWritten; + uint64 m_unBytesFailed; +}; + +struct RequestAppProofOfPurchaseKeyResponse_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 13 }; + + EResult m_eResult; + AppId_t m_nAppID; + char m_rgchKey[ k_cubAppProofOfPurchaseKeyMax ]; +}; + +//--------------------------------------------------------------------------------- +// Purpose: posted after the user gains executes a steam url with query parameters +// such as steam://run///?param1=value1;param2=value2;param3=value3; etc +// while the game is already running. The new params can be queried +// with GetLaunchQueryParam. +//--------------------------------------------------------------------------------- +struct NewLaunchQueryParameters_t +{ + enum { k_iCallback = k_iSteamAppsCallbacks + 14 }; +}; +#pragma pack( pop ) + +#endif // APPSCOMMON_H diff --git a/src/public SDK/BillingCommon.h b/src/public SDK/BillingCommon.h new file mode 100644 index 0000000..18c63d5 --- /dev/null +++ b/src/public SDK/BillingCommon.h @@ -0,0 +1,236 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef BILLINGCOMMON_H +#define BILLINGCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTBILLING_INTERFACE_VERSION "CLIENTBILLING_INTERFACE_VERSION001" + +#define STEAMBILLING_INTERFACE_VERSION_001 "SteamBilling001" +#define STEAMBILLING_INTERFACE_VERSION_002 "SteamBilling002" + + + +// Flags for licenses - BITS +typedef enum ELicenseFlags +{ + k_ELicenseFlagNone = 0, + k_ELicenseFlagRenew = 0x01, // Renew this license next period + k_ELicenseFlagRenewalFailed = 0x02, // Auto-renew failed + k_ELicenseFlagPending = 0x04, // Purchase or renewal is pending + k_ELicenseFlagExpired = 0x08, // Regular expiration (no renewal attempted) + k_ELicenseFlagCancelledByUser = 0x10, // Cancelled by the user + k_ELicenseFlagCancelledByAdmin = 0x20, // Cancelled by customer support + k_ELicenseFlagLowViolence = 0x40, + k_ELicenseFlagImportedFromSteam2 = 0x80, +} ELicenseFlags; + +// Payment methods for purchases +typedef enum EPaymentMethod +{ + k_EPaymentMethodNone = 0, + k_EPaymentMethodActivationCode = 1, + k_EPaymentMethodCreditCard = 2, + k_EPaymentMethodGiropay = 3, + k_EPaymentMethodPayPal = 4, + k_EPaymentMethodIdeal = 5, + k_EPaymentMethodPaySafeCard = 6, + k_EPaymentMethodSofort = 7, + k_EPaymentMethodGuestPass = 8, + k_EPaymentMethodWebMoney = 9, + k_EPaymentMethodMoneyBookers = 10, + k_EPaymentMethodAliPay = 11, + k_EPaymentMethodYandex = 12, + k_EPaymentMethodKiosk = 13, + k_EPaymentMethodQIWI = 14, + k_EPaymentMethodGameStop = 15, + k_EPaymentMethodHardwarePromo = 16, + k_EPaymentMethodMopay = 17, + k_EPaymentMethodBoletoBancario = 18, + k_EPaymentMethodBoaCompraGold = 19, + k_EPaymentMethodBancoDoBrasilOnline = 20, + k_EPaymentMethodItauOnline = 21, + k_EPaymentMethodBradescoOnline = 22, + k_EPaymentMethodPagseguro = 23, + k_EPaymentMethodVisaBrazil = 24, + k_EPaymentMethodAmexBrazil = 25, + k_EPaymentMethodAura = 26, + k_EPaymentMethodHipercard = 27, + k_EPaymentMethodMastercardBrazil = 28, + k_EPaymentMethodDinerSCardBrazil = 29, + + k_EPaymentMethodClickAndBuy = 32, + k_EPaymentMethodAutoGrant = 64, + k_EPaymentMethodWallet = 128, + k_EPaymentMethodValve = 129, + k_EPaymentMethodOEMTicket = 256, + k_EPaymentMethodSplit = 512, + k_EPaymentMethodComplimentary = 1024, + k_EPaymentMethodAuthorizedDevice = 30, +} EPaymentMethod; + +typedef enum EPurchaseResultDetail +{ + k_EPurchaseResultNoDetail = 0, + k_EPurchaseResultAVSFailure = 1, + k_EPurchaseResultInsufficientFunds = 2, + k_EPurchaseResultContactSupport = 3, + k_EPurchaseResultTimeout = 4, + + // these are mainly used for testing + k_EPurchaseResultInvalidPackage = 5, + k_EPurchaseResultInvalidPaymentMethod = 6, + k_EPurchaseResultInvalidData = 7, + k_EPurchaseResultOthersInProgress = 8, + k_EPurchaseResultAlreadyPurchased = 9, + k_EPurchaseResultWrongPrice = 10, + + k_EPurchaseResultFraudCheckFailed = 11, + k_EPurchaseResultCancelledByUser = 12, + k_EPurchaseResultRestrictedCountry = 13, + k_EPurchaseResultBadActivationCode = 14, + k_EPurchaseResultDuplicateActivationCode = 15, + k_EPurchaseResultUseOtherPaymentMethod = 16, + k_EPurchaseResultUseOtherFundingSource = 17, + k_EPurchaseResultInvalidShippingAddress = 18, + k_EPurchaseResultRegionNotSupported = 19, + k_EPurchaseResultAcctIsBlocked = 20, + k_EPurchaseResultAcctNotVerified = 21, + k_EPurchaseResultInvalidAccount = 22, + k_EPurchaseResultStoreBillingCountryMismatch = 23, + k_EPurchaseResultDoesNotOwnRequiredApp = 24, + k_EPurchaseResultCanceledByNewTransaction = 25, + k_EPurchaseResultForceCanceledPending = 26, + k_EPurchaseResultFailCurrencyTransProvider = 27, + k_EPurchaseResultFailedCyberCafe = 28, + k_EPurchaseResultNeedsPreApproval = 29, + k_EPurchaseResultPreApprovalDenied = 30, + k_EPurchaseResultWalletCurrencyMismatch = 31, + k_EPurchaseResultEmailNotValidated = 32, + k_EPurchaseResultExpiredCard = 33, + k_EPurchaseResultTransactionExpired = 34, + k_EPurchaseResultWouldExceedMaxWallet = 35, + k_EPurchaseResultMustLoginPS3AppForPurchase = 36, + k_EPurchaseResultCannotShipToPOBox = 37, +} EPurchaseResultDetail; + +typedef enum EPurchaseStatus +{ + k_EPurchasePending = 0, + k_EPurchaseSucceeded = 1, + k_EPurchaseFailed = 2, + k_EPurchaseRefunded = 3, + k_EPurchaseInit = 4, + k_EPurchaseChargedback = 5, + k_EPurchaseRevoked = 6, + k_EPurchaseInDispute = 7, + k_EPurchasePartialRefund = 8, + k_EPurchaseRefundToWallet = 9, +} EPurchaseStatus; + +typedef enum ECreditCardType +{ + k_ECreditCardTypeUnknown = 0, + k_ECreditCardTypeVisa = 1, + k_ECreditCardTypeMaster = 2, + k_ECreditCardTypeAmericanExpress = 3, + k_ECreditCardTypeDiscover = 4, + k_ECreditCardTypeDinersClub = 5, + k_ECreditCardTypeJCB = 6, + k_ECreditCardTypeCarteBleue = 7, + k_ECreditCardTypeDankort = 8, + k_ECreditCardTypeMaestro = 9, + k_ECreditCardTypeSolo = 10, + k_ECreditCardTypeLaser = 11, +} ECreditCardType; + +enum ELicenseType +{ + k_ENoLicense = 0, + k_ESinglePurchase = 1, + k_ESinglePurchaseLimitedUse = 2, + k_ERecurringCharge = 3, + k_ERecurringChargeLimitedUse = 4, + k_ERecurringChargeLimitedUseWithOverages = 5, +}; + + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: called when this client has received a finalprice message from a Billing +//----------------------------------------------------------------------------- +struct OBSOLETE_CALLBACK FinalPriceMsg_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 1 }; + + uint32 m_bSuccess; + uint32 m_nBaseCost; + uint32 m_nTotalDiscount; + uint32 m_nTax; + uint32 m_nShippingCost; +}; + +struct OBSOLETE_CALLBACK PurchaseMsg_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 2 }; + + uint32 m_bSuccess; + int32 m_EPurchaseResultDetail; // Detailed result information +}; + +// Sent in response to PurchaseWithActivationCode +struct PurchaseResponse_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 4 }; + + EResult m_EResult; + int32 m_EPurchaseResultDetail; + int32 m_iReceiptIndex; +}; + +struct CancelLicenseMsg_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 9 }; + + enum EResult m_EResult; +}; + +struct RequestFreeLicenseResponse_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 12 }; + + EResult m_EResult; + AppId_t m_uAppId; +}; + +struct OEMTicketActivationResponse_t +{ + enum { k_iCallback = k_iSteamBillingCallbacks + 14 }; + + EResult m_EResult; + EPurchaseResultDetail m_EPurchaseResultDetail; + PackageId_t m_nPackageID; + int m_iReceiptIndex; +}; +#pragma pack( pop ) + + +#endif // BILLINGCOMMON_H diff --git a/src/public SDK/BridgeCommon.h b/src/public SDK/BridgeCommon.h new file mode 100644 index 0000000..e18005e --- /dev/null +++ b/src/public SDK/BridgeCommon.h @@ -0,0 +1,26 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef BRIDGECOMMON_H +#define BRIDGECOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define STEAM2BRIDGE_INTERFACE_VERSION_001 "STEAM2BRIDGE_INTERFACE_VERSION001" +#define STEAM2BRIDGE_INTERFACE_VERSION_002 "STEAM2BRIDGE_INTERFACE_VERSION002" + +#endif // BRIDGECOMMON_H diff --git a/src/public SDK/CCallback.h b/src/public SDK/CCallback.h new file mode 100644 index 0000000..7296182 --- /dev/null +++ b/src/public SDK/CCallback.h @@ -0,0 +1,264 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#if !defined(CCALLBACK_H) && !defined(_S4N_) +#define CCALLBACK_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +// Declares a callback member function plus a helper member variable which +// registers the callback on object creation and unregisters on destruction. +// The optional fourth 'var' param exists only for backwards-compatibility +// and can be ignored. +#define STEAM_CALLBACK( thisclass, func, .../*callback_type, [deprecated] var*/ ) \ + _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, 4, 3 ), ( /**/, thisclass, func, __VA_ARGS__ ) ) + +// Declares a callback function and a named CCallbackManual variable which +// has Register and Unregister functions instead of automatic registration. +#define STEAM_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ + CCallbackManual< thisclass, callback_type > var; void func( callback_type *pParam ) + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// These macros are similar to the STEAM_CALLBACK_* macros in steam_api.h, but only trigger for gameserver callbacks +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +#define STEAM_GAMESERVER_CALLBACK( thisclass, func, /*callback_type, [deprecated] var*/... ) \ + _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, GS, 3 ), ( this->SetGameserverFlag();, thisclass, func, __VA_ARGS__ ) ) + +#define STEAM_GAMESERVER_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ + CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam ) + + + +#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \ + CCallback< thisclass, param, true > var; void func( param *pParam ) + +//----------------------------------------------------------------------------- +// Purpose: base for callbacks and call results - internal implementation detail +//----------------------------------------------------------------------------- +class CCallbackBase +{ +public: + CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; } + // don't add a virtual destructor because we export this binary interface across dll's + virtual void Run( void *pvParam ) = 0; + virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) = 0; + int GetICallback() { return m_iCallback; } + virtual int GetCallbackSizeBytes() = 0; + +protected: + enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 }; + uint8 m_nCallbackFlags; + int m_iCallback; + friend class CCallbackMgr; + +private: + CCallbackBase( const CCallbackBase& ); + CCallbackBase& operator=( const CCallbackBase& ); +}; + +//----------------------------------------------------------------------------- +// Purpose: templated base for callbacks - internal implementation detail +//----------------------------------------------------------------------------- +template< int sizeof_P > +class CCallbackImpl : protected CCallbackBase +{ +public: + ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); } + void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } + +protected: + virtual void Run( void *pvParam ) = 0; + virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) { Run( pvParam ); } + virtual int GetCallbackSizeBytes() { return sizeof_P; } +}; + +//----------------------------------------------------------------------------- +// Purpose: maps a steam async call result to a class member function +// template params: T = local class, P = parameter struct +//----------------------------------------------------------------------------- +template< class T, class P > +class CCallResult : private CCallbackBase +{ +public: + typedef void (T::*func_t)( P*, bool ); + + CCallResult() + { + m_hAPICall = k_uAPICallInvalid; + m_pObj = NULL; + m_Func = NULL; + m_iCallback = P::k_iCallback; + } + + void Set( SteamAPICall_t hAPICall, T *p, func_t func ) + { + if ( m_hAPICall ) + SteamAPI_UnregisterCallResult( this, m_hAPICall ); + + m_hAPICall = hAPICall; + m_pObj = p; + m_Func = func; + + if ( hAPICall ) + SteamAPI_RegisterCallResult( this, hAPICall ); + } + + bool IsActive() const + { + return ( m_hAPICall != k_uAPICallInvalid ); + } + + void Cancel() + { + if ( m_hAPICall != k_uAPICallInvalid ) + { + SteamAPI_UnregisterCallResult( this, m_hAPICall ); + m_hAPICall = k_uAPICallInvalid; + } + + } + + ~CCallResult() + { + Cancel(); + } + +private: + virtual void Run( void *pvParam ) + { + m_hAPICall = k_uAPICallInvalid; // caller unregisters for us + (m_pObj->*m_Func)( (P *)pvParam, false ); + } + virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) + { + if ( hSteamAPICall == m_hAPICall ) + { + m_hAPICall = k_uAPICallInvalid; // caller unregisters for us + (m_pObj->*m_Func)( (P *)pvParam, bIOFailure ); + } + } + virtual int GetCallbackSizeBytes() + { + return sizeof( P ); + } + + SteamAPICall_t m_hAPICall; + T *m_pObj; + func_t m_Func; +}; + + + +//----------------------------------------------------------------------------- +// Purpose: maps a steam callback to a class member function +// template params: T = local class, P = parameter struct, +// bGameserver = listen for gameserver callbacks instead of client callbacks +//----------------------------------------------------------------------------- +template< class T, class P, bool bGameserver = false > +class CCallback : public CCallbackImpl< sizeof( P ) > +{ +public: + typedef void (T::*func_t)(P*); + + // NOTE: If you can't provide the correct parameters at construction time, you should + // use the CCallbackManual callback object (STEAM_CALLBACK_MANUAL macro) instead. + CCallback( T *pObj, func_t func ) : m_pObj( NULL ), m_Func( NULL ) + { + if ( bGameserver ) + { + this->SetGameserverFlag(); + } + Register( pObj, func ); + } + + // manual registration of the callback + void Register( T *pObj, func_t func ) + { + if ( !pObj || !func ) + return; + + if ( this->m_nCallbackFlags & CCallbackBase::k_ECallbackFlagsRegistered ) + Unregister(); + + m_pObj = pObj; + m_Func = func; + // SteamAPI_RegisterCallback sets k_ECallbackFlagsRegistered + SteamAPI_RegisterCallback( this, P::k_iCallback ); + } + + void Unregister() + { + // SteamAPI_UnregisterCallback removes k_ECallbackFlagsRegistered + SteamAPI_UnregisterCallback( this ); + } + +protected: + virtual void Run( void *pvParam ) + { + (m_pObj->*m_Func)( (P *)pvParam ); + } + + T *m_pObj; + func_t m_Func; +}; + + +//----------------------------------------------------------------------------- +// Purpose: subclass of CCallback which allows default-construction in +// an unregistered state; you must call Register manually +//----------------------------------------------------------------------------- +template< class T, class P, bool bGameServer = false > +class CCallbackManual : public CCallback< T, P, bGameServer > +{ +public: + CCallbackManual() : CCallback< T, P, bGameServer >( NULL, NULL ) {} + + // Inherits public Register and Unregister functions from base class +}; + + +//----------------------------------------------------------------------------- +// The following macros are implementation details, not intended for public use +//----------------------------------------------------------------------------- +#define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) +#define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED +#define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y +#define _STEAM_CALLBACK_3( extra_code, thisclass, func, param ) \ +struct CCallbackInternal_ ## func : private CCallbackImpl< sizeof( param ) > { \ + CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \ + CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \ + CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \ +private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \ + thisclass *pOuter = reinterpret_cast( reinterpret_cast(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \ + pOuter->func( reinterpret_cast( pvParam ) ); \ +} \ +} m_steamcallback_ ## func ; void func( param *pParam ) +#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \ + CCallback< thisclass, param > var; void func( param *pParam ) + + + +#ifdef _MSC_VER + // disable this warning; this pattern need for steam callback registration + #pragma warning( disable: 4355 ) // 'this' : used in base member initializer list +#endif + + + +#endif // CCALLBACK_H diff --git a/src/public SDK/CGameID.h b/src/public SDK/CGameID.h new file mode 100644 index 0000000..7e7225d --- /dev/null +++ b/src/public SDK/CGameID.h @@ -0,0 +1,254 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef CGAMEID_H +#define CGAMEID_H +#ifdef _WIN32 +#pragma once +#endif + + +#pragma pack( push, 1 ) + +//----------------------------------------------------------------------------- +// Purpose: encapsulates an appID/modID pair +//----------------------------------------------------------------------------- +class CGameID +{ +public: + + CGameID() + { + m_gameID.m_nType = k_EGameIDTypeApp; + m_gameID.m_nAppID = k_uAppIdInvalid; + m_gameID.m_nModID = 0; + } + + explicit CGameID( uint64 ulGameID ) + { + m_ulGameID = ulGameID; + } + + explicit CGameID( int32 nAppID ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = nAppID; + } + + explicit CGameID( uint32 nAppID ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = nAppID; + } + + CGameID( uint32 nAppID, uint32 nModID ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = nAppID; + m_gameID.m_nModID = nModID; + m_gameID.m_nType = k_EGameIDTypeGameMod; + } + + // Hidden functions used only by Steam + explicit CGameID( const char *pchGameID ); + const char *Render() const; // render this Game ID to string + static const char *Render( uint64 ulGameID ); // static method to render a uint64 representation of a Game ID to a string + + // must include checksum_crc.h first to get this functionality +#if defined( CHECKSUM_CRC_H ) + CGameID( uint32 nAppID, const char *pchModPath ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = nAppID; + m_gameID.m_nType = k_EGameIDTypeGameMod; + + char rgchModDir[MAX_PATH]; + Q_FileBase( pchModPath, rgchModDir, sizeof( rgchModDir ) ); + CRC32_t crc32; + CRC32_Init( &crc32 ); + CRC32_ProcessBuffer( &crc32, rgchModDir, Q_strlen( rgchModDir ) ); + CRC32_Final( &crc32 ); + + // set the high-bit on the mod-id + // reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique + // replacement for appID's + m_gameID.m_nModID = crc32 | (0x80000000); + } + + CGameID( const char *pchExePath, const char *pchAppName ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = k_uAppIdInvalid; + m_gameID.m_nType = k_EGameIDTypeShortcut; + + CRC32_t crc32; + CRC32_Init( &crc32 ); + CRC32_ProcessBuffer( &crc32, pchExePath, Q_strlen( pchExePath ) ); + CRC32_ProcessBuffer( &crc32, pchAppName, Q_strlen( pchAppName ) ); + CRC32_Final( &crc32 ); + + // set the high-bit on the mod-id + // reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique + // replacement for appID's + m_gameID.m_nModID = crc32 | (0x80000000); + } + +#if defined( VSTFILEID_H ) + + CGameID( VstFileID vstFileID ) + { + m_ulGameID = 0; + m_gameID.m_nAppID = k_uAppIdInvalid; + m_gameID.m_nType = k_EGameIDTypeP2P; + + CRC32_t crc32; + CRC32_Init( &crc32 ); + const char *pchFileId = vstFileID.Render(); + CRC32_ProcessBuffer( &crc32, pchFileId, Q_strlen( pchFileId ) ); + CRC32_Final( &crc32 ); + + // set the high-bit on the mod-id + // reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique + // replacement for appID's + m_gameID.m_nModID = crc32 | (0x80000000); + } + +#endif /* VSTFILEID_H */ + +#endif /* CHECKSUM_CRC_H */ + + + uint64 ToUint64() const + { + return m_ulGameID; + } + + uint64 *GetUint64Ptr() + { + return &m_ulGameID; + } + + bool IsMod() const + { + return ( m_gameID.m_nType == k_EGameIDTypeGameMod ); + } + + bool IsShortcut() const + { + return ( m_gameID.m_nType == k_EGameIDTypeShortcut ); + } + + bool IsP2PFile() const + { + return ( m_gameID.m_nType == k_EGameIDTypeP2P ); + } + + bool IsSteamApp() const + { + return ( m_gameID.m_nType == k_EGameIDTypeApp ); + } + + uint32 ModID() const + { + return m_gameID.m_nModID; + } + + uint32 AppID() const + { + return m_gameID.m_nAppID; + } + + bool operator == ( const CGameID &rhs ) const + { + return m_ulGameID == rhs.m_ulGameID; + } + + bool operator != ( const CGameID &rhs ) const + { + return !(*this == rhs); + } + + bool operator < ( const CGameID &rhs ) const + { + return ( m_ulGameID < rhs.m_ulGameID ); + } + + bool IsValid() const + { + // each type has it's own invalid fixed point: + switch( m_gameID.m_nType ) + { + case k_EGameIDTypeApp: + return m_gameID.m_nAppID != k_uAppIdInvalid; + break; + case k_EGameIDTypeGameMod: + return m_gameID.m_nAppID != k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000; + break; + case k_EGameIDTypeShortcut: + return (m_gameID.m_nModID & 0x80000000) != 0; + break; + case k_EGameIDTypeP2P: + return m_gameID.m_nAppID == k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000; + break; + default: +#if defined(Assert) + Assert(false); +#endif + return false; + } + + } + + void Reset() + { + m_ulGameID = 0; + } + + + +private: + + enum EGameIDType + { + k_EGameIDTypeApp = 0, + k_EGameIDTypeGameMod = 1, + k_EGameIDTypeShortcut = 2, + k_EGameIDTypeP2P = 3, + }; + + struct GameID_t + { +#ifdef VALVE_BIG_ENDIAN + unsigned int m_nModID : 32; + unsigned int m_nType : 8; + unsigned int m_nAppID : 24; +#else + unsigned int m_nAppID : 24; + unsigned int m_nType : 8; + unsigned int m_nModID : 32; +#endif + }; + + union + { + uint64 m_ulGameID; + GameID_t m_gameID; + }; +}; + +#pragma pack( pop ) + +#endif // CGAMEID_H diff --git a/src/public SDK/CSteamAPIContext.h b/src/public SDK/CSteamAPIContext.h new file mode 100644 index 0000000..553da97 --- /dev/null +++ b/src/public SDK/CSteamAPIContext.h @@ -0,0 +1,183 @@ +#ifndef CSTEAMAPICONTEXT_H +#define CSTEAMAPICONTEXT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "Steamclient.h" + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// VERSION_SAFE_STEAM_API_INTERFACES uses CSteamAPIContext to provide interfaces to each module in a way that +// lets them each specify the interface versions they are compiled with. +// +// It's important that these stay inlined in the header so the calling module specifies the interface versions +// for whatever Steam API version it has. +//----------------------------------------------------------------------------------------------------------------------------------------------------------// + +class CSteamAPIContext +{ +public: + CSteamAPIContext(); + void Clear(); + + bool Init(); + + ISteamUser013* SteamUser() { return m_pSteamUser; } + ISteamFriends005* SteamFriends() { return m_pSteamFriends; } + ISteamUtils005* SteamUtils() { return m_pSteamUtils; } + ISteamMatchmaking008* SteamMatchmaking() { return m_pSteamMatchmaking; } + ISteamUserStats007* SteamUserStats() { return m_pSteamUserStats; } + ISteamApps003* SteamApps() { return m_pSteamApps; } + ISteamMatchmakingServers002* SteamMatchmakingServers() { return m_pSteamMatchmakingServers; } + ISteamNetworking003* SteamNetworking() { return m_pSteamNetworking; } + ISteamRemoteStorage002* SteamRemoteStorage() { return m_pSteamRemoteStorage; } + +private: + ISteamUser013 *m_pSteamUser; + ISteamFriends005 *m_pSteamFriends; + ISteamUtils005 *m_pSteamUtils; + ISteamMatchmaking008 *m_pSteamMatchmaking; + ISteamUserStats007 *m_pSteamUserStats; + ISteamApps003 *m_pSteamApps; + ISteamMatchmakingServers002 *m_pSteamMatchmakingServers; + ISteamNetworking003 *m_pSteamNetworking; + ISteamRemoteStorage002 *m_pSteamRemoteStorage; +}; + +inline CSteamAPIContext::CSteamAPIContext() +{ + Clear(); +} + +inline void CSteamAPIContext::Clear() +{ + m_pSteamUser = NULL; + m_pSteamFriends = NULL; + m_pSteamUtils = NULL; + m_pSteamMatchmaking = NULL; + m_pSteamUserStats = NULL; + m_pSteamApps = NULL; + m_pSteamMatchmakingServers = NULL; + m_pSteamNetworking = NULL; + m_pSteamRemoteStorage = NULL; +} + +// This function must be inlined so the module using steam_api.dll gets the version names they want. +inline bool CSteamAPIContext::Init() +{ + if ( !SteamClient() ) + return false; + + HSteamUser hSteamUser = SteamAPI_GetHSteamUser(); + HSteamPipe hSteamPipe = SteamAPI_GetHSteamPipe(); + + m_pSteamUser = (ISteamUser013 *)SteamClient()->GetISteamUser( hSteamUser, hSteamPipe, STEAMUSER_INTERFACE_VERSION_013 ); + if ( !m_pSteamUser ) + return false; + + m_pSteamFriends = (ISteamFriends005 *)SteamClient()->GetISteamFriends( hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION_005 ); + if ( !m_pSteamFriends ) + return false; + + m_pSteamUtils = (ISteamUtils005 *)SteamClient()->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION_005 ); + if ( !m_pSteamUtils ) + return false; + + m_pSteamMatchmaking = (ISteamMatchmaking008 *)SteamClient()->GetISteamMatchmaking( hSteamUser, hSteamPipe, STEAMMATCHMAKING_INTERFACE_VERSION_008 ); + if ( !m_pSteamMatchmaking ) + return false; + + m_pSteamMatchmakingServers = (ISteamMatchmakingServers002 *)SteamClient()->GetISteamMatchmakingServers( hSteamUser, hSteamPipe, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION_002 ); + if ( !m_pSteamMatchmakingServers ) + return false; + + m_pSteamUserStats = (ISteamUserStats007 *)SteamClient()->GetISteamUserStats( hSteamUser, hSteamPipe, STEAMUSERSTATS_INTERFACE_VERSION_007 ); + if ( !m_pSteamUserStats ) + return false; + + m_pSteamApps = (ISteamApps003 *)SteamClient()->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION_003 ); + if ( !m_pSteamApps ) + return false; + + m_pSteamNetworking = (ISteamNetworking003 *)SteamClient()->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION_003 ); + if ( !m_pSteamNetworking ) + return false; + + m_pSteamRemoteStorage = (ISteamRemoteStorage002 *)SteamClient()->GetISteamRemoteStorage( hSteamUser, hSteamPipe, STEAMREMOTESTORAGE_INTERFACE_VERSION_002 ); + if ( !m_pSteamRemoteStorage ) + return false; + + return true; +} + +class CSteamGameServerAPIContext +{ +public: + CSteamGameServerAPIContext(); + void Clear(); + + bool Init(); + + ISteamGameServer010 *SteamGameServer() { return m_pSteamGameServer; } + ISteamUtils005 *SteamGameServerUtils() { return m_pSteamGameServerUtils; } + ISteamMasterServerUpdater001 *SteamMasterServerUpdater() { return m_pSteamMasterServerUpdater; } + ISteamNetworking003 *SteamGameServerNetworking() { return m_pSteamGameServerNetworking; } + ISteamGameServerStats001 *SteamGameServerStats() { return m_pSteamGameServerStats; } + +private: + ISteamGameServer010 *m_pSteamGameServer; + ISteamUtils005 *m_pSteamGameServerUtils; + ISteamMasterServerUpdater001 *m_pSteamMasterServerUpdater; + ISteamNetworking003 *m_pSteamGameServerNetworking; + ISteamGameServerStats001 *m_pSteamGameServerStats; +}; + +inline CSteamGameServerAPIContext::CSteamGameServerAPIContext() +{ + Clear(); +} + +inline void CSteamGameServerAPIContext::Clear() +{ + m_pSteamGameServer = NULL; + m_pSteamGameServerUtils = NULL; + m_pSteamMasterServerUpdater = NULL; + m_pSteamGameServerNetworking = NULL; + m_pSteamGameServerStats = NULL; +} + +S_API ISteamClient009 *g_pSteamClientGameServer; +// This function must be inlined so the module using steam_api.dll gets the version names they want. +inline bool CSteamGameServerAPIContext::Init() +{ + if ( !g_pSteamClientGameServer ) + return false; + + HSteamUser hSteamUser = SteamGameServer_GetHSteamUser(); + HSteamPipe hSteamPipe = SteamGameServer_GetHSteamPipe(); + + m_pSteamGameServer = (ISteamGameServer010 *)g_pSteamClientGameServer->GetISteamGameServer( hSteamUser, hSteamPipe, STEAMGAMESERVER_INTERFACE_VERSION_010 ); + if ( !m_pSteamGameServer ) + return false; + + m_pSteamGameServerUtils = (ISteamUtils005 *)g_pSteamClientGameServer->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION_005 ); + if ( !m_pSteamGameServerUtils ) + return false; + + m_pSteamMasterServerUpdater = (ISteamMasterServerUpdater001 *)g_pSteamClientGameServer->GetISteamMasterServerUpdater( hSteamUser, hSteamPipe, STEAMMASTERSERVERUPDATER_INTERFACE_VERSION_001 ); + if ( !m_pSteamMasterServerUpdater ) + return false; + + m_pSteamGameServerNetworking = (ISteamNetworking003 *)g_pSteamClientGameServer->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION_003 ); + if ( !m_pSteamGameServerNetworking ) + return false; + + m_pSteamGameServerStats = (ISteamGameServerStats001 *)g_pSteamClientGameServer->GetISteamGameServerStats( hSteamUser, hSteamPipe, STEAMGAMESERVERSTATS_INTERFACE_VERSION_001 ); + if ( !m_pSteamGameServerStats ) + return false; + + return true; +} + +#endif // CSTEAMAPICONTEXT_H diff --git a/src/public SDK/CSteamID.h b/src/public SDK/CSteamID.h new file mode 100644 index 0000000..f98e4da --- /dev/null +++ b/src/public SDK/CSteamID.h @@ -0,0 +1,595 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef CSTEAMID_H +#define CSTEAMID_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#ifdef _S4N_ + #define sprintf(...) +#else + #include + #ifndef NO_CSTEAMID_STL + #include + #endif //NO_CSTEAMID_STL +#endif + + + +enum EAccountType +{ + k_EAccountTypeInvalid = 0, + k_EAccountTypeIndividual = 1, // single user account + k_EAccountTypeMultiseat = 2, // multiseat (e.g. cybercafe) account + k_EAccountTypeGameServer = 3, // game server account + k_EAccountTypeAnonGameServer = 4, // anonymous game server account + k_EAccountTypePending = 5, // pending + k_EAccountTypeContentServer = 6, // content server + k_EAccountTypeClan = 7, + k_EAccountTypeChat = 8, + k_EAccountTypeConsoleUser = 9, // Fake SteamID for local PSN account on PS3 or Live account on 360, etc. + k_EAccountTypeAnonUser = 10, + + // Max of 16 items in this field + k_EAccountTypeMax +}; + +#pragma pack( push, 1 ) + +// Steam ID structure (64 bits total) +class CSteamID +{ +public: + + //----------------------------------------------------------------------------- + // Purpose: Constructor + //----------------------------------------------------------------------------- + CSteamID() + { + m_steamid.m_comp.m_unAccountID = 0; + m_steamid.m_comp.m_EAccountType = k_EAccountTypeInvalid; + m_steamid.m_comp.m_EUniverse = k_EUniverseInvalid; + m_steamid.m_comp.m_unAccountInstance = 0; + } + + + //----------------------------------------------------------------------------- + // Purpose: Constructor + // Input : unAccountID - 32-bit account ID + // eUniverse - Universe this account belongs to + // eAccountType - Type of account + //----------------------------------------------------------------------------- + CSteamID( uint32 unAccountID, EUniverse eUniverse, EAccountType eAccountType ) + { + Set( unAccountID, eUniverse, eAccountType ); + } + + + //----------------------------------------------------------------------------- + // Purpose: Constructor + // Input : unAccountID - 32-bit account ID + // unAccountInstance - instance + // eUniverse - Universe this account belongs to + // eAccountType - Type of account + //----------------------------------------------------------------------------- + CSteamID( uint32 unAccountID, unsigned int unAccountInstance, EUniverse eUniverse, EAccountType eAccountType ) + { +#if defined(_SERVER) && defined(Assert) + Assert( ! ( ( k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserWebInstance ) ) ); // enforce that for individual accounts, instance is always 1 +#endif // _SERVER + InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType ); + } + + + //----------------------------------------------------------------------------- + // Purpose: Constructor + // Input : ulSteamID - 64-bit representation of a Steam ID + // Note: Will not accept a uint32 or int32 as input, as that is a probable mistake. + // See the stubbed out overloads in the private: section for more info. + //----------------------------------------------------------------------------- + CSteamID( uint64 ulSteamID ) + { + SetFromUint64( ulSteamID ); + } + + + //----------------------------------------------------------------------------- + // Purpose: Sets parameters for steam ID + // Input : unAccountID - 32-bit account ID + // eUniverse - Universe this account belongs to + // eAccountType - Type of account + //----------------------------------------------------------------------------- + void Set( uint32 unAccountID, EUniverse eUniverse, EAccountType eAccountType ) + { + m_steamid.m_comp.m_unAccountID = unAccountID; + m_steamid.m_comp.m_EUniverse = eUniverse; + m_steamid.m_comp.m_EAccountType = eAccountType; + + if ( eAccountType == k_EAccountTypeClan ) + { + m_steamid.m_comp.m_unAccountInstance = 0; + } + else + { + // by default we pick the desktop instance + m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance; + } + } + + + //----------------------------------------------------------------------------- + // Purpose: Sets parameters for steam ID + // Input : unAccountID - 32-bit account ID + // eUniverse - Universe this account belongs to + // eAccountType - Type of account + //----------------------------------------------------------------------------- + void InstancedSet( uint32 unAccountID, uint32 unInstance, EUniverse eUniverse, EAccountType eAccountType ) + { + m_steamid.m_comp.m_unAccountID = unAccountID; + m_steamid.m_comp.m_EUniverse = eUniverse; + m_steamid.m_comp.m_EAccountType = eAccountType; + m_steamid.m_comp.m_unAccountInstance = unInstance; + } + + + //----------------------------------------------------------------------------- + // Purpose: Initializes a steam ID from its 52 bit parts and universe/type + // Input : ulIdentifier - 52 bits of goodness + //----------------------------------------------------------------------------- + void FullSet( uint64 ulIdentifier, EUniverse eUniverse, EAccountType eAccountType ) + { + m_steamid.m_comp.m_unAccountID = ( ulIdentifier & k_unSteamAccountIDMask ); // account ID is low 32 bits + m_steamid.m_comp.m_unAccountInstance = ( ( ulIdentifier >> 32 ) & k_unSteamAccountInstanceMask ); // account instance is next 20 bits + m_steamid.m_comp.m_EUniverse = eUniverse; + m_steamid.m_comp.m_EAccountType = eAccountType; + } + + + //----------------------------------------------------------------------------- + // Purpose: Initializes a steam ID from its 64-bit representation + // Input : ulSteamID - 64-bit representation of a Steam ID + //----------------------------------------------------------------------------- + void SetFromUint64( uint64 ulSteamID ) + { + m_steamid.m_unAll64Bits = ulSteamID; + } + +#ifdef TSTEAMGLOBALUSERID_H // NO_STEAM would not include TSteamGlobalUserID.h, thus we lose this facet of CSteamID + //----------------------------------------------------------------------------- + // Purpose: Initializes a steam ID from a Steam2 ID structure + // Input: pTSteamGlobalUserID - Steam2 ID to convert + // eUniverse - universe this ID belongs to + //----------------------------------------------------------------------------- + void SetFromSteam2( TSteamGlobalUserID *pTSteamGlobalUserID, EUniverse eUniverse ) + { + m_steamid.m_comp.m_unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 + + pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits; + m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe + m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual + m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance; // Steam2 only knew desktop instances + } + + //----------------------------------------------------------------------------- + // Purpose: Fills out a Steam2 ID structure + // Input: pTSteamGlobalUserID - Steam2 ID to write to + //----------------------------------------------------------------------------- + void ConvertToSteam2( TSteamGlobalUserID *pTSteamGlobalUserID ) const + { + // only individual accounts have any meaning in Steam 2, only they can be mapped + // Assert( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual ); + + pTSteamGlobalUserID->m_SteamInstanceID = 0; + pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits = m_steamid.m_comp.m_unAccountID % 2; + pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits = m_steamid.m_comp.m_unAccountID / 2; + } +#endif // TSTEAMGLOBALUSERID_H + + //----------------------------------------------------------------------------- + // Purpose: Converts steam ID to its 64-bit representation + // Output : 64-bit representation of a Steam ID + //----------------------------------------------------------------------------- + uint64 ConvertToUint64() const + { + return m_steamid.m_unAll64Bits; + } + + + //----------------------------------------------------------------------------- + // Purpose: Converts the static parts of a steam ID to a 64-bit representation. + // For multiseat accounts, all instances of that account will have the + // same static account key, so they can be grouped together by the static + // account key. + // Output : 64-bit static account key + //----------------------------------------------------------------------------- + uint64 GetStaticAccountKey() const + { + // note we do NOT include the account instance (which is a dynamic property) in the static account key + return (uint64) ( ( ( (uint64) m_steamid.m_comp.m_EUniverse ) << 56 ) + ((uint64) m_steamid.m_comp.m_EAccountType << 52 ) + m_steamid.m_comp.m_unAccountID ); + } + + + //----------------------------------------------------------------------------- + // Purpose: create an anonymous game server login to be filled in by the AM + //----------------------------------------------------------------------------- + void CreateBlankAnonLogon( EUniverse eUniverse ) + { + m_steamid.m_comp.m_unAccountID = 0; + m_steamid.m_comp.m_EAccountType = k_EAccountTypeAnonGameServer; + m_steamid.m_comp.m_EUniverse = eUniverse; + m_steamid.m_comp.m_unAccountInstance = 0; + } + + + //----------------------------------------------------------------------------- + // Purpose: create an anonymous game server login to be filled in by the AM + //----------------------------------------------------------------------------- + void CreateBlankAnonUserLogon( EUniverse eUniverse ) + { + m_steamid.m_comp.m_unAccountID = 0; + m_steamid.m_comp.m_EAccountType = k_EAccountTypeAnonUser; + m_steamid.m_comp.m_EUniverse = eUniverse; + m_steamid.m_comp.m_unAccountInstance = 0; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous game server login that will be filled in? + //----------------------------------------------------------------------------- + bool BBlankAnonAccount() const + { + return m_steamid.m_comp.m_unAccountID == 0 && BAnonAccount() && m_steamid.m_comp.m_unAccountInstance == 0; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this a game server account id? + //----------------------------------------------------------------------------- + bool BGameServerAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer || m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonGameServer; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this a content server account id? + //----------------------------------------------------------------------------- + bool BContentServerAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeContentServer; + } + + + //----------------------------------------------------------------------------- + // Purpose: Is this a clan account id? + //----------------------------------------------------------------------------- + bool BClanAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan; + } + + + //----------------------------------------------------------------------------- + // Purpose: Is this a chat account id? + //----------------------------------------------------------------------------- + bool BChatAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeChat; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this a chat account id? + //----------------------------------------------------------------------------- + bool IsLobby() const + { + return ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeChat ) + && ( m_steamid.m_comp.m_unAccountInstance & k_EChatInstanceFlagLobby ); + } + + + //----------------------------------------------------------------------------- + // Purpose: Is this an individual user account id? + //----------------------------------------------------------------------------- + bool BIndividualAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual || m_steamid.m_comp.m_EAccountType == k_EAccountTypeConsoleUser; + } + + + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous account? + //----------------------------------------------------------------------------- + bool BAnonAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonUser || m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonGameServer; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous user account? ( used to create an account or reset a password ) + //----------------------------------------------------------------------------- + bool BAnonUserAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeAnonUser; + } + + //----------------------------------------------------------------------------- + // Purpose: Is this a faked up Steam ID for a PSN friend account? + //----------------------------------------------------------------------------- + bool BConsoleUserAccount() const + { + return m_steamid.m_comp.m_EAccountType == k_EAccountTypeConsoleUser; + } + + + // simple accessors + void SetAccountID( uint32 unAccountID ) { m_steamid.m_comp.m_unAccountID = unAccountID; } + void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccountInstance = unInstance; } + void ClearIndividualInstance() { if ( BIndividualAccount() ) m_steamid.m_comp.m_unAccountInstance = 0; } + bool HasNoIndividualInstance() const { return BIndividualAccount() && (m_steamid.m_comp.m_unAccountInstance==0); } + uint32 GetAccountID() const { return m_steamid.m_comp.m_unAccountID; } + uint32 GetUnAccountInstance() const { return m_steamid.m_comp.m_unAccountInstance; } + EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; } + EUniverse GetEUniverse() const { return m_steamid.m_comp.m_EUniverse; } + void SetEUniverse( EUniverse eUniverse ) { m_steamid.m_comp.m_EUniverse = eUniverse; } + bool IsValid() const; + + // this set of functions is hidden, will be moved out of class + explicit CSteamID( const char *pchSteamID, EUniverse eDefaultUniverse = k_EUniverseInvalid ); + +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4996) +#endif + + const char * Render() const // renders this steam ID to string + { + const int k_cBufLen = 30; + const int k_cBufs = 4; + char* pchBuf; + + static char rgchBuf[k_cBufs][k_cBufLen]; + static int nBuf = 0; + + pchBuf = rgchBuf[nBuf++]; + nBuf %= k_cBufs; + + switch(m_steamid.m_comp.m_EAccountType) + { + case k_EAccountTypeInvalid: + case k_EAccountTypeIndividual: + sprintf(pchBuf, "STEAM_0:%u:%u", (m_steamid.m_comp.m_unAccountID % 2) ? 1 : 0, (uint32)m_steamid.m_comp.m_unAccountID / 2); + break; + default: + sprintf(pchBuf, "%llu", ConvertToUint64()); + } + return pchBuf; + } + static const char * Render( uint64 ulSteamID ) // static method to render a uint64 representation of a steam ID to a string + { + return CSteamID(ulSteamID).Render(); + } + + const char *SteamRender() const // renders this steam ID to string using the new rendering style + { + const int k_cBufLen = 37; + const int k_cBufs = 4; + char* pchBuf; + + static char rgchBuf[k_cBufs][k_cBufLen]; + static int nBuf = 0; + + pchBuf = rgchBuf[nBuf++]; + nBuf %= k_cBufs; + + switch (m_steamid.m_comp.m_EAccountType) + { + case k_EAccountTypeAnonGameServer: + sprintf(pchBuf, "[A:%u:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID, m_steamid.m_comp.m_unAccountInstance); + break; + case k_EAccountTypeGameServer: + sprintf(pchBuf, "[G:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EAccountTypeMultiseat: + sprintf(pchBuf, "[M:%u:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID, m_steamid.m_comp.m_unAccountInstance); + break; + case k_EAccountTypePending: + sprintf(pchBuf, "[P:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EAccountTypeContentServer: + sprintf(pchBuf, "[C:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EAccountTypeClan: + sprintf(pchBuf, "[g:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EAccountTypeChat: + switch (m_steamid.m_comp.m_unAccountInstance & ~k_EChatAccountInstanceMask) + { + case k_EChatInstanceFlagClan: + sprintf(pchBuf, "[c:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EChatInstanceFlagLobby: + sprintf(pchBuf, "[L:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + default: + sprintf(pchBuf, "[T:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + } + break; + case k_EAccountTypeInvalid: + sprintf(pchBuf, "[I:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + case k_EAccountTypeIndividual: + sprintf(pchBuf, "[U:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + default: + sprintf(pchBuf, "[i:%u:%u]", m_steamid.m_comp.m_EUniverse, m_steamid.m_comp.m_unAccountID); + break; + } + + return pchBuf; + } + + static const char *SteamRender( uint64 ulSteamID ) // static method to render a uint64 representation of a steam ID to a string + { + return CSteamID(ulSteamID).SteamRender(); + } + +#ifdef _MSC_VER + #pragma warning(pop) +#endif + + void SetFromString( const char *pchSteamID, EUniverse eDefaultUniverse ); + bool SetFromSteam2String( const char *pchSteam2ID, EUniverse eUniverse ); + + inline bool operator==( const CSteamID &val ) const { return m_steamid.m_unAll64Bits == val.m_steamid.m_unAll64Bits; } + inline bool operator!=( const CSteamID &val ) const { return !operator==( val ); } + inline bool operator<( const CSteamID &val ) const { return m_steamid.m_unAll64Bits < val.m_steamid.m_unAll64Bits; } + inline bool operator>( const CSteamID &val ) const { return m_steamid.m_unAll64Bits > val.m_steamid.m_unAll64Bits; } + + // DEBUG function + bool BValidExternalSteamID() const; + +private: + // These are defined here to prevent accidental implicit conversion of a u32AccountID to a CSteamID. + // If you get a compiler error about an ambiguous constructor/function then it may be because you're + // passing a 32-bit int to a function that takes a CSteamID. You should explicitly create the SteamID + // using the correct Universe and account Type/Instance values. + CSteamID( uint32 ); + CSteamID( int32 ); + + // 64 bits total + union SteamID_t + { + struct SteamIDComponent_t + { +#ifdef VALVE_BIG_ENDIAN + EUniverse m_EUniverse : 8; // universe this account belongs to + unsigned int m_EAccountType : 4; // type of account - can't show as EAccountType, due to signed / unsigned difference + unsigned int m_unAccountInstance : 20; // dynamic instance ID + uint32 m_unAccountID : 32; // unique account identifier +#else + uint32 m_unAccountID : 32; // unique account identifier + unsigned int m_unAccountInstance : 20; // dynamic instance ID + unsigned int m_EAccountType : 4; // type of account - can't show as EAccountType, due to signed / unsigned difference + EUniverse m_EUniverse : 8; // universe this account belongs to +#endif + } m_comp; + + uint64 m_unAll64Bits; + } m_steamid; +}; + +#ifndef NO_CSTEAMID_STL +inline std::ostream& operator<<(std::ostream& out, const CSteamID& s) +{ + out << s.Render(); + return out; +} +#endif //NO_CSTEAMID_STL + +inline bool CSteamID::IsValid() const +{ + if ( m_steamid.m_comp.m_EAccountType <= k_EAccountTypeInvalid || m_steamid.m_comp.m_EAccountType >= k_EAccountTypeMax ) + return false; + + if ( m_steamid.m_comp.m_EUniverse <= k_EUniverseInvalid || m_steamid.m_comp.m_EUniverse >= k_EUniverseMax ) + return false; + + if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual ) + { + if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance > k_unSteamUserWebInstance ) + return false; + } + + if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan ) + { + if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 0 ) + return false; + } + + if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer ) + { + if ( m_steamid.m_comp.m_unAccountID == 0 ) + return false; + // Any limit on instances? We use them for local users and bots + } + return true; +} + +// generic invalid CSteamID +#define k_steamIDNil CSteamID() + +// This steamID comes from a user game connection to an out of date GS that hasnt implemented the protocol +// to provide its steamID +#define k_steamIDOutofDateGS CSteamID( 0, 0, k_EUniverseInvalid, k_EAccountTypeInvalid ) +// This steamID comes from a user game connection to an sv_lan GS +#define k_steamIDLanModeGS CSteamID( 0, 0, k_EUniversePublic, k_EAccountTypeInvalid ) +// This steamID can come from a user game connection to a GS that has just booted but hasnt yet even initialized +// its steam3 component and started logging on. +#define k_steamIDNotInitYetGS CSteamID( 1, 0, k_EUniverseInvalid, k_EAccountTypeInvalid ) +// This steamID can come from a user game connection to a GS that isn't using the steam authentication system but still +// wants to support the "Join Game" option in the friends list +#define k_steamIDNonSteamGS CSteamID( 2, 0, k_EUniverseInvalid, k_EAccountTypeInvalid ) + + +#ifdef STEAM +// Returns the matching chat steamID, with the default instance of 0 +// If the steamID passed in is already of type k_EAccountTypeChat it will be returned with the same instance +inline CSteamID ChatIDFromSteamID( const CSteamID &steamID ) +{ + if(steamID.GetEAccountType() == k_EAccountTypeClan) + { + return CSteamID(steamID.GetAccountID(), k_EChatInstanceFlagClan, steamID.GetEUniverse(), k_EAccountTypeChat); + } + else if(steamID.GetEAccountType() == k_EAccountTypeChat) + { + return steamID; + } + else + { + return k_steamIDNil; + } +} + +// Returns the matching clan steamID, with the default instance of 0 +// If the steamID passed in is already of type k_EAccountTypeClan it will be returned with the same instance +inline CSteamID ClanIDFromSteamID( const CSteamID &steamID ) +{ + if(steamID.GetEAccountType() == k_EAccountTypeChat && steamID.GetUnAccountInstance() & k_EChatInstanceFlagClan) + { + return CSteamID(steamID.GetAccountID(), 0, steamID.GetEUniverse(), k_EAccountTypeClan); + } + else if(steamID.GetEAccountType() == k_EAccountTypeClan) + { + return steamID; + } + else + { + return k_steamIDNil; + } +} + +// Asserts steamID type before conversion +CSteamID ChatIDFromClanID( const CSteamID &steamIDClan ); +// Asserts steamID type before conversion +CSteamID ClanIDFromChatID( const CSteamID &steamIDChat ); + +#endif // _STEAM + + +#pragma pack( pop ) + +#endif // CSTEAMID_H diff --git a/src/public SDK/ClientCommon.h b/src/public SDK/ClientCommon.h new file mode 100644 index 0000000..90f0555 --- /dev/null +++ b/src/public SDK/ClientCommon.h @@ -0,0 +1,73 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef CLIENTCOMMON_H +#define CLIENTCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +// interface predec +class ISteamClient; +class ISteamUser; +class ISteamGameServer; +class ISteamFriends; +class ISteamUtils; +class ISteamMatchmaking; +class ISteamContentServer; +class ISteamMasterServerUpdater; +class ISteamMatchmakingServers; +class ISteam2Bridge; +class ISteamUserStats; +class ISteamApps; +class ISteamBilling; +class IVAC; +class ISteamNetworking; +class ISteamRemoteStorage; +class ISteamGameServerItems; +class ISteamGameServerStats; +class ISteamHTTP; +class ISteamScreenshots; +class ISteamUnifiedMessages; +class ISteamController; +class ISteamUGC; +class ISteamMusic; +class ISteamMusicRemote; +class ISteamAppList; +class ISteamHTMLSurface; +class ISteamInventory; +class ISteamVideo; + + +#define CLIENTENGINE_INTERFACE_VERSION "CLIENTENGINE_INTERFACE_VERSION002" + + +#define STEAMCLIENT_INTERFACE_VERSION_006 "SteamClient006" +#define STEAMCLIENT_INTERFACE_VERSION_007 "SteamClient007" +#define STEAMCLIENT_INTERFACE_VERSION_008 "SteamClient008" +#define STEAMCLIENT_INTERFACE_VERSION_009 "SteamClient009" +#define STEAMCLIENT_INTERFACE_VERSION_010 "SteamClient010" +#define STEAMCLIENT_INTERFACE_VERSION_011 "SteamClient011" +#define STEAMCLIENT_INTERFACE_VERSION_012 "SteamClient012" +#define STEAMCLIENT_INTERFACE_VERSION_013 "SteamClient013" +#define STEAMCLIENT_INTERFACE_VERSION_014 "SteamClient014" +#define STEAMCLIENT_INTERFACE_VERSION_015 "SteamClient015" +#define STEAMCLIENT_INTERFACE_VERSION_016 "SteamClient016" +#define STEAMCLIENT_INTERFACE_VERSION_017 "SteamClient017" +#define STEAMCLIENT_INTERFACE_VERSION_018 "SteamClient018" +#define STEAMCLIENT_INTERFACE_VERSION_019 "SteamClient019" + +#endif diff --git a/src/public SDK/ContentServerCommon.h b/src/public SDK/ContentServerCommon.h new file mode 100644 index 0000000..5000ed2 --- /dev/null +++ b/src/public SDK/ContentServerCommon.h @@ -0,0 +1,59 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef CONTENTSERVERCOMMON_H +#define CONTENTSERVERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTCONTENTSERVER_INTERFACE_VERSION "CLIENTCONTENTSERVER_INTERFACE_VERSION001" + +#define STEAMCONTENTSERVER_INTERFACE_VERSION_001 "SteamContentServer001" +#define STEAMCONTENTSERVER_INTERFACE_VERSION_002 "SteamContentServer002" + + + +typedef enum EConnectionPriority +{ + k_EConnectionPriorityLow = 0, + k_EConnectionPriorityMedium = 1, + k_EConnectionPriorityHigh = 2, +} EConnectionPriority; + + +#pragma pack( push, 8 ) +struct CSClientApprove_t +{ + enum { k_iCallback = k_iSteamContentServerCallbacks + 1 }; + + CSteamID m_SteamID; + uint32 m_uContentID; +}; + +struct CSClientDeny_t +{ + enum { k_iCallback = k_iSteamContentServerCallbacks + 2 }; + + CSteamID m_SteamID; + uint32 m_uContentID; + int m_eDenyReason; +}; +#pragma pack( pop ) + +#endif // CONTENTSERVERCOMMON_H diff --git a/src/public SDK/ControllerCommon.h b/src/public SDK/ControllerCommon.h new file mode 100644 index 0000000..06df997 --- /dev/null +++ b/src/public SDK/ControllerCommon.h @@ -0,0 +1,295 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef CONTROLLERCOMMON_H +#define CONTROLLERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define STEAMCONTROLLER_INTERFACE_VERSION "STEAMCONTROLLER_INTERFACE_VERSION" +#define STEAMCONTROLLER_INTERFACE_VERSION002 "SteamController002" +#define STEAMCONTROLLER_INTERFACE_VERSION003 "SteamController003" +#define STEAMCONTROLLER_INTERFACE_VERSION004 "SteamController004" +#define STEAMCONTROLLER_INTERFACE_VERSION005 "SteamController005" +#define STEAMCONTROLLER_INTERFACE_VERSION006 "SteamController006" +#define STEAMCONTROLLER_INTERFACE_VERSION007 "SteamController007" + +#define STEAM_CONTROLLER_MAX_COUNT 16 + +#define STEAM_CONTROLLER_MAX_ANALOG_ACTIONS 16 + +#define STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS 32 + +#define STEAM_CONTROLLER_MAX_ORIGINS 8 + +// When sending an option to a specific controller handle, you can send to all controllers via this command +#define STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS UINT64_MAX + +#define STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA -1.0f +#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f + +enum ESteamControllerPad +{ + k_ESteamControllerPad_Left, + k_ESteamControllerPad_Right +}; + +enum EControllerSource +{ + k_EControllerSource_None, + k_EControllerSource_LeftTrackpad, + k_EControllerSource_RightTrackpad, + k_EControllerSource_Joystick, + k_EControllerSource_ABXY, + k_EControllerSource_Switch, + k_EControllerSource_LeftTrigger, + k_EControllerSource_RightTrigger, + k_EControllerSource_Gyro +}; + +enum EControllerSourceMode +{ + k_EControllerSourceMode_None, + k_EControllerSourceMode_Dpad, + k_EControllerSourceMode_Buttons, + k_EControllerSourceMode_FourButtons, + k_EControllerSourceMode_AbsoluteMouse, + k_EControllerSourceMode_RelativeMouse, + k_EControllerSourceMode_JoystickMove, + k_EControllerSourceMode_JoystickCamera, + k_EControllerSourceMode_ScrollWheel, + k_EControllerSourceMode_Trigger, + k_EControllerSourceMode_TouchMenu +}; + +enum EControllerActionOrigin +{ + k_EControllerActionOrigin_None, + k_EControllerActionOrigin_A, + k_EControllerActionOrigin_B, + k_EControllerActionOrigin_X, + k_EControllerActionOrigin_Y, + k_EControllerActionOrigin_LeftBumper, + k_EControllerActionOrigin_RightBumper, + k_EControllerActionOrigin_LeftGrip, + k_EControllerActionOrigin_RightGrip, + k_EControllerActionOrigin_Start, + k_EControllerActionOrigin_Back, + k_EControllerActionOrigin_LeftPad_Touch, + k_EControllerActionOrigin_LeftPad_Swipe, + k_EControllerActionOrigin_LeftPad_Click, + k_EControllerActionOrigin_LeftPad_DPadNorth, + k_EControllerActionOrigin_LeftPad_DPadSouth, + k_EControllerActionOrigin_LeftPad_DPadWest, + k_EControllerActionOrigin_LeftPad_DPadEast, + k_EControllerActionOrigin_RightPad_Touch, + k_EControllerActionOrigin_RightPad_Swipe, + k_EControllerActionOrigin_RightPad_Click, + k_EControllerActionOrigin_RightPad_DPadNorth, + k_EControllerActionOrigin_RightPad_DPadSouth, + k_EControllerActionOrigin_RightPad_DPadWest, + k_EControllerActionOrigin_RightPad_DPadEast, + k_EControllerActionOrigin_LeftTrigger_Pull, + k_EControllerActionOrigin_LeftTrigger_Click, + k_EControllerActionOrigin_RightTrigger_Pull, + k_EControllerActionOrigin_RightTrigger_Click, + k_EControllerActionOrigin_LeftStick_Move, + k_EControllerActionOrigin_LeftStick_Click, + k_EControllerActionOrigin_LeftStick_DPadNorth, + k_EControllerActionOrigin_LeftStick_DPadSouth, + k_EControllerActionOrigin_LeftStick_DPadWest, + k_EControllerActionOrigin_LeftStick_DPadEast, + k_EControllerActionOrigin_Gyro_Move, + k_EControllerActionOrigin_Gyro_Pitch, + k_EControllerActionOrigin_Gyro_Yaw, + k_EControllerActionOrigin_Gyro_Roll, + + k_EControllerActionOrigin_Count +}; +enum EXboxOrigin +{ + k_EXboxOrigin_A, + k_EXboxOrigin_B, + k_EXboxOrigin_X, + k_EXboxOrigin_Y, + k_EXboxOrigin_LeftBumper, + k_EXboxOrigin_RightBumper, + k_EXboxOrigin_Menu, //Start + k_EXboxOrigin_View, //Back + k_EXboxOrigin_LeftTrigger_Pull, + k_EXboxOrigin_LeftTrigger_Click, + k_EXboxOrigin_RightTrigger_Pull, + k_EXboxOrigin_RightTrigger_Click, + k_EXboxOrigin_LeftStick_Move, + k_EXboxOrigin_LeftStick_Click, + k_EXboxOrigin_LeftStick_DPadNorth, + k_EXboxOrigin_LeftStick_DPadSouth, + k_EXboxOrigin_LeftStick_DPadWest, + k_EXboxOrigin_LeftStick_DPadEast, + k_EXboxOrigin_RightStick_Move, + k_EXboxOrigin_RightStick_Click, + k_EXboxOrigin_RightStick_DPadNorth, + k_EXboxOrigin_RightStick_DPadSouth, + k_EXboxOrigin_RightStick_DPadWest, + k_EXboxOrigin_RightStick_DPadEast, + k_EXboxOrigin_DPad_North, + k_EXboxOrigin_DPad_South, + k_EXboxOrigin_DPad_West, + k_EXboxOrigin_DPad_East, +}; +enum ESteamInputType +{ + k_ESteamInputType_Unknown, + k_ESteamInputType_SteamController, + k_ESteamInputType_XBox360Controller, + k_ESteamInputType_XBoxOneController, + k_ESteamInputType_GenericGamepad, // DirectInput controllers + k_ESteamInputType_PS4Controller, + k_ESteamInputType_AppleMFiController, // Unused + k_ESteamInputType_AndroidController, // Unused + k_ESteamInputType_SwitchJoyConPair, // Unused + k_ESteamInputType_SwitchJoyConSingle, // Unused + k_ESteamInputType_SwitchProController, + k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller + k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins + k_ESteamInputType_Count, + k_ESteamInputType_MaximumPossibleValue = 255, +}; +// ControllerHandle_t is used to refer to a specific controller. +// This handle will consistently identify a controller, even if it is disconnected and re-connected +typedef uint64 ControllerHandle_t; + + +// These handles are used to refer to a specific in-game action or action set +// All action handles should be queried during initialization for performance reasons +typedef uint64 ControllerActionSetHandle_t; +typedef uint64 ControllerDigitalActionHandle_t; +typedef uint64 ControllerAnalogActionHandle_t; + + +// Safe to add new bitfields at the end of this list for new buttons/actions, +// but never re-use or re-number an existing flag as old client code will be +// confused. +#define STEAM_RIGHT_TRIGGER_MASK 0x0000001 +#define STEAM_LEFT_TRIGGER_MASK 0x0000002 +#define STEAM_RIGHT_BUMPER_MASK 0x0000004 +#define STEAM_LEFT_BUMPER_MASK 0x0000008 +#define STEAM_BUTTON_0_MASK 0x0000010 +#define STEAM_BUTTON_1_MASK 0x0000020 +#define STEAM_BUTTON_2_MASK 0x0000040 +#define STEAM_BUTTON_3_MASK 0x0000080 +#define STEAM_TOUCH_0_MASK 0x0000100 +#define STEAM_TOUCH_1_MASK 0x0000200 +#define STEAM_TOUCH_2_MASK 0x0000400 +#define STEAM_TOUCH_3_MASK 0x0000800 +#define STEAM_BUTTON_MENU_MASK 0x0001000 +#define STEAM_BUTTON_STEAM_MASK 0x0002000 +#define STEAM_BUTTON_ESCAPE_MASK 0x0004000 +#define STEAM_BUTTON_BACK_LEFT_MASK 0x0008000 +#define STEAM_BUTTON_BACK_RIGHT_MASK 0x0010000 +#define STEAM_BUTTON_LEFTPAD_CLICKED_MASK 0x0020000 +#define STEAM_BUTTON_RIGHTPAD_CLICKED_MASK 0x0040000 +#define STEAM_LEFTPAD_FINGERDOWN_MASK 0x0080000 +#define STEAM_RIGHTPAD_FINGERDOWN_MASK 0x0100000 +#define STEAM_JOYSTICK_BUTTON_MASK 0x0400000 + + +#pragma pack( push, 1 ) + +struct SteamControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32 unPacketNum; + + // bit flags for each of the buttons + uint64 ulButtons; + + // Left pad coordinates + short sLeftPadX; + short sLeftPadY; + + // Right pad coordinates + short sRightPadX; + short sRightPadY; + +}; + +struct ControllerAnalogActionData003_t +{ + // Type of data coming from this action, this will match what got specified in the action set + EControllerSourceMode eMode; + + // The current state of this action; will be delta updates for mouse actions + float x, y; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; + +struct ControllerDigitalActionData003_t +{ + // The current state of this action; will be true if currently pressed + bool bState; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; +struct ControllerAnalogActionData_t +{ + // Type of data coming from this action, this will match what got specified in the action set + EControllerSourceMode eMode; + + // The current state of this action; will be delta updates for mouse actions + float x, y; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; +struct ControllerDigitalActionData_t +{ + // The current state of this action; will be true if currently pressed + bool bState; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; +struct ControllerMotionData_t +{ + // Sensor-fused absolute rotation; will drift in heading + float rotQuatX; + float rotQuatY; + float rotQuatZ; + float rotQuatW; + + // Positional acceleration + float posAccelX; + float posAccelY; + float posAccelZ; + + // Angular velocity + float rotVelX; + float rotVelY; + float rotVelZ; +}; +#pragma pack( pop ) + +#define SteamControllerState_t SteamControllerState001_t + + +#endif // CONTROLLERCOMMON_H diff --git a/src/public SDK/EBeginAuthSessionResult.h b/src/public SDK/EBeginAuthSessionResult.h new file mode 100644 index 0000000..6907bae --- /dev/null +++ b/src/public SDK/EBeginAuthSessionResult.h @@ -0,0 +1,47 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef EBEGINAUTHSESSIONRESULT_H +#define EBEGINAUTHSESSIONRESULT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "EnumString.h" + +// results from BeginAuthSession +typedef enum +{ + k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID. + k_EBeginAuthSessionResultInvalidTicket = 1, // Ticket is not valid. + k_EBeginAuthSessionResultDuplicateRequest = 2, // A ticket has already been submitted for this steamID + k_EBeginAuthSessionResultInvalidVersion = 3, // Ticket is from an incompatible interface version + k_EBeginAuthSessionResultGameMismatch = 4, // Ticket is not for this game + k_EBeginAuthSessionResultExpiredTicket = 5, // Ticket has expired +} EBeginAuthSessionResult; + +Begin_Enum_String(EBeginAuthSessionResult) +{ + Enum_String( k_EBeginAuthSessionResultOK ); // Ticket is valid for this game and this steamID. + Enum_String( k_EBeginAuthSessionResultInvalidTicket ); // Ticket is not valid. + Enum_String( k_EBeginAuthSessionResultDuplicateRequest ); // A ticket has already been submitted for this steamID + Enum_String( k_EBeginAuthSessionResultInvalidVersion ); // Ticket is from an incompatible interface version + Enum_String( k_EBeginAuthSessionResultGameMismatch ); // Ticket is not for this game + Enum_String( k_EBeginAuthSessionResultExpiredTicket ); // Ticket has expired +} +End_Enum_String; + +#endif // EBEGINAUTHSESSIONRESULT_H \ No newline at end of file diff --git a/src/public SDK/ECurrencyCode.h b/src/public SDK/ECurrencyCode.h new file mode 100644 index 0000000..8c6bd90 --- /dev/null +++ b/src/public SDK/ECurrencyCode.h @@ -0,0 +1,38 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ECURRENCYCODE_H +#define ECURRENCYCODE_H +#ifdef _WIN32 +#pragma once +#endif + + +typedef enum ECurrencyCode +{ + k_ECurrencyCodeInvalid = 0, + k_ECurrencyCodeUSD = 1, + k_ECurrencyCodeGBP = 2, + k_ECurrencyCodeEUR = 3, + k_ECurrencyCodeCHF = 4, + k_ECurrencyCodeRUB = 5, + k_ECurrencyCodePLN = 6, + k_ECurrencyCodeBRL = 7, + //k_ECurrencyCodeMax = 8, + k_ECurrencyCodeNOK = 9 +} ECurrencyCode; + +#endif // ECURRENCYCODE_H diff --git a/src/public SDK/EResult.h b/src/public SDK/EResult.h new file mode 100644 index 0000000..e91eef3 --- /dev/null +++ b/src/public SDK/EResult.h @@ -0,0 +1,130 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ERESULT_H +#define ERESULT_H +#ifdef _WIN32 +#pragma once +#endif + + +// General result codes +typedef enum EResult +{ + k_EResultOK = 1, // success + k_EResultFail = 2, // generic failure + k_EResultNoConnection = 3, // no/failed network connection + // k_EResultNoConnectionRetry = 4, // OBSOLETE - removed + k_EResultInvalidPassword = 5, // password/ticket is invalid + k_EResultLoggedInElsewhere = 6, // same user logged in elsewhere + k_EResultInvalidProtocolVer = 7, // protocol version is incorrect + k_EResultInvalidParam = 8, // a parameter is incorrect + k_EResultFileNotFound = 9, // file was not found + k_EResultBusy = 10, // called method busy - action not taken + k_EResultInvalidState = 11, // called object was in an invalid state + k_EResultInvalidName = 12, // name is invalid + k_EResultInvalidEmail = 13, // email is invalid + k_EResultDuplicateName = 14, // name is not unique + k_EResultAccessDenied = 15, // access is denied + k_EResultTimeout = 16, // operation timed out + k_EResultBanned = 17, // VAC2 banned + k_EResultAccountNotFound = 18, // account not found + k_EResultInvalidSteamID = 19, // steamID is invalid + k_EResultServiceUnavailable = 20, // The requested service is currently unavailable + k_EResultNotLoggedOn = 21, // The user is not logged on + k_EResultPending = 22, // Request is pending (may be in process, or waiting on third party) + k_EResultEncryptionFailure = 23, // Encryption or Decryption failed + k_EResultInsufficientPrivilege = 24, // Insufficient privilege + k_EResultLimitExceeded = 25, // Too much of a good thing + k_EResultRevoked = 26, // Access has been revoked (used for revoked guest passes) + k_EResultExpired = 27, // License/Guest pass the user is trying to access is expired + k_EResultAlreadyRedeemed = 28, // Guest pass has already been redeemed by account, cannot be acked again + k_EResultDuplicateRequest = 29, // The request is a duplicate and the action has already occurred in the past, ignored this time + k_EResultAlreadyOwned = 30, // All the games in this guest pass redemption request are already owned by the user + k_EResultIPNotFound = 31, // IP address not found + k_EResultPersistFailed = 32, // failed to write change to the data store + k_EResultLockingFailed = 33, // failed to acquire access lock for this operation + k_EResultLogonSessionReplaced = 34, + k_EResultConnectFailed = 35, + k_EResultHandshakeFailed = 36, + k_EResultIOFailure = 37, + k_EResultRemoteDisconnect = 38, + k_EResultShoppingCartNotFound = 39, // failed to find the shopping cart requested + k_EResultBlocked = 40, // a user didn't allow it + k_EResultIgnored = 41, // target is ignoring sender + k_EResultNoMatch = 42, // nothing matching the request found + k_EResultAccountDisabled = 43, + k_EResultServiceReadOnly = 44, // this service is not accepting content changes right now + k_EResultAccountNotFeatured = 45, // account doesn't have value, so this feature isn't available + k_EResultAdministratorOK = 46, // allowed to take this action, but only because requester is admin + k_EResultContentVersion = 47, // A Version mismatch in content transmitted within the Steam protocol. + k_EResultTryAnotherCM = 48, // The current CM can't service the user making a request, user should try another. + k_EResultPasswordRequiredToKickSession = 49, // You are already logged in elsewhere, this cached credential login has failed. + k_EResultAlreadyLoggedInElsewhere = 50, // You are already logged in elsewhere, you must wait + k_EResultSuspended = 51, // Long running operation (content download) suspended/paused + k_EResultCancelled = 52, // Operation canceled (typically by user: content download) + k_EResultDataCorruption = 53, // Operation canceled because data is ill formed or unrecoverable + k_EResultDiskFull = 54, // Operation canceled - not enough disk space. + k_EResultRemoteCallFailed = 55, // an remote call or IPC call failed + k_EResultPasswordUnset = 56, // Password could not be verified as it's unset server side + k_EResultPSNAccountUnlinked = 57, // Attempt to logon from a PS3 failed because the PSN online id is not linked to a Steam account + k_EResultPSNTicketInvalid = 58, // PSN ticket was invalid + k_EResultPSNAccountAlreadyLinked = 59, // PSN account is already linked to some other account, must explicitly request to replace/delete the link first + k_EResultRemoteFileConflict = 60, // The sync cannot resume due to a conflict between the local and remote files + k_EResultIllegalPassword = 61, // The requested new password is not legal + k_EResultSameAsPreviousValue = 62, // new value is the same as the old one ( secret question and answer ) + k_EResultAccountLogonDenied = 63, // account login denied due to 2nd factor authentication failure + k_EResultCannotUseOldPassword = 64, // The requested new password is not legal + k_EResultInvalidLoginAuthCode = 65, // account login denied due to auth code invalid + k_EResultAccountLogonDeniedNoMail = 66, // account login denied due to 2nd factor auth failure - and no mail has been sent + k_EResultHardwareNotCapableOfIPT = 67, // + k_EResultIPTInitError = 68, // + k_EResultParentalControlRestrictions = 69, // Operation failed due to parental control restrictions for current user + k_EResultFacebookQueryError = 70, // Facebook query returned an error + k_EResultExpiredLoginAuthCode = 71, // Expired Login Auth Code + k_EResultIPLoginRestrictionFailed = 72, // IP Login Restriction Failed + k_EResultAccountLockedDown = 73, // Account Locked Down + k_EResultAccountLogonDeniedVerifiedEmailRequired = 74, // Account Logon Denied Verified Email Required + k_EResultNoMatchingURL = 75, // No matching URL + k_EResultBadResponse = 76, // Bad response + k_EResultRequirePasswordReEntry = 77, // The user cannot complete the action until they re-enter their password + k_EResultValueOutOfRange = 78, // the value entered is outside the acceptable range + k_EResultUnexpectedError = 79, // something happened that we didn't expect to ever happen + k_EResultDisabled = 80, // The requested service has been configured to be unavailable + k_EResultInvalidCEGSubmission = 81, // The set of files submitted to the CEG server are not valid ! + k_EResultRestrictedDevice = 82, // The device being used is not allowed to perform this action + k_EResultRegionLocked = 83, // The action could not be complete because it is region restricted + k_EResultRateLimitExceeded = 84, // Temporary rate limit exceeded, try again later, different from k_EResultLimitExceeded which may be permanent + k_EResultAccountLoginDeniedNeedTwoFactor = 85, // Need two-factor code to login + k_EResultItemDeleted = 86, // The thing we're trying to access has been deleted + k_EResultAccountLoginDeniedThrottle = 87, // login attempt failed, try to throttle response to possible attacker + k_EResultTwoFactorCodeMismatch = 88, // two factor code mismatch (only on token setup, not on login path) + k_EResultTwoFactorActivationCodeMismatch = 89, // activation code for two-factor didn't match + k_EResultAccountAssociatedToMultiplePartners = 90, // account has been associated with multiple partners + k_EResultNotModified = 91, // data not modified + k_EResultNoMobileDevice = 92, // the account does not have a mobile device associated with it + k_EResultTimeNotSynced = 93, // the time presented is out of range or tolerance + k_EResultSmsCodeFailed = 94, // SMS code failure (no match, none pending, etc.) + k_EResultAccountLimitExceeded = 95, // Too many accounts access this resource + k_EResultAccountActivityLimitExceeded = 96, // Too many changes to this account + k_EResultPhoneActivityLimitExceeded = 97, // Too many changes to this phone + k_EResultRefundToWallet = 98, // Cannot refund to payment method, must use wallet + k_EResultEmailSendFailure = 99, // Cannot send an email + k_EResultNotSettled = 100, // Can't perform operation till payment has settled + k_EResultNeedCaptcha = 101, // Needs to provide a valid captcha +} EResult; + +#endif // ERESULT_H diff --git a/src/public SDK/ESteamAppUpdateStatsQueryType.h b/src/public SDK/ESteamAppUpdateStatsQueryType.h new file mode 100644 index 0000000..0513c9a --- /dev/null +++ b/src/public SDK/ESteamAppUpdateStatsQueryType.h @@ -0,0 +1,32 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMAPPUPDATESTATSQUERYTYPE_H +#define ESTEAMAPPUPDATESTATSQUERYTYPE_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamAppUpdateStatsQueryType +{ + ePhysicalBytesReceivedThisSession = 1, + eAppReadyToLaunchStatus = 2, + eAppPreloadStatus = 3, + eAppEntireDepot = 4, + eCacheBytesPresent = 5, +} ESteamAppUpdateStatsQueryType; + +#endif // ESTEAMAPPUPDATESTATSQUERYTYPE_H diff --git a/src/public SDK/ESteamBufferMethod.h b/src/public SDK/ESteamBufferMethod.h new file mode 100644 index 0000000..2f59afb --- /dev/null +++ b/src/public SDK/ESteamBufferMethod.h @@ -0,0 +1,30 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMBUFFERMETHOD_H +#define ESTEAMBUFFERMETHOD_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamBufferMethod +{ + eSteamBufferMethodFBF = 0, + eSteamBufferMethodNBF = 1 +} ESteamBufferMethod; + +#endif // ESTEAMBUFFERMETHOD_H + diff --git a/src/public SDK/ESteamError.h b/src/public SDK/ESteamError.h new file mode 100644 index 0000000..1eba7cf --- /dev/null +++ b/src/public SDK/ESteamError.h @@ -0,0 +1,93 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMERROR_H +#define ESTEAMERROR_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamError +{ + eSteamErrorNone = 0, + eSteamErrorUnknown = 1, + eSteamErrorLibraryNotInitialized = 2, + eSteamErrorLibraryAlreadyInitialized = 3, + eSteamErrorConfig = 4, + eSteamErrorContentServerConnect = 5, + eSteamErrorBadHandle = 6, + eSteamErrorHandlesExhausted = 7, + eSteamErrorBadArg = 8, + eSteamErrorNotFound = 9, + eSteamErrorRead = 10, + eSteamErrorEOF = 11, + eSteamErrorSeek = 12, + eSteamErrorCannotWriteNonUserConfigFile = 13, + eSteamErrorCacheOpen = 14, + eSteamErrorCacheRead = 15, + eSteamErrorCacheCorrupted = 16, + eSteamErrorCacheWrite = 17, + eSteamErrorCacheSession = 18, + eSteamErrorCacheInternal = 19, + eSteamErrorCacheBadApp = 20, + eSteamErrorCacheVersion = 21, + eSteamErrorCacheBadFingerPrint = 22, + + eSteamErrorNotFinishedProcessing = 23, + eSteamErrorNothingToDo = 24, + eSteamErrorCorruptEncryptedUserIDTicket = 25, + eSteamErrorSocketLibraryNotInitialized = 26, + eSteamErrorFailedToConnectToUserIDTicketValidationServer = 27, + eSteamErrorBadProtocolVersion = 28, + eSteamErrorReplayedUserIDTicketFromClient = 29, + eSteamErrorReceiveResultBufferTooSmall = 30, + eSteamErrorSendFailed = 31, + eSteamErrorReceiveFailed = 32, + eSteamErrorReplayedReplyFromUserIDTicketValidationServer = 33, + eSteamErrorBadSignatureFromUserIDTicketValidationServer = 34, + eSteamErrorValidationStalledSoAborted = 35, + eSteamErrorInvalidUserIDTicket = 36, + eSteamErrorClientLoginRateTooHigh = 37, + eSteamErrorClientWasNeverValidated = 38, + eSteamErrorInternalSendBufferTooSmall = 39, + eSteamErrorInternalReceiveBufferTooSmall = 40, + eSteamErrorUserTicketExpired = 41, + eSteamErrorCDKeyAlreadyInUseOnAnotherClient = 42, + + eSteamErrorNotLoggedIn = 101, + eSteamErrorAlreadyExists = 102, + eSteamErrorAlreadySubscribed = 103, + eSteamErrorNotSubscribed = 104, + eSteamErrorAccessDenied = 105, + eSteamErrorFailedToCreateCacheFile = 106, + eSteamErrorCallStalledSoAborted = 107, + eSteamErrorEngineNotRunning = 108, + eSteamErrorEngineConnectionLost = 109, + eSteamErrorLoginFailed = 110, + eSteamErrorAccountPending = 111, + eSteamErrorCacheWasMissingRetry = 112, + eSteamErrorLocalTimeIncorrect = 113, + eSteamErrorCacheNeedsDecryption = 114, + eSteamErrorAccountDisabled = 115, + eSteamErrorCacheNeedsRepair = 116, + eSteamErrorRebootRequired = 117, + + eSteamErrorNetwork = 200, + + eSteamErrorOffline = 201, +} ESteamError; + +#endif // ESTEAMERROR_H diff --git a/src/public SDK/ESteamFindFilter.h b/src/public SDK/ESteamFindFilter.h new file mode 100644 index 0000000..7e1131f --- /dev/null +++ b/src/public SDK/ESteamFindFilter.h @@ -0,0 +1,30 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMFINDFILTER_H +#define ESTEAMFINDFILTER_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamFindFilter /* Filter elements returned by SteamFind{First,Next} */ +{ + eSteamFindLocalOnly, /* limit search to local filesystem */ + eSteamFindRemoteOnly, /* limit search to remote repository */ + eSteamFindAll /* do not limit search (duplicates allowed) */ +} ESteamFindFilter; + +#endif // ESTEAMFINDFILTER_H diff --git a/src/public SDK/ESteamNotify.h b/src/public SDK/ESteamNotify.h new file mode 100644 index 0000000..b7a1ad4 --- /dev/null +++ b/src/public SDK/ESteamNotify.h @@ -0,0 +1,41 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMNOTIFICATIONCALLBACKEVENT_H +#define ESTEAMNOTIFICATIONCALLBACKEVENT_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamNotify +{ + eSteamNotifyTicketsWillExpire = 0, + eSteamNotifyAccountInfoChanged = 1, + eSteamNotifyContentDescriptionChanged = 2, + eSteamNotifyPleaseShutdown = 3, + eSteamNotifyNewContentServer = 4, + eSteamNotifySubscriptionStatusChanged = 5, + eSteamNotifyContentServerConnectionLost = 6, + eSteamNotifyCacheLoadingCompleted = 7, + eSteamNotifyCacheNeedsDecryption = 8, + eSteamNotifyCacheNeedsRepair = 9, + eSteamNotifyAppDownloading = 10, + eSteamNotifyAppDownloadingPaused = 11, +} ESteamNotify; + + + +#endif // ESTEAMNOTIFICATIONCALLBACKEVENT_H diff --git a/src/public SDK/ESteamPaymentCardType.h b/src/public SDK/ESteamPaymentCardType.h new file mode 100644 index 0000000..abdc830 --- /dev/null +++ b/src/public SDK/ESteamPaymentCardType.h @@ -0,0 +1,33 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMPAYMENTCARDTYPE_H +#define ESTEAMPAYMENTCARDTYPE_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamPaymentCardType +{ + eVisa = 1, + eMaster = 2, + eAmericanExpress = 3, + eDiscover = 4, + eDinnersClub = 5, + eJCB = 6, +} ESteamPaymentCardType; + +#endif // ESTEAMPAYMENTCARDTYPE_H diff --git a/src/public SDK/ESteamSeekMethod.h b/src/public SDK/ESteamSeekMethod.h new file mode 100644 index 0000000..2b2514c --- /dev/null +++ b/src/public SDK/ESteamSeekMethod.h @@ -0,0 +1,32 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMSEEKMETHOD_H +#define ESTEAMSEEKMETHOD_H +#ifdef _WIN32 +#pragma once +#endif + + +typedef enum ESteamSeekMethod +{ + eSteamSeekMethodSet = 0, + eSteamSeekMethodCur = 1, + eSteamSeekMethodEnd = 2 +} ESteamSeekMethod; + + +#endif // ESTEAMSEEKMETHOD_H diff --git a/src/public SDK/ESteamServerType.h b/src/public SDK/ESteamServerType.h new file mode 100644 index 0000000..018da90 --- /dev/null +++ b/src/public SDK/ESteamServerType.h @@ -0,0 +1,34 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMSERVERTYPE_H +#define ESTEAMSERVERTYPE_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamServerType +{ + eSteamValveCDKeyValidationServer = 0, + eSteamHalfLifeMasterServer = 1, + eSteamFriendsServer = 2, + eSteamCSERServer = 3, + eSteamHalfLife2MasterServer = 4, + eSteamRDKFMasterServer = 5, + eMaxServerTypes = 6, +} ESteamServerType; + +#endif // ESTEAMSERVERTYPE_H diff --git a/src/public SDK/ESteamSubscriptionBillingInfoType.h b/src/public SDK/ESteamSubscriptionBillingInfoType.h new file mode 100644 index 0000000..e414191 --- /dev/null +++ b/src/public SDK/ESteamSubscriptionBillingInfoType.h @@ -0,0 +1,34 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H +#define ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum ESteamSubscriptionBillingInfoType +{ + ePaymentCardInfo = 1, + ePrepurchasedInfo = 2, + eAccountBillingInfo = 3, + eExternalBillingInfo = 4, // indirect billing via ISP etc (not supported yet) + ePaymentCardReceipt = 5, + ePrepurchaseReceipt = 6, + eEmptyReceipt = 7, +} ESteamSubscriptionBillingInfoType; + +#endif // ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H diff --git a/src/public SDK/ESteamSubscriptionStatus.h b/src/public SDK/ESteamSubscriptionStatus.h new file mode 100644 index 0000000..0fcdb2b --- /dev/null +++ b/src/public SDK/ESteamSubscriptionStatus.h @@ -0,0 +1,45 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ESTEAMSUBSCRIPTIONSTATUS_H +#define ESTEAMSUBSCRIPTIONSTATUS_H +#ifdef _WIN32 +#pragma once +#endif + + +typedef enum ESteamSubscriptionStatus +{ + eSteamSubscriptionOK = 0, + eSteamSubscriptionPending = 1, + eSteamSubscriptionPreorder = 2, + eSteamSubscriptionPrepurchaseTransferred = 3, + eSteamSubscriptionPrepurchaseInvalid = 4, + eSteamSubscriptionPrepurchaseRejected = 5, + eSteamSubscriptionPrepurchaseRevoked = 6, + eSteamSubscriptionPaymentCardDeclined = 7, + eSteamSubscriptionCancelledByUser = 8, + eSteamSubscriptionCancelledByVendor = 9, + eSteamSubscriptionPaymentCardUseLimit = 10, + eSteamSubscriptionPaymentCardAlert = 11, + eSteamSubscriptionFailed = 12, + eSteamSubscriptionPaymentCardAVSFailure = 13, + eSteamSubscriptionPaymentCardInsufficientFunds = 14, + eSteamSubscriptionRestrictedCountry = 15, +} ESteamSubscriptionStatus; + + +#endif // ESTEAMSUBSCRIPTIONSTATUS_H diff --git a/src/public SDK/EUserHasLicenseForAppResult.h b/src/public SDK/EUserHasLicenseForAppResult.h new file mode 100644 index 0000000..aa16359 --- /dev/null +++ b/src/public SDK/EUserHasLicenseForAppResult.h @@ -0,0 +1,41 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef EUSERHASLICENSEFORAPPRESULT_H +#define EUSERHASLICENSEFORAPPRESULT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "EnumString.h" + +typedef enum +{ + k_EUserHasLicenseResultHasLicense = 0, // User has a license for specified app + k_EUserHasLicenseResultDoesNotHaveLicense = 1, // User does not have a license for the specified app + k_EUserHasLicenseResultNoAuth = 2, // User has not been authenticated +} EUserHasLicenseForAppResult; + +/* +Begin_Enum_String( EUserHasLicenseForAppResult ) +{ + Enum_String( k_EUserHasLicenseResultHasLicense ); + Enum_String( k_EUserHasLicenseResultDoesNotHaveLicense ); + Enum_String( k_EUserHasLicenseResultNoAuth ); +} +End_Enum_String( EUserHasLicenseForAppResult );*/ + +#endif // EUSERHASLICENSEFORAPPRESULT_H \ No newline at end of file diff --git a/src/public SDK/EVoiceResult.h b/src/public SDK/EVoiceResult.h new file mode 100644 index 0000000..ab89d6d --- /dev/null +++ b/src/public SDK/EVoiceResult.h @@ -0,0 +1,39 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef EVOICERESULT_H +#define EVOICERESULT_H +#ifdef _WIN32 +#pragma once +#endif + + +// Error codes for use with the voice functions +typedef enum EVoiceResult +{ + k_EVoiceResultOK = 0, + k_EVoiceResultNotInitialized = 1, + k_EVoiceResultNotRecording = 2, + k_EVoiceResultNoData = 3, + k_EVoiceResultBufferTooSmall = 4, + k_EVoiceResultDataCorrupted = 5, + k_EVoiceResultRestricted = 6, + k_EVoiceResultUnsupportedCodec = 7, + k_EVoiceResultReceiverOutOfDate = 8, + k_EVoiceResultReceiverDidNotAnswer = 9, +} EVoiceResult; + +#endif // EVOICERESULT_H diff --git a/src/public SDK/EnumString.h b/src/public SDK/EnumString.h new file mode 100644 index 0000000..d4859ad --- /dev/null +++ b/src/public SDK/EnumString.h @@ -0,0 +1,186 @@ +// EnumString - A utility to provide stringizing support for C++ enums +// Author: Francis Xavier Joseph Pulikotil +// +// This code is free software: you can do whatever you want with it, +// although I would appreciate if you gave credit where it's due. +// +// This code is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +#ifndef ENUMSTRING_HEADER +#define ENUMSTRING_HEADER + +/* Usage example + + // WeekEnd enumeration + enum WeekEnd + { + Sunday = 1, + Saturday = 7 + }; + + // String support for WeekEnd + Begin_Enum_String( WeekEnd ) + { + Enum_String( Sunday ); + Enum_String( Saturday ); + } + End_Enum_String; + + // Convert from WeekEnd to string + const std::string &str = EnumString::From( Saturday ); + // str should now be "Saturday" + + // Convert from string to WeekEnd + WeekEnd w; + EnumString::To( w, "Sunday" ); + // w should now be Sunday +*/ + +#include +#include +#include + +// Helper macros + +#define Begin_Enum_String(EnumerationName) \ + template <> struct EnumString : \ + public EnumStringBase< EnumString, EnumerationName > \ + { \ + static void RegisterEnumerators() +// { + +#define Enum_String(EnumeratorName) \ + RegisterEnumerator( EnumeratorName, #EnumeratorName ); +// } + +#define End_Enum_String \ + } + +// The EnumString base class +template +class EnumStringBase +{ +// Types +protected: + typedef std::map AssocMap; + +protected: +// Constructor / Destructor + explicit EnumStringBase(); + ~EnumStringBase(); + +private: +// Copy Constructor / Assignment Operator + EnumStringBase(const EnumStringBase &); + const EnumStringBase &operator =(const EnumStringBase &); + +// Functions +private: + static AssocMap &GetMap(); + +protected: + // Use this helper function to register each enumerator + // and its string representation. + static void RegisterEnumerator(const EnumType e, const std::string &eStr); + +public: + // Converts from an enumerator to a string. + // Returns an empty string if the enumerator was not registered. + static const std::string &From(const EnumType e); + + // Converts from a string to an enumerator. + // Returns true if the conversion is successful; false otherwise. + static const bool To(EnumType &e, const std::string &str); +}; + +// The EnumString class +// Note: Specialize this class for each enumeration, and implement +// the RegisterEnumerators() function. +template +struct EnumString : public EnumStringBase< EnumString, EnumType > +{ + static void RegisterEnumerators(); +}; + +// Function definitions + +template +typename EnumStringBase::AssocMap &EnumStringBase::GetMap() +{ + // A static map of associations from strings to enumerators + static AssocMap assocMap; + static bool bFirstAccess = true; + + // If this is the first time we're accessing the map, then populate it. + if( bFirstAccess ) + { + bFirstAccess = false; + D::RegisterEnumerators(); + assert( !assocMap.empty() ); + } + + return assocMap; +} + +template +void EnumStringBase::RegisterEnumerator(const E e, const std::string &eStr) +{ + const bool bRegistered = GetMap().insert( typename AssocMap::value_type( eStr, e ) ).second; + assert( bRegistered ); + (void)sizeof( bRegistered ); // This is to avoid the pesky 'unused variable' warning in Release Builds. +} + +template +const std::string &EnumStringBase::From(const E e) +{ + for(;;) // Code block + { + // Search for the enumerator in our map + typename AssocMap::const_iterator i; + for(i = GetMap().begin(); i != GetMap().end(); ++i) + if( (*i).second == e ) + break; + + // If we didn't find it, we can't do this conversion + if( i == GetMap().end() ) + break; + + // Keep searching and see if we find another one with the same value + typename AssocMap::const_iterator j( i ); + for(++j; j != GetMap().end(); ++j) + if( (*j).second == e ) + break; + + // If we found another one with the same value, we can't do this conversion + if( j != GetMap().end() ) + break; + + // We found exactly one string which matches the required enumerator + return (*i).first; + } + + // We couldn't do this conversion; return an empty string. + static const std::string dummy; + return dummy; +} + +template +const bool EnumStringBase::To(E &e, const std::string &str) +{ + // Search for the string in our map. + const typename AssocMap::const_iterator itr( GetMap().find( str ) ); + + // If we have it, then return the associated enumerator. + if( itr != GetMap().end() ) + { + e = (*itr).second; + return true; + } + + // We don't have it; the conversion failed. + return false; +} + +#endif \ No newline at end of file diff --git a/src/public SDK/FriendGameInfo.h b/src/public SDK/FriendGameInfo.h new file mode 100644 index 0000000..3546999 --- /dev/null +++ b/src/public SDK/FriendGameInfo.h @@ -0,0 +1,38 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef FRIENDGAMEINFO_H +#define FRIENDGAMEINFO_H +#ifndef _WIN32 +#pragma once +#endif + +#pragma pack( push, 8 ) + +// friend game played information +struct FriendGameInfo_t +{ + CGameID m_gameID; + uint32 m_unGameIP; + uint16 m_usGamePort; + uint16 m_usQueryPort; + CSteamID m_steamIDLobby; +}; + +#pragma pack( pop ) + + +#endif // FRIENDGAMEINFO_H diff --git a/src/public SDK/FriendsCommon.h b/src/public SDK/FriendsCommon.h new file mode 100644 index 0000000..a38bb89 --- /dev/null +++ b/src/public SDK/FriendsCommon.h @@ -0,0 +1,1018 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef FRIENDSCOMMON_H +#define FRIENDSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTFRIENDS_INTERFACE_VERSION "CLIENTFRIENDS_INTERFACE_VERSION001" + +#define STEAMFRIENDS_INTERFACE_VERSION_001 "SteamFriends001" +#define STEAMFRIENDS_INTERFACE_VERSION_002 "SteamFriends002" +#define STEAMFRIENDS_INTERFACE_VERSION_003 "SteamFriends003" +#define STEAMFRIENDS_INTERFACE_VERSION_004 "SteamFriends004" +#define STEAMFRIENDS_INTERFACE_VERSION_005 "SteamFriends005" +#define STEAMFRIENDS_INTERFACE_VERSION_006 "SteamFriends006" +#define STEAMFRIENDS_INTERFACE_VERSION_007 "SteamFriends007" +#define STEAMFRIENDS_INTERFACE_VERSION_008 "SteamFriends008" +#define STEAMFRIENDS_INTERFACE_VERSION_009 "SteamFriends009" +#define STEAMFRIENDS_INTERFACE_VERSION_010 "SteamFriends010" +#define STEAMFRIENDS_INTERFACE_VERSION_011 "SteamFriends011" +#define STEAMFRIENDS_INTERFACE_VERSION_012 "SteamFriends012" +#define STEAMFRIENDS_INTERFACE_VERSION_013 "SteamFriends013" +#define STEAMFRIENDS_INTERFACE_VERSION_014 "SteamFriends014" +#define STEAMFRIENDS_INTERFACE_VERSION_015 "SteamFriends015" +#define STEAMFRIENDS_INTERFACE_VERSION_016 "SteamFriends016" +#define STEAMFRIENDS_INTERFACE_VERSION_017 "SteamFriends017" + +//----------------------------------------------------------------------------- +// Purpose: avatar sizes, used in ISteamFriends::GetFriendAvatar() +//----------------------------------------------------------------------------- +enum EAvatarSize +{ + k_EAvatarSize32x32 = 0, + k_EAvatarSize64x64 = 1, + k_EAvatarSize184x184 = 2, + k_EAvatarSizeMAX = 3, +}; + +enum ECallState +{ + k_ECallStateUnknown = 0, + k_ECallStateWaiting = 1, + k_ECallStateDialing = 2, + k_ECallStateRinging = 3, + k_ECallStateInCall = 4, +}; + +//----------------------------------------------------------------------------- +// Purpose: Chat Entry Types (previously was only friend-to-friend message types) +//----------------------------------------------------------------------------- +enum EChatEntryType +{ + k_EChatEntryTypeInvalid = 0, + k_EChatEntryTypeChatMsg = 1, // Normal text message from another user + k_EChatEntryTypeTyping = 2, // Another user is typing (not used in multi-user chat) + k_EChatEntryTypeInviteGame = 3, // Invite from other user into that users current game + k_EChatEntryTypeEmote = 4, // text emote message + k_EChatEntryTypeLobbyGameStart = 5, // lobby game is starting + k_EChatEntryTypeLeftConversation = 6, // user has left the conversation ( closed chat window ) + // Above are previous FriendMsgType entries, now merged into more generic chat entry types + k_EChatEntryTypeEntered = 7, // user has entered the conversation (used in multi-user chat and group chat) + k_EChatEntryTypeWasKicked = 8, // user was kicked (data: 64-bit steamid of actor performing the kick) + k_EChatEntryTypeWasBanned = 9, // user was banned (data: 64-bit steamid of actor performing the ban) + k_EChatEntryTypeDisconnected = 10, // user disconnected + k_EChatEntryTypeHistoricalChat = 11, // a chat message from user's chat history or offilne message + k_EChatEntryTypeReserved1 = 12, + k_EChatEntryTypeReserved2 = 13, + k_EChatEntryTypeLinkBlocked = 14, // a link was removed by the chat filter. +}; + +//----------------------------------------------------------------------------- +// Purpose: set of relationships to other users +//----------------------------------------------------------------------------- +enum EFriendRelationship +{ + k_EFriendRelationshipNone = 0, + k_EFriendRelationshipBlocked = 1, // this doesn't get stored; the user has just done an Ignore on an friendship invite + k_EFriendRelationshipRequestRecipient = 2, + k_EFriendRelationshipFriend = 3, + k_EFriendRelationshipRequestInitiator = 4, + k_EFriendRelationshipIgnored = 5, // this is stored; the user has explicit blocked this other user from comments/chat/etc + k_EFriendRelationshipIgnoredFriend = 6, + k_EFriendRelationshipSuggested = 7, + + // keep this updated + k_EFriendRelationshipMax = 8, +}; + +enum EChatRoomType +{ + k_EChatRoomTypeFriend = 1, + k_EChatRoomTypeMUC = 2, + k_EChatRoomTypeLobby = 3, +}; + +enum EChatRoomVoiceStatus +{ + eChatRoomVoiceStatus_Invalid = -1, + eChatRoomVoiceStatus_Bad = 0, + eChatRoomVoiceStatus_UnknownRoom = 1, + eChatRoomVoiceStatus_UnknownUser = 2, + eChatRoomVoiceStatus_NotSpeaking = 3, + eChatRoomVoiceStatus_Connected_Speaking = 4, + eChatRoomVoiceStatus_Connected_SpeakingData = 5, + eChatRoomVoiceStatus_NotConnected_Speaking = 6, + eChatRoomVoiceStatus_Connecting = 7, + eChatRoomVoiceStatus_Unreachable = 8, + eChatRoomVoiceStatus_Disconnected = 9, + eChatRoomVoiceStatus_Count = 10, +}; + +enum EClanRank +{ + k_EClanRankNone = 0, + k_EClanRankOwner = 1, + k_EClanRankOfficer = 2, + k_EClanRankMember = 3, +}; + +enum EClanRelationship +{ + eClanRelationshipNone = 0, + eClanRelationshipBlocked = 1, + eClanRelationshipInvited = 2, + eClanRelationshipMember = 3, + eClanRelationshipKicked = 4, +}; + +//----------------------------------------------------------------------------- +// Purpose: flags for enumerating friends list, or quickly checking a the relationship between users +//----------------------------------------------------------------------------- +enum EFriendFlags +{ + k_EFriendFlagNone = 0x00, + k_EFriendFlagBlocked = 0x01, + k_EFriendFlagFriendshipRequested = 0x02, + k_EFriendFlagImmediate = 0x04, // "regular" friend + k_EFriendFlagClanMember = 0x08, + k_EFriendFlagOnGameServer = 0x10, + // k_EFriendFlagHasPlayedWith = 0x20, // not currently used + // k_EFriendFlagFriendOfFriend = 0x40, // not currently used + k_EFriendFlagRequestingFriendship = 0x80, + k_EFriendFlagRequestingInfo = 0x100, + k_EFriendFlagIgnored = 0x200, + k_EFriendFlagIgnoredFriend = 0x400, + k_EFriendFlagSuggested = 0x800, + k_EFriendFlagAll = 0xFFFF, +}; + +// for backwards compat +typedef EFriendFlags k_EFriendFlags; + + +//----------------------------------------------------------------------------- +// Purpose: list of states a friend can be in +//----------------------------------------------------------------------------- +enum EPersonaState +{ + k_EPersonaStateOffline = 0, // friend is not currently logged on + k_EPersonaStateOnline = 1, // friend is logged on + k_EPersonaStateBusy = 2, // user is on, but busy + k_EPersonaStateAway = 3, // auto-away feature + k_EPersonaStateSnooze = 4, // auto-away for a long time + k_EPersonaStateLookingToTrade = 5, // Online, trading + k_EPersonaStateLookingToPlay = 6, // Online, wanting to play + k_EPersonaStateMax, +}; + +enum EPersonaStateFlag +{ + k_EPersonaStateFlagHasRichPresence = 1, + k_EPersonaStateFlagInJoinableGame = 2, +}; + +// used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user +// these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend +enum EPersonaChange +{ + k_EPersonaChangeName = 0x0001, + k_EPersonaChangeStatus = 0x0002, + k_EPersonaChangeComeOnline = 0x0004, + k_EPersonaChangeGoneOffline = 0x0008, + k_EPersonaChangeGamePlayed = 0x0010, + k_EPersonaChangeGameServer = 0x0020, + k_EPersonaChangeAvatar = 0x0040, + k_EPersonaChangeJoinedSource= 0x0080, + k_EPersonaChangeLeftSource = 0x0100, + k_EPersonaChangeRelationshipChanged = 0x0200, + k_EPersonaChangeNameFirstSet = 0x0400, + k_EPersonaChangeFacebookInfo = 0x0800, + k_EPersonaChangeNickname = 0x1000, + k_EPersonaChangeSteamLevel = 0x2000, +}; + +enum EChatPermission +{ + k_EChatPermissionClose = 1, + k_EChatPermissionInvite = 2, + k_EChatPermissionTalk = 8, + k_EChatPermissionKick = 16, + k_EChatPermissionMute = 32, + k_EChatPermissionSetMetadata = 64, + k_EChatPermissionChangePermissions = 128, + k_EChatPermissionBan = 256, + k_EChatPermissionChangeAccess = 512, + k_EChatPermissionEveryoneNotInClanDefault = 8, + k_EChatPermissionEveryoneDefault = 10, + k_EChatPermissionMemberDefault = 282, + k_EChatPermissionOfficerDefault = 282, + k_EChatPermissionOwnerDefault = 891, + k_EChatPermissionMask = 1019, +}; + +//----------------------------------------------------------------------------- +// Purpose: Chat Room Enter Responses +//----------------------------------------------------------------------------- +enum EChatRoomEnterResponse +{ + k_EChatRoomEnterResponseSuccess = 1, // Success + k_EChatRoomEnterResponseDoesntExist = 2, // Chat doesn't exist (probably closed) + k_EChatRoomEnterResponseNotAllowed = 3, // General Denied - You don't have the permissions needed to join the chat + k_EChatRoomEnterResponseFull = 4, // Chat room has reached its maximum size + k_EChatRoomEnterResponseError = 5, // Unexpected Error + k_EChatRoomEnterResponseBanned = 6, // You are banned from this chat room and may not join + k_EChatRoomEnterResponseLimited = 7, // Joining this chat is not allowed because you are a limited user (no value on account) + k_EChatRoomEnterResponseClanDisabled = 8, // Attempt to join a clan chat when the clan is locked or disabled + k_EChatRoomEnterResponseCommunityBan = 9, // Attempt to join a chat when the user has a community lock on their account + k_EChatRoomEnterResponseMemberBlockedYou = 10, // Join failed - some member in the chat has blocked you from joining + k_EChatRoomEnterResponseYouBlockedMember = 11, // Join failed - you have blocked some member already in the chat + k_EChatRoomEnterResponseNoRankingDataLobby = 12, // There is no ranking data available for the lobby + k_EChatRoomEnterResponseNoRankingDataUser = 13, // There is no ranking data available for the user + k_EChatRoomEnterResponseRankOutOfRange = 14, // The user is out of the allowable ranking range +}; + +enum EChatAction +{ + k_EChatActionInviteChat = 1, + k_EChatActionKick = 2, + k_EChatActionBan = 3, + k_EChatActionUnBan = 4, + k_EChatActionStartVoiceSpeak = 5, + k_EChatActionEndVoiceSpeak = 6, + k_EChatActionLockChat = 7, + k_EChatActionUnlockChat = 8, + k_EChatActionCloseChat = 9, + k_EChatActionSetJoinable = 10, + k_EChatActionSetUnjoinable = 11, + k_EChatActionSetOwner = 12, + k_EChatActionSetInvisibleToFriends = 13, + k_EChatActionSetVisibleToFriends = 14, + k_EChatActionSetModerated = 15, + k_EChatActionSetUnmoderated = 16, +}; + +enum EChatActionResult +{ + k_EChatActionResultSuccess = 1, + k_EChatActionResultError = 2, + k_EChatActionResultNotPermitted = 3, + k_EChatActionResultNotAllowedOnClanMember = 4, + k_EChatActionResultNotAllowedOnBannedUser = 5, + k_EChatActionResultNotAllowedOnChatOwner = 6, + k_EChatActionResultNotAllowedOnSelf = 7, + k_EChatActionResultChatDoesntExist = 8, + k_EChatActionResultChatFull = 9, + k_EChatActionResultVoiceSlotsFull = 10, +}; + +//----------------------------------------------------------------------------- +// Purpose: user restriction flags +//----------------------------------------------------------------------------- +enum EUserRestriction +{ + k_nUserRestrictionNone = 0, // no known chat/content restriction + k_nUserRestrictionUnknown = 1, // we don't know yet (user offline) + k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat + k_nUserRestrictionVoiceChat = 4, // user is not allowed to (or can't) send/recv voice chat + k_nUserRestrictionGroupChat = 8, // user is not allowed to (or can't) send/recv group chat + k_nUserRestrictionRating = 16, // user is too young according to rating in current region + k_nUserRestrictionGameInvites = 32, // user cannot send or recv game invites (e.g. mobile) + k_nUserRestrictionTrading = 64, // user cannot participate in trading (console, mobile) +}; + +enum EOverlayToStoreFlag +{ + k_EOverlayToStoreFlagNone = 0, + k_EOverlayToStoreFlagAddToCart = 1, +}; + + +// size limits on Rich Presence data +enum { k_cchMaxRichPresenceKeys = 20 }; +enum { k_cchMaxRichPresenceKeyLength = 64 }; +enum { k_cchMaxRichPresenceValueLength = 256 }; + +// maximum length of friend group name (not including terminating nul!) +const int k_cchMaxFriendGroupName = 64; + +// maximum number of groups a single user is allowed +const int k_cFriendGroupLimit = 100; + +// friends group identifier type +typedef int16 FriendsGroupID_t; + +// invalid friends group identifier constant +const FriendsGroupID_t k_FriendsGroupID_Invalid = -1; + +const int k_nMaxFriends = 250; +const int k_nMaxPendingInvitations = 48; + +// maximum length of friend group name (not including terminating nul!) +const int k_cchMaxFriendsGroupName = 64; + +// maximum number of groups a single user is allowed +const int k_cFriendsGroupLimit = 100; + +const int k_cEnumerateFollowersMax = 50; + +// max size on chat messages +const uint32 k_cchFriendChatMsgMax = 0x3000; + +// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16. +// The UTF-8 version has to be very generous to accomodate characters that get large when encoded +// in UTF-8. +enum +{ + k_cchPersonaNameMax = 128, + k_cwchPersonaNameMax = 32, +}; + +// size limit on chat room or member metadata +const uint32 k_cubChatMetadataMax = 8192; + +const int k_cchSystemIMTextMax = 4096; // upper bound of length of system IM text + + +#pragma pack( push, 8 ) + +//----------------------------------------------------------------------------- +// Purpose: information about user sessions +//----------------------------------------------------------------------------- +struct FriendSessionStateInfo_t +{ + uint32 m_uiOnlineSessionInstances; + uint8 m_uiPublishedToFriendsSessionInstance; +}; + + + + +// k_iSteamFriendsCallbacks callbacks + + + + +//----------------------------------------------------------------------------- +// Purpose: called when a friends' status changes +//----------------------------------------------------------------------------- +struct PersonaStateChange_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 4 }; + + CSteamID m_ulSteamID; // steamID of the friend who changed + EPersonaChange m_nChangeFlags; // what's changed +}; + + +//----------------------------------------------------------------------------- +// Purpose: posted when game overlay activates or deactivates +// the game can use this to be pause or resume single player games +//----------------------------------------------------------------------------- +struct GameOverlayActivated_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 31 }; + + uint8 m_bActive; // true if it's just been activated, false otherwise +}; + + +//----------------------------------------------------------------------------- +// Purpose: called when the user tries to join a different game server from their friends list +// game client should attempt to connect to specified server when this is received +//----------------------------------------------------------------------------- +struct GameServerChangeRequested_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 32 }; + + char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com") + char m_rgchPassword[64]; // server password, if any +}; + + +//----------------------------------------------------------------------------- +// Purpose: called when the user tries to join a lobby from their friends list +// game client should attempt to connect to specified lobby when this is received +//----------------------------------------------------------------------------- +struct GameLobbyJoinRequested_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 33 }; + CSteamID m_steamIDLobby; + + // The friend they did the join via (will be invalid if not directly via a friend) + // + // On PS3, the friend will be invalid if this was triggered by a PSN invite via the XMB, but + // the account type will be console user so you can tell at least that this was from a PSN friend + // rather than a Steam friend. + CSteamID m_steamIDFriend; +}; + + +//----------------------------------------------------------------------------- +// Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call +// if the image wasn't already available +//----------------------------------------------------------------------------- +struct AvatarImageLoaded_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 34 }; + + CSteamID m_steamID; // steamid the avatar has been loaded for + int m_iImage; // the image index of the now loaded image + int m_iWide; // width of the loaded image + int m_iTall; // height of the loaded image +}; + + +//----------------------------------------------------------------------------- +// Purpose: marks the return of a request officer list call +//----------------------------------------------------------------------------- +struct ClanOfficerListResponse_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 35 }; + + CSteamID m_steamIDClan; + int m_cOfficers; + uint8 m_bSuccess; +}; + +//----------------------------------------------------------------------------- +// Purpose: callback indicating updated data about friends rich presence information +//----------------------------------------------------------------------------- +struct FriendRichPresenceUpdate_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 36 }; + + CSteamID m_steamIDFriend; // friend who's rich presence has changed + AppId_t m_nAppID; // the appID of the game (should always be the current game) +}; + +//----------------------------------------------------------------------------- +// Purpose: called when the user tries to join a game from their friends list +// rich presence will have been set with the "connect" key which is set here +//----------------------------------------------------------------------------- +struct GameRichPresenceJoinRequested_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 37 }; + + CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend) + char m_rgchConnect[k_cchMaxRichPresenceValueLength]; +}; + +//----------------------------------------------------------------------------- +// Purpose: a chat message has been received for a clan chat the game has joined +//----------------------------------------------------------------------------- +struct GameConnectedClanChatMsg_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 38 }; + + CSteamID m_steamIDClanChat; + CSteamID m_steamIDUser; + int m_iMessageID; +}; + +//----------------------------------------------------------------------------- +// Purpose: a user has joined a clan chat +//----------------------------------------------------------------------------- +struct GameConnectedChatJoin_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 39 }; + + CSteamID m_steamIDClanChat; + CSteamID m_steamIDUser; +}; + +//----------------------------------------------------------------------------- +// Purpose: a user has left the chat we're in +//----------------------------------------------------------------------------- +struct GameConnectedChatLeave_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 40 }; + + CSteamID m_steamIDClanChat; + CSteamID m_steamIDUser; + bool m_bKicked; // true if admin kicked + bool m_bDropped; // true if Steam connection dropped +}; + +//----------------------------------------------------------------------------- +// Purpose: a DownloadClanActivityCounts() call has finished +//----------------------------------------------------------------------------- +struct DownloadClanActivityCountsResult_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 41 }; + + bool m_bSuccess; +}; + +//----------------------------------------------------------------------------- +// Purpose: a JoinClanChatRoom() call has finished +//----------------------------------------------------------------------------- +struct JoinClanChatRoomCompletionResult_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 42 }; + + CSteamID m_steamIDClanChat; + EChatRoomEnterResponse m_eChatRoomEnterResponse; +}; + +//----------------------------------------------------------------------------- +// Purpose: a chat message has been received from a user +//----------------------------------------------------------------------------- +struct GameConnectedFriendChatMsg_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 43 }; + + CSteamID m_steamIDUser; + int m_iMessageID; +}; + +struct FriendsGetFollowerCount_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 44 }; + + EResult m_eResult; + CSteamID m_steamID; + int32 m_cCount; +}; + +struct FriendsIsFollowing_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 45 }; + + EResult m_eResult; + CSteamID m_steamID; + bool m_bIsFollowing; +}; + +struct FriendsEnumerateFollowingList_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 46 }; + + EResult m_eResult; + CSteamID m_steamIDs[ k_cEnumerateFollowersMax ]; + int32 m_cSteamIDs; + int32 m_cTotalResults; +}; + +//----------------------------------------------------------------------------- +// Purpose: a SetPersonaName / SetPersonaNameEx call has finished +//----------------------------------------------------------------------------- +struct SetPersonaNameResponse_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 47 }; + + bool m_bUnk1; + bool m_bUnk2; + + EResult m_eResult; +}; + + +// k_iClientFriendsCallbacks callbacks + + + +struct GameOverlayActivateRequested_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 1 }; + + char m_rgchDialog[256]; + CSteamID m_steamIDTarget; + AppId_t m_nAppID; + bool m_bWebPage; + EOverlayToStoreFlag m_eFlag; +}; + +struct ClanEventReceived_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 2 }; + + uint64 m_gidEvent; + uint64 m_ulSteamIDClan; + char m_rgchTitle[256]; + uint32 m_nStartTime; + CGameID m_GameID; +}; + +//----------------------------------------------------------------------------- +// Purpose: called after a friend has been successfully added +//----------------------------------------------------------------------------- +struct FriendAdded_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 3 }; + + EResult m_eResult; + uint64 m_ulSteamID; // steamID of the friend who was just added +}; + + +//----------------------------------------------------------------------------- +// Purpose: called when a user is requesting friendship +// the persona details of this user are guaranteed to be available locally +// at the point this callback occurs +//----------------------------------------------------------------------------- +struct UserRequestingFriendship_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 4 }; + + CSteamID m_ulSteamID; // steamID of the friend who just added us +}; + + +//----------------------------------------------------------------------------- +// Purpose: called when this client has received a chat/invite/etc. message from a friend +//----------------------------------------------------------------------------- +struct FriendChatMsg_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 5 }; + + CSteamID m_ulFriendID; // other participant in the msg + CSteamID m_ulSenderID; // steamID of the friend who has sent this message + uint8 m_eChatEntryType; + uint8 m_bLimitedAccount; + uint32 m_iChatID; // chat id +}; + +struct FriendInvited_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 6 }; + + EResult m_eResult; +}; + +struct ChatRoomInvite_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 7 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDPatron; + CSteamID m_ulSteamIDFriendChat; + + EChatRoomType m_EChatRoomType; + + char m_rgchChatRoomName[ 128 ]; +}; + +struct ChatRoomEnter_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 8 }; + + CSteamID m_ulSteamIDChat; + + EChatRoomType m_EChatRoomType; + + uint64 m_ulSteamIDOwner; // Cannot use CSteamID here due to padding issues. + CSteamID m_ulSteamIDClan; + CSteamID m_ulSteamIDFriendChat; + + bool m_bLocked; + uint32 m_rgfChatPermissions; + EChatRoomEnterResponse m_EChatRoomEnterResponse; + + char m_rgchChatRoomName[ 128 ]; +}; + +struct ChatMemberStateChange_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 9 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDUserChanged; + EChatMemberStateChange m_rgfChatMemberStateChange; + uint64 m_ulSteamIDMakingChange; // Cannot use CSteamID here due to padding issues. +}; + +struct ChatRoomMsg_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 10 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDUser; + uint8 m_eChatEntryType; + uint32 m_iChatID; +}; + +struct ChatRoomDlgClose_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 11 }; + + CSteamID m_ulSteamIDChat; +}; + +struct ChatRoomClosing_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 12 }; + + CSteamID m_ulSteamIDChat; +}; + +struct ChatRoomKicking_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 13 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDAdmin; +}; + +struct ChatRoomBanning_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 14 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDAdmin; +}; + +struct ChatRoomCreate_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 15 }; + + EResult m_eResult; + + uint64 m_ulSteamIDChat; // Cannot use CSteamID here due to padding issues. + CSteamID m_ulSteamIDFriendChat; +}; + +struct OpenChatDialog_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 16 }; + + CSteamID m_ulSteamID; +}; + +struct ChatRoomActionResult_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 17 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDUserActedOn; + EChatAction m_EChatAction; + EChatActionResult m_EChatActionResult; +}; + +struct ChatRoomDlgSerialized_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 18 }; + + CSteamID m_ulSteamID; +}; + +struct ClanInfoChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 19 }; + + CSteamID m_ulSteamID; + + bool m_bNameChanged; + bool m_bAvatarChanged; + bool m_bAccountInfoChanged; +}; + +struct ChatMemberInfoChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 20 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDUser; + uint32 m_rgfChatMemberPermissions; +}; + +struct ChatRoomInfoChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 21 }; + + CSteamID m_ulSteamIDChat; + uint32 m_rgfChatRoomDetails; + uint64 m_ulSteamIDMakingChange; // Cannot use CSteamID here due to padding issues. +}; + +struct OBSOLETE_CALLBACK SteamRackBouncing_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 22 }; + + // TODO : Reverse this callback +}; + +struct ChatRoomSpeakChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 23 }; + + CSteamID m_ulSteamIDChat; + CSteamID m_ulSteamIDUser; + bool m_bSpeaking; +}; + +struct NotifyIncomingCall_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 24 }; + + HVoiceCall m_Handle; + + uint64 m_ulSteamID; // Cannot use CSteamID here due to padding issues. + CSteamID m_ulSteamIDChat; + + bool m_bIncoming; +}; + +struct NotifyHangup_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 25 }; + + HVoiceCall m_Handle; + EVoiceResult m_eVoiceResult; +}; + +struct NotifyRequestResume_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 26 }; + + HVoiceCall m_Handle; +}; + +struct NotifyChatRoomVoiceStateChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 27 }; + + CSteamID m_steamChatRoom; + CSteamID m_steamUser; +}; + +struct ChatRoomDlgUIChange_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 28 }; + + CSteamID m_SteamIDChat; + bool m_bShowAvatars; + bool m_bBeepOnNewMsg; + bool m_bShowSteamIDs; + bool m_bShowTimestampOnNewMsg; +}; + +struct VoiceCallInitiated_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 29 }; + + uint64 m_ulSteamIDUser; + uint64 m_ulSteamIDFriend; + HVoiceCall m_hVoiceCall; +}; + +struct FriendIgnored_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 30 }; + + EResult m_eResult; + uint64 m_ulSteamID; // Cannot use CSteamID here due to padding issues. + CSteamID m_ulSteamIDFriend; + bool m_bIgnored; +}; + +struct VoiceInputDeviceChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 31 }; +}; + +struct VoiceEnabledStateChanged_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 32 }; + + bool m_bVoiceEnabled; +}; + +struct FriendsWhoPlayGameUpdate_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 33 }; + + CGameID m_gameID; +}; + +struct FriendProfileInfoResponse_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 34 }; + + CSteamID m_steamIDFriend; + EResult m_eResult; +}; + +struct RichInviteReceived_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 35 }; + + CSteamID m_steamIDFriend; + AppId_t m_nAppID; + char m_rgchConnect[256]; +}; + +struct FriendsMenuChange_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 36 }; + + bool m_bShowAvatars; + bool m_bSortByName; + bool m_bShowOnlineFriendsOnly; + bool m_bShowUntaggedFriends; +}; + +struct TradeInviteReceived_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 37 }; + + CSteamID m_steamIDPartner; + uint32 m_unTradeRequestID; +}; + +struct TradeInviteResponse_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 38 }; + + CSteamID m_steamIDPartner; + uint32 m_eResponse; +}; + +struct TradeStartSession_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 39 }; + + CSteamID m_steamIDPartner; +}; + +struct TradeInviteCanceled_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 40 }; + + // TODO : Reverse this callback +}; + +struct GameUsingVoice_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 41 }; + + // TODO : Reverse this callback +}; + +struct FriendsGroupCreated_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 42 }; + + // TODO : Reverse this callback +}; + +struct FriendsGroupDeleted_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 43 }; + + // TODO : Reverse this callback +}; + +struct FriendsGroupRenamed_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 44 }; + + // TODO : Reverse this callback +}; + +struct FriendsGroupMemberAdded_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 45 }; + + // TODO : Reverse this callback +}; + +struct FriendsGroupMemberRemoved_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 46 }; + + // TODO : Reverse this callback +}; + +//----------------------------------------------------------------------------- +// Purpose: called when the user requests the history of player names on a given account +//----------------------------------------------------------------------------- +struct NameHistoryResponse_t +{ + enum { k_iCallback = k_iClientFriendsCallbacks + 47 }; + int m_cSuccessfulLookups; // number of lookups that were successful + int m_cFailedLookups; // number of lookups that failed for one reason or another +}; + +#pragma pack( pop ) + + + +#endif // FRIENDSCOMMON_H diff --git a/src/public SDK/GameCoordinatorCommon.h b/src/public SDK/GameCoordinatorCommon.h new file mode 100644 index 0000000..77a9548 --- /dev/null +++ b/src/public SDK/GameCoordinatorCommon.h @@ -0,0 +1,715 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMECOORDINATORCOMMON_H +#define ISTEAMGAMECOORDINATORCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTGAMECOORDINATOR_INTERFACE_VERSION "CLIENTGAMECOORDINATOR_INTERFACE_VERSION001" + +#define STEAMGAMECOORDINATOR_INTERFACE_VERSION_001 "SteamGameCoordinator001" + + +// list of possible return values from the ISteamGameCoordinator API +enum EGCResults +{ + k_EGCResultOK = 0, + k_EGCResultNoMessage = 1, // There is no message in the queue + k_EGCResultBufferTooSmall = 2, // The buffer is too small for the requested message + k_EGCResultNotLoggedOn = 3, // The client is not logged onto Steam + k_EGCResultInvalidMessage = 4, // Something was wrong with the message being sent with SendMessage +}; + +/** + * Valve moved a lot of messages to the protobuf format. + * This means that the structs below should no longer be trusted to be correct. + * A protobuf message can be detected with: + * (uMsgType & 0x80000000) == 0x80000000 + */ +/* +typedef enum EGCMessages +{ + k_EGCMsgGenericReply = 10, + + k_ESOMsg_Create = 21, + k_ESOMsg_Update, + k_ESOMsg_Destroy, + k_ESOMsg_CacheSubscribed, + k_ESOMsg_CacheUnsubscribed, + k_ESOMsg_UpdateMultiple, + k_ESOMsg_CacheSubscriptionCheck, + k_ESOMsg_CacheSubscriptionRefresh, + + k_EGCMsgAchievementAwarded = 51, + k_EGCMsgConCommand, + k_EGCMsgStartPlaying, + k_EGCMsgStopPlaying, + k_EGCMsgStartGameserver, + k_EGCMsgStopGameserver, + k_EGCMsgWGRequest, + k_EGCMsgWGResponse, + k_EGCMsgGetUserGameStatsSchema, + k_EGCMsgGetUserGameStatsSchemaResponse, + k_EGCMsgGetUserStatsDEPRECATED, + k_EGCMsgGetUserStatsResponse, + k_EGCMsgAppInfoUpdated, + k_EGCMsgValidateSession, + k_EGCMsgValidateSessionResponse, + k_EGCMsgLookupAccountFromInput, + k_EGCMsgSendHTTPRequest, + k_EGCMsgSendHTTPRequestResponse, + k_EGCMsgPreTestSetup, + k_EGCMsgRecordSupportAction, + k_EGCMsgGetAccountDetails, + k_EGCMsgSendInterAppMessage, + k_EGCMsgReceiveInterAppMessage, + k_EGCMsgFindAccounts, + k_EGCMsgPostAlert, + k_EGCMsgGetLicenses, + k_EGCMsgGetUserStats, + k_EGCMsgGetCommands, + k_EGCMsgGetCommandsResponse, + k_EGCMsgAddFreeLicense, + k_EGCMsgAddFreeLicenseResponse, + + k_EGCMsgWebAPIRegisterInterfaces = 101, + k_EGCMsgWebAPIJobRequest, + k_EGCMsgWebAPIRegistrationRequested, + + k_EGCMsgMemCachedGet = 200, + k_EGCMsgMemCachedGetResponse, + k_EGCMsgMemCachedSet, + k_EGCMsgMemCachedDelete, + + k_EMsgGCSetItemPosition = 1001, + k_EMsgGCCraft, + k_EMsgGCCraftResponse, + k_EMsgGCDelete, + k_EMsgGCVerifyCacheSubscription, + k_EMsgGCNameItem, + k_EMsgGCDecodeItem, + k_EMsgGCDecodeItemResponse, + k_EMsgGCPaintItem, + k_EMsgGCPaintItemResponse, + k_EMsgGCGoldenWrenchBroadcast, + k_EMsgGCMOTDRequest, + k_EMsgGCMOTDRequestResponse, + k_EMsgGCAddItemToSocket, + k_EMsgGCAddItemToSocketResponse, + k_EMsgGCAddSocketToBaseItem, + k_EMsgGCAddSocketToItem, + k_EMsgGCAddSocketToItemResponse, + k_EMsgGCNameBaseItem, + k_EMsgGCNameBaseItemResponse, + k_EMsgGCRemoveSocketItem, + k_EMsgGCRemoveSocketItemResponse, + k_EMsgGCCustomizeItemTexture, + k_EMsgGCCustomizeItemTextureResponse, + k_EMsgGCUseItemRequest, + k_EMsgGCUseItemResponse, + k_EMsgGCGiftedItems, + k_EMsgGCSpawnItem, + k_EMsgGCRespawnPostLoadoutChange, + k_EMsgGCRemoveItemName, + k_EMsgGCRemoveItemPaint, + k_EMsgGCGiftWrapItem, + k_EMsgGCGiftWrapItemResponse, + k_EMsgGCDeliverGift, + k_EMsgGCDeliverGiftResponseGiver, + k_EMsgGCDeliverGiftResponseReceiver, + k_EMsgGCUnwrapGiftRequest, + k_EMsgGCUnwrapGiftResponse, + k_EMsgGCSetItemStyle, + k_EMsgGCUsedClaimCodeItem, + k_EMsgGCSortItems, + k_EMsgGC_RevolvingLootList, + k_EMsgGCLookupAccount, + k_EMsgGCLookupAccountResponse, + k_EMsgGCLookupAccountName, + k_EMsgGCLookupAccountNameResponse, + k_EMsgGCUpdateItemSchema = 1049, + k_EMsgGCRequestInventoryRefresh, + k_EMsgGCRemoveCustomTexture, + k_EMsgGCRemoveCustomTextureResponse, + k_EMsgGCRemoveMakersMark, + k_EMsgGCRemoveMakersMarkResponse, + k_EMsgGCRemoveUniqueCraftIndex, + k_EMsgGCRemoveUniqueCraftIndexResponse, + k_EMsgGCSaxxyBroadcast, + k_EMsgGCBackpackSortFinished, + k_EMsgGCRequestItemSchemaData = 1060, + + k_EMsgGCTrading_InitiateTradeRequest = 1501, + k_EMsgGCTrading_InitiateTradeResponse, + k_EMsgGCTrading_StartSession, + k_EMsgGCTrading_SetItem, + k_EMsgGCTrading_RemoveItem, + k_EMsgGCTrading_UpdateTradeInfo, + k_EMsgGCTrading_SetReadiness, + k_EMsgGCTrading_ReadinessResponse, + k_EMsgGCTrading_SessionClosed, + k_EMsgGCTrading_CancelSession, + k_EMsgGCTrading_TradeChatMsg, + k_EMsgGCTrading_ConfirmOffer, + k_EMsgGCTrading_TradeTypingChatMsg, + + k_EMsgGCServerBrowser_FavoriteServer = 1601, + k_EMsgGCServerBrowser_BlacklistServer, + + k_EMsgGCDev_NewItemRequest = 2001, + k_EMsgGCDev_NewItemRequestResponse, + + k_EMsgGCStoreGetUserData = 2500, + k_EMsgGCStoreGetUserDataResponse, + k_EMsgGCStorePurchaseInit, + k_EMsgGCStorePurchaseInitResponse, + k_EMsgGCStorePurchaseFinalize, + k_EMsgGCStorePurchaseFinalizeResponse, + k_EMsgGCStorePurchaseCancel, + k_EMsgGCStorePurchaseCancelResponse, + k_EMsgGCStorePurchaseQueryTxn, + k_EMsgGCStorePurchaseQueryTxnResponse, + + k_EMsgGCSystemMessage = 4001, + k_EMsgGCReplicateConVars, + k_EMsgGCConVarUpdated, + + k_EMsgGCReportWarKill = 5001, + k_EMsgGCVoteKickBanPlayer = 5018, + k_EMsgGCVoteKickBanPlayerResult, + k_EMsgGCKickPlayer, + k_EMsgGCStartedTraining, + k_EMsgGCFreeTrial_ChooseMostHelpfulFriend, + k_EMsgGCRequestTF2Friends, + k_EMsgGCRequestTF2FriendsResponse, + k_EMsgGCReplay_UploadedToYouTube, + k_EMsgGCReplay_SubmitContestEntry, + k_EMsgGCReplay_SubmitContestEntryResponse, + + k_EMsgGCCoaching_AddToCoaches = 5200, + k_EMsgGCCoaching_AddToCoachesResponse, + k_EMsgGCCoaching_RemoveFromCoaches, + k_EMsgGCCoaching_RemoveFromCoachesResponse, + k_EMsgGCCoaching_FindCoach, + k_EMsgGCCoaching_FindCoachResponse, + k_EMsgGCCoaching_AskCoach, + k_EMsgGCCoaching_AskCoachResponse, + k_EMsgGCCoaching_CoachJoinGame, + k_EMsgGCCoaching_CoachJoining, + k_EMsgGCCoaching_CoachJoined, + k_EMsgGCCoaching_LikeCurrentCoach, + k_EMsgGCCoaching_RemoveCurrentCoach, + k_EMsgGCCoaching_AlreadyRatedCoach, + + k_EMsgGC_Duel_Request = 5500, + k_EMsgGC_Duel_Response, + k_EMsgGC_Duel_Results, + k_EMsgGC_Duel_Status, + + k_EMsgGC_Halloween_ReservedItem = 5600, + k_EMsgGC_Halloween_GrantItem, + k_EMsgGC_Halloween_GrantItemResponse = 5604, + k_EMsgGC_Halloween_Cheat_QueryResponse, + k_EMsgGC_Halloween_ItemClaimed, + + k_EMsgGC_GameServer_LevelInfo = 5700, + k_EMsgGC_GameServer_AuthChallenge, + k_EMsgGC_GameServer_AuthChallengeResponse, + k_EMsgGC_GameServer_CreateIdentity, + k_EMsgGC_GameServer_CreateIdentityResponse, + k_EMsgGC_GameServer_List, + k_EMsgGC_GameServer_ListResponse, + k_EMsgGC_GameServer_AuthResult, + k_EMsgGC_GameServer_ResetIdentity, + k_EMsgGC_GameServer_ResetIdentityResponse, + + k_EMsgGC_QP_ScoreServers = 5800, + k_EMsgGC_QP_ScoreServersResponse, + + k_EMsgGC_PickupItemEligibility_Query = 6000, + k_EMsgGCDev_GrantWarKill, + + k_EMsgGC_IncrementKillCountAttribute = 6100, + k_EMsgGC_IncrementKillCountResponse + +} EGCMessages; +*/ +typedef enum ETFInitTradeResult +{ + k_ETFInitTradeResultOk, + k_ETFInitTradeResultDeclined, // The other player has declined the trade request. + k_ETFInitTradeResultVACBanned, // You do not have trading privileges. + k_ETFInitTradeResultOtherVACBanned, // The other player does not have trading privileges at this time. + k_ETFInitTradeResultBusy, // The other player is currently busy trading with someone else. + k_ETFInitTradeResultDisabled, // Trading items is currently disabled. + k_ETFInitTradeResultNoLoggedIn, // The other player is not available for trading. + k_ETFInitTradeResultCanceled, + k_ETFInitTradeResultTooSoon // You must wait at least 30 seconds between trade requests. + +} ETFInitTradeResult; + +typedef enum ETFTradeResult +{ + k_ETFTradeResultOk, + k_ETFTradeResultCanceled, // The trading session has been canceled. + k_ETFTradeResultStaleInventory, // The trade was cancelled, because some items do not belong to you or the other player. + k_ETFTradeResultUntradeable, // The trade was cancelled, because some items are not allowed in trading. + k_ETFTradeResultNoItems, // The trade was cancelled, because there were no items to trade. + k_ETFTradeResultDisabled // Trading items is currently disabled. + +} ETFTradeResult; + +#pragma pack( push, 8 ) +// callback notification - A new message is available for reading from the message queue +struct GCMessageAvailable_t +{ + enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 1 }; + + uint32 m_nMessageSize; +}; + +// callback notification - A message failed to make it to the GC. It may be down temporarily +struct GCMessageFailed_t +{ + enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 2 }; +}; +#pragma pack( pop ) + +#pragma pack(push, 1) + +struct GCMsgHeader_t +{ + uint16 headerVersion; + uint64 targetJobID; + uint64 sourceJobID; +}; +/* +struct SOMsgCacheSubscribed_t +{ + enum { k_iMessage = k_ESOMsg_CacheSubscribed }; + GCMsgHeader_t header; + + CSteamID steamid; + uint32 numberOfTypes; // Number of different 'sets' of information included, starts with items, goes on to recipes etc. + // [SOMsgCacheSubscribed_*s_t] * numberOfTypes; SOMsgCacheSubscribed_Items_t is first, and the only one currently documented. +}; + +struct SOMsgCacheSubscribed_Items_t +{ + uint16 idOfType; // Check this is 1 + uint16 itemcount; + // Variable length data: + // [SOMsgCacheSubscribed_Item_t] * itemcount +}; + +struct SOMsgCacheSubscribed_Item_t +{ + uint64 itemid; + uint32 accountid; + uint16 itemdefindex; + uint8 itemlevel; + uint8 itemquality; + uint32 position; + uint32 quantity; + uint16 namelength; + // Variable length data: + // char customname[namelength]; + // uint8 flags; + // uint8 origin; + // uint16 descriptionlength; + // char customdescription[descriptionlength]; + // uint8 unk; + // uint16 attribcount; + // [SOMsgCacheSubscribed_Item_Attrib_t] * attribcount + // uint64 containedItem; // If this is set, there is a whole other item after. +}; + +struct SOMsgCacheSubscribed_Item_Attrib_t +{ + uint16 attribindex; + float value; +}; + +struct SOMsgCacheUnsubscribed_t +{ + enum { k_iMessage = k_ESOMsg_CacheUnsubscribed }; + GCMsgHeader_t header; + + CSteamID steamid; +}; + +struct SOMsgCreate_t +{ + enum { k_iMessage = k_ESOMsg_Create }; + GCMsgHeader_t header; + + CSteamID steamid; + uint32 unknown; + SOMsgCacheSubscribed_Item_t item; +};*/ + +/* +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 76f0da0200000000 0105 0f000080 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 21ccd90200000000 0105 10000080 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 d069ea0200000000 0105 20000080 +*/ +/*struct SOMsgUpdate_t +{ + enum { k_iMessage = k_ESOMsg_Update }; + GCMsgHeader_t header; + + CSteamID steamid; + uint32 unk1; + uint64 itemID; + uint16 unk2; + uint32 position; +};*/ + +/* +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 7f7e1b0200000000 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 5a77020200000000 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 bdbc1c0200000000 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 8885210200000000 +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 01000000 e582e30100000000 +*/ +/*struct SOMsgDeleted_t +{ + enum { k_iMessage = k_ESOMsg_Destroy }; + GCMsgHeader_t header; + + CSteamID steamid; + uint32 unk1; + uint64 itemid; +};*/ + +/* +0100 ffffffffffffffffffffffffffffffff 76f0da0200000000 0f000080 00000000 +0100 ffffffffffffffffffffffffffffffff 21ccd90200000000 10000080 00000000 +0100 ffffffffffffffffffffffffffffffff cff9ea0200000000 42000080 00000000 +0100 ffffffffffffffffffffffffffffffff d069ea0200000000 20000080 00000000 +*/ +/*struct GCSetItemPosition_t +{ + enum { k_iMessage = k_EMsgGCSetItemPosition }; + GCMsgHeader_t header; + + uint64 itemID; + uint32 position; + uint32 unk1; +};*/ + + +/* +This one is 4 natasha +0100 ffffffffffffffffffffffffffffffff 0700 0400 5a77020200000000 bdbc1c0200000000 8885210200000000 e582e30100000000 +*/ +/*struct GCCraft_t +{ + enum { k_iMessage = k_EMsgGCCraft }; + GCMsgHeader_t header; + + uint16 blueprint;//0xffff = unknown blueprint + uint16 itemcount; + // Variable length data: + // [uint64 itemid] * itemcount +};*/ + + +/* +0100 ffffffffffffffffffffffffffffffff 0700 0000000000000100 d069ea0200000000 +*/ +/*struct GCCraftResponse_t +{ + enum { k_iMessage = k_EMsgGCCraftResponse }; + GCMsgHeader_t header; + + uint16 blueprint;//0xffff = failed + uint64 unk1; + uint64 itemid; +};*/ + + +/* +0100 ffffffffffffffffffffffffffffffff 7f7e1b0200000000 +*/ +struct GCDelete_t +{ + //enum { k_iMessage = k_EMsgGCDelete }; + GCMsgHeader_t header; + + uint64 itemID; +}; + + +/* +0100 ffffffffffffffffffffffffffffffff 86cf4e0001001001 +*/ +/*struct GCVerifyCacheSubscription_t +{ + enum { k_iMessage = k_EMsgGCVerifyCacheSubscription }; + GCMsgHeader_t header; + + CSteamID steamid; +};*/ + + +/* +0100 ffffffffffffffffffffffffffffffff 28000000 4d61783637202846522900 +0100 ffffffffffffffffffffffffffffffff 29000000 54726962697400 +0100 ffffffffffffffffffffffffffffffff 2a000000 776973686d617374657200 +0100 ffffffffffffffffffffffffffffffff 2b000000 416d616e6f6f00 +0100 ffffffffffffffffffffffffffffffff 2c000000 7c4b47437c2047617920526f62696e00 +0100 ffffffffffffffffffffffffffffffff 2d000000 416e6164757200 +0100 ffffffffffffffffffffffffffffffff 2e000000 54686520436f726e62616c6c657200 +0100 ffffffffffffffffffffffffffffffff 2f000000 69736c6100 +*/ +/*struct GCGoldenWrenchBroadcast_t +{ + enum { k_iMessage = k_EMsgGCGoldenWrenchBroadcast }; + GCMsgHeader_t header; + + uint16 WrenchNumber; + uint16 State; // 0 = Found, 1 = Destroyed + // Variable length data: + // char OwnerName[]; +};*/ + +/* +0100 ffffffffffffffffffffffffffffffff 00000000 02000000 +0100 ffffffffffffffffffffffffffffffff 329d2d4c 02000000 +0100 ffffffffffffffffffffffffffffffff e6c74e4c 02000000 +*/ +/*struct GCMOTDRequest_t +{ + enum { k_iMessage = k_EMsgGCMOTDRequest }; + GCMsgHeader_t header; + + uint32 timestamp; + uint32 unk1; +};*/ + +/* +0100 ffffffffffffffffffffffffffffffff 0000 +0100 ffffffffffffffffffffffffffffffff 0200 3100 30930e4c 436865636b6564206f75742074686520626c6f673f00 496620796f7520686176656e2774207265616420746865206f6666696369616c2054463220626c6f672c20697427732066756c6c206f6620696e73696768747320696e746f206f757220646576656c6f706d656e742070726f636573732c206c696e6b7320746f206e6f7461626c6520636f6d6d756e6974792070726f64756374696f6e732c20616e642072616e646f6d2073746f726965732061626f7574206f7572206c6f7665206f6620686174732e204869742074686520627574746f6e2062656c6f7720746f2074616b652061206c6f6f6b2100 687474703a5c5c7777772e7465616d666f7274726573732e636f6d5c00 3200 b0e52c4c 4f6666696369616c2057696b69206f70656e732100 576527766520726563656e746c79206f70656e65642074686520646f6f7273206f6e20746865204f6666696369616c205446322077696b692e20546865726520796f752063616e2066696e64206f75742065766572797468696e67205446322072656c617465642c2066726f6d20746865206e756d65726963616c206e75747320616e6420626f6c7473206f6620657665727920776561706f6e20746f2074686520656173746572206567677320696e7369646520746865204d65657420746865205465616d206d6f766965732e205468657927726520616c77617973206c6f6f6b696e6720666f72206d6f726520636f6e7472696275746f72732c20736f20776879206e6f742068656164206f76657220616e642068656c70207468656d3f00 687474703a5c5c77696b692e7465616d666f7274726573732e636f6d5c00 +*/ +/*struct GCMOTDRequestResponse_t +{ + enum { k_iMessage = k_EMsgGCMOTDRequestResponse }; + GCMsgHeader_t header; + + uint16 NumberOfNews; + // Variable length data: + // [GCMOTDRequestResponse_News_t] * NumberOfNews +};*/ + +/*struct GCMOTDRequestResponse_News_t +{ + // Variable length data: + // char id[]; + // uint32 timestamp; + // char Title[]; + // char Content[]; + // char URL[]; +};*/ + +/* +These two messages were recently added to TF2 along with two convars (tf_server_identity_token and tf_server_identity_account_id) +Every TF2 server is sent a GC_GameServer_AuthChallenge message on start up, by default the two convars are blank and the server does not respond to the challenge. +If however the convars are set, it responds in the following manner: +accountID is set to the value of the tf_server_identity_account_id convar. +hash is set to the result of the md5 hash of the value of the tf_server_identity_token convar prepended to the salt recieved in the challenge. +For example, if tf_server_identity_token was set to "Derp" and 4203408982 was the salt from the challenge, hash would be the md5 hash of "Derp4203408982" +*/ +/*struct GC_GameServer_AuthChallenge_t +{ + enum { k_iMessage = k_EMsgGC_GameServer_AuthChallenge }; + GCMsgHeader_t header; + + uint8 unknown; // Possibly the terminator for an empty string. + // Variable length data: + // char salt[]; +}; + +struct GC_GameServer_AuthChallengeResponse_t +{ + enum { k_iMessage = k_EMsgGC_GameServer_AuthChallengeResponse }; + GCMsgHeader_t header; + + uint32 accountID; + // Variable length data: + // char hash[]; +}; + + +struct GC_GameServer_LevelInfo_t +{ + enum { k_iMessage = k_EMsgGC_GameServer_LevelInfo }; + GCMsgHeader_t header; + + uint8 unknown; + // Variable length data: + // char mapName[]; +}; + +struct GCTrading_InitiateTradeRequest_t +{ + enum { k_iMessage = k_EMsgGCTrading_InitiateTradeRequest }; + GCMsgHeader_t header; + + uint32 challenge; + CSteamID steamID; + // Variable length data: + // char playerName[]; // Only present on incoming requests. +}; + +struct GCTrading_InitiateTradeResponse_t +{ + enum { k_iMessage = k_EMsgGCTrading_InitiateTradeResponse }; + GCMsgHeader_t header; + + /*ETFInitTradeResult*-/ uint32 result; + uint32 challenge; // When sending this message as a response, make sure to set this as the same value from the request. +}; + +struct GCTrading_TradeChatMsg_t +{ + enum { k_iMessage = k_EMsgGCTrading_TradeChatMsg }; + GCMsgHeader_t header; + + uint8 unknown; // possibly a 0-length string + // Variable length data: + // char chatMsg[]; +}; + +struct GCTrading_TradeTypingChatMsg_t +{ + enum { k_iMessage = k_EMsgGCTrading_TradeTypingChatMsg }; + GCMsgHeader_t header; +}; + +struct GCTrading_StartSession_t +{ + enum { k_iMessage = k_EMsgGCTrading_StartSession }; + GCMsgHeader_t header; + + CSteamID steamID1; + CSteamID steamID2; + // Variable length data: + // char player1Name[]; + // char player2Name[]; +}; + +struct GCTrading_SetItem_t +{ + enum { k_iMessage = k_EMsgGCTrading_SetItem }; + GCMsgHeader_t header; + + uint8 showcase; + uint64 itemID; + uint8 slot; // Trade 'slot' it goes in, see below. +}; + +struct GCTrading_RemoveItem_t +{ + enum { k_iMessage = k_EMsgGCTrading_RemoveItem }; + GCMsgHeader_t header; + + uint64 itemID; +}; + +struct GCTrading_UpdateTradeInfo_t +{ + enum { k_iMessage = k_EMsgGCTrading_UpdateTradeInfo }; + GCMsgHeader_t header; + + uint32 version; + uint8 plyr1_numItems; + uint8 plyr2_numItems; + uint8 plyr1_numItems_showcase; + uint8 plyr2_numItems_showcase; + uint64 plyr1_showcase; + uint64 plyr1_slot0; + uint64 plyr1_slot1; + uint64 plyr1_slot2; + uint64 plyr1_slot3; + uint64 plyr1_slot4; + uint64 plyr1_slot5; + uint64 plyr1_slot6; + uint64 plyr1_slot7; + uint64 plyr2_showcase; + uint64 plyr2_slot0; + uint64 plyr2_slot1; + uint64 plyr2_slot2; + uint64 plyr2_slot3; + uint64 plyr2_slot4; + uint64 plyr2_slot5; + uint64 plyr2_slot6; + uint64 plyr2_slot7; +}; + +// All 4 need to be true +struct GCTrading_ReadinessResponse_t +{ + enum { k_iMessage = k_EMsgGCTrading_ReadinessResponse }; + GCMsgHeader_t header; + + uint32 version; + uint8 player1ready; + uint8 player2ready; + uint8 player1confirmed; + uint8 player2confirmed; +}; + +struct GCTrading_SetReadiness_t +{ + enum { k_iMessage = k_EMsgGCTrading_SetReadiness }; + GCMsgHeader_t header; + + uint32 version; + uint8 response; +}; + +struct GCTrading_ConfirmOffer_t +{ + enum { k_iMessage = k_EMsgGCTrading_ConfirmOffer }; + GCMsgHeader_t header; + + uint32 version; +}; + +struct GCTrading_SessionClosed_t +{ + enum { k_iMessage = k_EMsgGCTrading_SessionClosed }; + GCMsgHeader_t header; + + /*ETFTradeResult*-/ uint32 result; +}; + +struct GCRespawnPostLoadoutChange_t +{ + enum { k_iMessage = k_EMsgGCRespawnPostLoadoutChange }; + GCMsgHeader_t header; + + CSteamID steamID; +};*/ + +#pragma pack(pop) + +#endif // ISTEAMGAMECOORDINATORCOMMON_H diff --git a/src/public SDK/GameServerCommon.h b/src/public SDK/GameServerCommon.h new file mode 100644 index 0000000..851b5ea --- /dev/null +++ b/src/public SDK/GameServerCommon.h @@ -0,0 +1,201 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef GAMESERVERCOMMON_H +#define GAMESERVERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define STEAMGAMESERVER_INTERFACE_VERSION_002 "SteamGameServer002" +#define STEAMGAMESERVER_INTERFACE_VERSION_003 "SteamGameServer003" +#define STEAMGAMESERVER_INTERFACE_VERSION_004 "SteamGameServer004" +#define STEAMGAMESERVER_INTERFACE_VERSION_005 "SteamGameServer005" +#define STEAMGAMESERVER_INTERFACE_VERSION_006 "SteamGameServer006" +#define STEAMGAMESERVER_INTERFACE_VERSION_007 "SteamGameServer007" +#define STEAMGAMESERVER_INTERFACE_VERSION_008 "SteamGameServer008" +#define STEAMGAMESERVER_INTERFACE_VERSION_009 "SteamGameServer009" +#define STEAMGAMESERVER_INTERFACE_VERSION_010 "SteamGameServer010" +#define STEAMGAMESERVER_INTERFACE_VERSION_011 "SteamGameServer011" +#define STEAMGAMESERVER_INTERFACE_VERSION_012 "SteamGameServer012" + + +// Result codes to GSHandleClientDeny/Kick +enum EDenyReason +{ + k_EDenyInvalid = 0, + k_EDenyInvalidVersion = 1, + k_EDenyGeneric = 2, + k_EDenyNotLoggedOn = 3, + k_EDenyNoLicense = 4, + k_EDenyCheater = 5, + k_EDenyLoggedInElseWhere = 6, + k_EDenyUnknownText = 7, + k_EDenyIncompatibleAnticheat = 8, + k_EDenyMemoryCorruption = 9, + k_EDenyIncompatibleSoftware = 10, + k_EDenySteamConnectionLost = 11, + k_EDenySteamConnectionError = 12, + k_EDenySteamResponseTimedOut = 13, + k_EDenySteamValidationStalled = 14, + k_EDenySteamOwnerLeftGuestUser = 15, +}; + + +#pragma pack( push, 8 ) +// client has been approved to connect to this game server +struct GSClientApprove_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 1 }; + + CSteamID m_SteamID; // SteamID of approved player + CSteamID m_OwnerSteamID; // SteamID of original owner for game license +}; + + +// client has been denied to connection to this game server +struct GSClientDeny_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 2 }; + + CSteamID m_SteamID; + + EDenyReason m_eDenyReason; + char m_pchOptionalText[ 128 ]; +}; + + +// request the game server should kick the user +struct GSClientKick_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 3 }; + + CSteamID m_SteamID; + EDenyReason m_eDenyReason; +}; + +// client has been denied to connect to this game server because of a Steam2 auth failure +struct GSClientSteam2Deny_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 4 }; + + uint32 m_UserID; + ESteamError m_eSteamError; +}; + +// client has been accepted by Steam2 to connect to this game server +struct GSClientSteam2Accept_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 5 }; + + uint32 m_UserID; + uint64 m_SteamID; +}; + +// client achievement info +struct GSClientAchievementStatus_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 6 }; + + CSteamID m_SteamID; + + char m_pchAchievement[ 128 ]; + bool m_bUnlocked; +}; + +// GS gameplay stats info +struct GSGameplayStats_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 7 }; + + EResult m_eResult; // Result of the call + + int32 m_nRank; // Overall rank of the server (0-based) + uint32 m_unTotalConnects; // Total number of clients who have ever connected to the server + uint32 m_unTotalMinutesPlayed; // Total number of minutes ever played on the server +}; + + +// send as a reply to RequestUserGroupStatus() +struct GSClientGroupStatus_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 8 }; + + CSteamID m_SteamIDUser; + CSteamID m_SteamIDGroup; + + bool m_bMember; + bool m_bOfficer; +}; + +// Sent as a reply to GetServerReputation() +struct GSReputation_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 9 }; + + EResult m_eResult; // Result of the call; + uint32 m_unReputationScore; // The reputation score for the game server + bool m_bBanned; // True if the server is banned from the Steam + // master servers + + // The following members are only filled out if m_bBanned is true. They will all + // be set to zero otherwise. Master server bans are by IP so it is possible to be + // banned even when the score is good high if there is a bad server on another port. + // This information can be used to determine which server is bad. + + uint32 m_unBannedIP; // The IP of the banned server + uint16 m_usBannedPort; // The port of the banned server + uint64 m_ulBannedGameID; // The game ID the banned server is serving + uint32 m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970) +}; + +// Sent as a reply to AssociateWithClan() +struct AssociateWithClanResult_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 10 }; + + EResult m_eResult; // Result of the call; +}; + +// Sent as a reply to ComputeNewPlayerCompatibility() +struct ComputeNewPlayerCompatibilityResult_t +{ + enum { k_iCallback = k_iSteamGameServerCallbacks + 11 }; + + EResult m_eResult; // Result of the call; + int m_cPlayersThatDontLikeCandidate; + int m_cPlayersThatCandidateDoesntLike; + int m_cClanPlayersThatDontLikeCandidate; + CSteamID m_SteamIDCandidate; +}; + + + +// received when the game server requests to be displayed as secure (VAC protected) +// m_bSecure is true if the game server should display itself as secure to users, false otherwise +struct GSPolicyResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 15 }; + + uint8 m_bSecure; +}; +#pragma pack( pop ) + + + +#endif // GAMESERVERCOMMON_H diff --git a/src/public SDK/GameServerStatsCommon.h b/src/public SDK/GameServerStatsCommon.h new file mode 100644 index 0000000..8ca7c2f --- /dev/null +++ b/src/public SDK/GameServerStatsCommon.h @@ -0,0 +1,65 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef GAMESERVERSTATSCOMMON_H +#define GAMESERVERSTATSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define CLIENTGAMESERVERSTATS_INTERFACE_VERSION "CLIENTGAMESERVERSTATS_INTERFACE_VERSION001" + +#define STEAMGAMESERVERSTATS_INTERFACE_VERSION_001 "SteamGameServerStats001" + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: called when the latests stats and achievements have been received +// from the server +//----------------------------------------------------------------------------- +struct GSStatsReceived_t +{ + enum { k_iCallback = k_iSteamGameServerStatsCallbacks }; + + EResult m_eResult; // Success / error fetching the stats + CSteamID m_steamIDUser; // The user for whom the stats are retrieved for +}; + +//----------------------------------------------------------------------------- +// Purpose: result of a request to store the user stats for a game +//----------------------------------------------------------------------------- +struct GSStatsStored_t +{ + enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 }; + + EResult m_eResult; // success / error + CSteamID m_steamIDUser; // The user for whom the stats were stored +}; + +//----------------------------------------------------------------------------- +// Purpose: Callback indicating that a user's stats have been unloaded. +// Call RequestUserStats again to access stats for this user +//----------------------------------------------------------------------------- +struct GSStatsUnloaded_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 }; + + CSteamID m_steamIDUser; // User whose stats have been unloaded +}; + +#pragma pack( pop ) + + +#endif // GAMESERVERSTATSCOMMON_H diff --git a/src/public SDK/GameStatsCommon.h b/src/public SDK/GameStatsCommon.h new file mode 100644 index 0000000..1396383 --- /dev/null +++ b/src/public SDK/GameStatsCommon.h @@ -0,0 +1,72 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef GAMESTATSCOMMON_H +#define GAMESTATSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define STEAMGAMESTATS_INTERFACE_VERSION_001 "SteamGameStats001" + +#define CLIENTGAMESTATS_INTERFACE_VERSION "CLIENTGAMESTATS_INTERFACE_VERSION001" + + + +//----------------------------------------------------------------------------- +// Purpose: nAccountType for GetNewSession +//----------------------------------------------------------------------------- +enum EGameStatsAccountType +{ + k_EGameStatsAccountType_Steam = 1, // ullAccountID is a 64-bit SteamID for a player + k_EGameStatsAccountType_Xbox = 2, // ullAccountID is a 64-bit XUID + k_EGameStatsAccountType_SteamGameServer = 3, // ullAccountID is a 64-bit SteamID for a game server +}; + + + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: callback for GetNewSession() method +//----------------------------------------------------------------------------- +struct GameStatsSessionIssued_t +{ + enum { k_iCallback = k_iSteamGameStatsCallbacks + 1 }; + + uint64 m_ulSessionID; + EResult m_eResult; + bool m_bCollectingAny; + bool m_bCollectingDetails; +}; + + +//----------------------------------------------------------------------------- +// Purpose: callback for EndSession() method +//----------------------------------------------------------------------------- +struct GameStatsSessionClosed_t +{ + enum { k_iCallback = k_iSteamGameStatsCallbacks + 2 }; + + uint64 m_ulSessionID; + EResult m_eResult; +}; +#pragma pack( pop ) + + + +#endif // GAMESTATSCOMMON_H diff --git a/src/public SDK/HTMLSurfaceCommon.h b/src/public SDK/HTMLSurfaceCommon.h new file mode 100644 index 0000000..e1df7eb --- /dev/null +++ b/src/public SDK/HTMLSurfaceCommon.h @@ -0,0 +1,379 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef HTMLSURFACECOMMON_H +#define HTMLSURFACECOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define STEAMHTMLSURFACE_INTERFACE_VERSION_002 "STEAMHTMLSURFACE_INTERFACE_VERSION_002" +#define STEAMHTMLSURFACE_INTERFACE_VERSION_003 "STEAMHTMLSURFACE_INTERFACE_VERSION_003" +#define STEAMHTMLSURFACE_INTERFACE_VERSION_004 "STEAMHTMLSURFACE_INTERFACE_VERSION_004" +#define STEAMHTMLSURFACE_INTERFACE_VERSION_005 "STEAMHTMLSURFACE_INTERFACE_VERSION_005" + +typedef uint32 HHTMLBrowser; +const uint32 INVALID_HTMLBROWSER = 0; + + +enum EHTMLMouseButton +{ + eHTMLMouseButton_Left = 0, + eHTMLMouseButton_Right = 1, + eHTMLMouseButton_Middle = 2, +}; + +enum EMouseCursor +{ + dc_user = 0, + dc_none, + dc_arrow, + dc_ibeam, + dc_hourglass, + dc_waitarrow, + dc_crosshair, + dc_up, + dc_sizenw, + dc_sizese, + dc_sizene, + dc_sizesw, + dc_sizew, + dc_sizee, + dc_sizen, + dc_sizes, + dc_sizewe, + dc_sizens, + dc_sizeall, + dc_no, + dc_hand, + dc_blank, // don't show any custom cursor, just use your default + dc_middle_pan, + dc_north_pan, + dc_north_east_pan, + dc_east_pan, + dc_south_east_pan, + dc_south_pan, + dc_south_west_pan, + dc_west_pan, + dc_north_west_pan, + dc_alias, + dc_cell, + dc_colresize, + dc_copycur, + dc_verticaltext, + dc_rowresize, + dc_zoomin, + dc_zoomout, + dc_help, + dc_custom, + + dc_last, // custom cursors start from this value and up +}; + +enum EHTMLKeyModifiers +{ + k_eHTMLKeyModifier_None = 0, + k_eHTMLKeyModifier_AltDown = 1 << 0, + k_eHTMLKeyModifier_CrtlDown = 1 << 1, + k_eHTMLKeyModifier_ShiftDown = 1 << 2, +}; + + +// callbacks +#pragma pack( push, 8 ) + + +//----------------------------------------------------------------------------- +// Purpose: The browser is ready for use +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages +END_DEFINE_CALLBACK_1() + + +//----------------------------------------------------------------------------- +// Purpose: the browser has a pending paint +//----------------------------------------------------------------------------- +DEFINE_CALLBACK(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2) +CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint +CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called +CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture +CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture +CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update +CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update +CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update +CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update +CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered +CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered +CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered +CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages +END_DEFINE_CALLBACK_12() + + +//----------------------------------------------------------------------------- +// Purpose: The browser wanted to navigate to a new page +// NOTE - you MUST call AllowStartRequest in response to this callback +//----------------------------------------------------------------------------- +DEFINE_CALLBACK(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3) +CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating +CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to +CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top ) +CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request +CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request +END_DEFINE_CALLBACK_5() + + +//----------------------------------------------------------------------------- +// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) +//----------------------------------------------------------------------------- +DEFINE_CALLBACK(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4) +CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface +END_DEFINE_CALLBACK_1() + + +//----------------------------------------------------------------------------- +// Purpose: the browser is navigating to a new url +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating +CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to +CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request +CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request +CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page +CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page +END_DEFINE_CALLBACK_6() + + +//----------------------------------------------------------------------------- +// Purpose: A page is finished loading +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchURL ) // +CALLBACK_MEMBER( 2, const char *, pchPageTitle ) // +END_DEFINE_CALLBACK_3() + + +//----------------------------------------------------------------------------- +// Purpose: a request to load this url in a new tab +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchURL ) // +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: the page has a new title now +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchTitle ) // +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: results from a search +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, unResults ) // +CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) // +END_DEFINE_CALLBACK_3() + + +//----------------------------------------------------------------------------- +// Purpose: page history status changed on the ability to go backwards and forward +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, bool, bCanGoBack ) // +CALLBACK_MEMBER( 2, bool, bCanGoForward ) // +END_DEFINE_CALLBACK_3() + + +//----------------------------------------------------------------------------- +// Purpose: details on the visibility and size of the horizontal scrollbar +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, unScrollMax ) // +CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // +CALLBACK_MEMBER( 3, float, flPageScale ) // +CALLBACK_MEMBER( 4, bool , bVisible ) // +CALLBACK_MEMBER( 5, uint32, unPageSize ) // +END_DEFINE_CALLBACK_6() + + +//----------------------------------------------------------------------------- +// Purpose: details on the visibility and size of the vertical scrollbar +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, unScrollMax ) // +CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // +CALLBACK_MEMBER( 3, float, flPageScale ) // +CALLBACK_MEMBER( 4, bool, bVisible ) // +CALLBACK_MEMBER( 5, uint32, unPageSize ) // +END_DEFINE_CALLBACK_6() + + +//----------------------------------------------------------------------------- +// Purpose: response to GetLinkAtPosition call +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set +CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set +CALLBACK_MEMBER( 3, const char *, pchURL ) // +CALLBACK_MEMBER( 4, bool, bInput ) // +CALLBACK_MEMBER( 5, bool, bLiveLink ) // +END_DEFINE_CALLBACK_6() + + + +//----------------------------------------------------------------------------- +// Purpose: show a Javascript alert dialog, call JSDialogResponse +// when the user dismisses this dialog (or right away to ignore it) +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchMessage ) // +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: show a Javascript confirmation dialog, call JSDialogResponse +// when the user dismisses this dialog (or right away to ignore it) +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchMessage ) // +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: when received show a file open dialog +// then call FileLoadDialogResponse with the file(s) the user selected. +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchTitle ) // +CALLBACK_MEMBER( 2, const char *, pchInitialFile ) // +END_DEFINE_CALLBACK_3() + + +//----------------------------------------------------------------------------- +// Purpose: a popup item (i.e combo box) on the page needs rendering +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_ComboNeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 17 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called +CALLBACK_MEMBER( 2, uint32, unWide ) // the total width of the pBGRA texture +CALLBACK_MEMBER( 3, uint32, unTall ) // the total height of the pBGRA texture +END_DEFINE_CALLBACK_4() + + +//----------------------------------------------------------------------------- +// Purpose: a popup (i.e combo box) wants to display +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_ShowPopup_t, k_iSteamHTMLSurfaceCallbacks + 18 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +END_DEFINE_CALLBACK_1() + + +//----------------------------------------------------------------------------- +// Purpose: a popup (i.e combo box) wants to hide +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_HidePopup_t, k_iSteamHTMLSurfaceCallbacks + 19 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +END_DEFINE_CALLBACK_1() + + +//----------------------------------------------------------------------------- +// Purpose: a popup (i.e combo box) wants to hide +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_SizePopup_t, k_iSteamHTMLSurfaceCallbacks + 20 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, unX ) // the x pos into the page to display the popup +CALLBACK_MEMBER( 2, uint32, unY ) // the y pos into the page to display the popup +CALLBACK_MEMBER( 3, uint32, unWide ) // the total width of the pBGRA texture +CALLBACK_MEMBER( 4, uint32, unTall ) // the total height of the pBGRA texture +END_DEFINE_CALLBACK_5() + + +//----------------------------------------------------------------------------- +// Purpose: a new html window has been created +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface +CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load +CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup +CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup +CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture +CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture +CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle ) // the handle of the new window surface +END_DEFINE_CALLBACK_7() + + +//----------------------------------------------------------------------------- +// Purpose: change the cursor to display +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: informational message from the browser +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: show a tooltip +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: update the text of an existing tooltip +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +END_DEFINE_CALLBACK_2() + + +//----------------------------------------------------------------------------- +// Purpose: hide the tooltip you are showing +//----------------------------------------------------------------------------- +DEFINE_CALLBACK( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 ) +CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +END_DEFINE_CALLBACK_1() + + +#pragma pack( pop ) + +#endif // HTMLSURFACECOMMON_H diff --git a/src/public SDK/HTTPCommon.h b/src/public SDK/HTTPCommon.h new file mode 100644 index 0000000..f09f38a --- /dev/null +++ b/src/public SDK/HTTPCommon.h @@ -0,0 +1,169 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef HTTPCOMMON_H +#define HTTPCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define CLIENTHTTP_INTERFACE_VERSION "CLIENTHTTP_INTERFACE_VERSION001" +#define STEAMHTTP_INTERFACE_VERSION_001 "STEAMHTTP_INTERFACE_VERSION001" +#define STEAMHTTP_INTERFACE_VERSION_002 "STEAMHTTP_INTERFACE_VERSION002" +#define STEAMHTTP_INTERFACE_VERSION_003 "STEAMHTTP_INTERFACE_VERSION003" + +typedef uint32 HTTPRequestHandle; +#define INVALID_HTTPREQUEST_HANDLE 0 + +typedef uint32 HTTPCookieContainerHandle; +#define INVALID_HTTPCOOKIE_HANDLE 0 + +// This enum is used in client API methods, do not re-number existing values. +enum EHTTPMethod +{ + k_EHTTPMethodInvalid = 0, + k_EHTTPMethodGET, + k_EHTTPMethodHEAD, + k_EHTTPMethodPOST, + k_EHTTPMethodPUT, + k_EHTTPMethodDELETE, + + // The remaining HTTP methods are not yet supported, per rfc2616 section 5.1.1 only GET and HEAD are required for + // a compliant general purpose server. We'll likely add more as we find uses for them. + + // k_EHTTPMethodOPTIONS, + // k_EHTTPMethodTRACE, + // k_EHTTPMethodCONNECT +}; + + +// HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions +// of each of these. +typedef enum EHTTPStatusCode +{ + // Invalid status code (this isn't defined in HTTP, used to indicate unset in our code) + k_EHTTPStatusCodeInvalid = 0, + + // Informational codes + k_EHTTPStatusCode100Continue = 100, + k_EHTTPStatusCode101SwitchingProtocols = 101, + + // Success codes + k_EHTTPStatusCode200OK = 200, + k_EHTTPStatusCode201Created = 201, + k_EHTTPStatusCode202Accepted = 202, + k_EHTTPStatusCode203NonAuthoritative = 203, + k_EHTTPStatusCode204NoContent = 204, + k_EHTTPStatusCode205ResetContent = 205, + k_EHTTPStatusCode206PartialContent = 206, + + // Redirection codes + k_EHTTPStatusCode300MultipleChoices = 300, + k_EHTTPStatusCode301MovedPermanently = 301, + k_EHTTPStatusCode302Found = 302, + k_EHTTPStatusCode303SeeOther = 303, + k_EHTTPStatusCode304NotModified = 304, + k_EHTTPStatusCode305UseProxy = 305, + //k_EHTTPStatusCode306Unused = 306, (used in old HTTP spec, now unused in 1.1) + k_EHTTPStatusCode307TemporaryRedirect = 307, + + // Error codes + k_EHTTPStatusCode400BadRequest = 400, + k_EHTTPStatusCode401Unauthorized = 401, + k_EHTTPStatusCode402PaymentRequired = 402, // This is reserved for future HTTP specs, not really supported by clients + k_EHTTPStatusCode403Forbidden = 403, + k_EHTTPStatusCode404NotFound = 404, + k_EHTTPStatusCode405MethodNotAllowed = 405, + k_EHTTPStatusCode406NotAcceptable = 406, + k_EHTTPStatusCode407ProxyAuthRequired = 407, + k_EHTTPStatusCode408RequestTimeout = 408, + k_EHTTPStatusCode409Conflict = 409, + k_EHTTPStatusCode410Gone = 410, + k_EHTTPStatusCode411LengthRequired = 411, + k_EHTTPStatusCode412PreconditionFailed = 412, + k_EHTTPStatusCode413RequestEntityTooLarge = 413, + k_EHTTPStatusCode414RequestURITooLong = 414, + k_EHTTPStatusCode415UnsupportedMediaType = 415, + k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416, + k_EHTTPStatusCode417ExpectationFailed = 417, + k_EHTTPStatusCode429TooManyRequests = 429, + + // Server error codes + k_EHTTPStatusCode500InternalServerError = 500, + k_EHTTPStatusCode501NotImplemented = 501, + k_EHTTPStatusCode502BadGateway = 502, + k_EHTTPStatusCode503ServiceUnavailable = 503, + k_EHTTPStatusCode504GatewayTimeout = 504, + k_EHTTPStatusCode505HTTPVersionNotSupported = 505, +} EHTTPStatusCode; + + +struct HTTPRequestCompleted_t +{ + enum { k_iCallback = k_iClientHTTPCallbacks + 1 }; + + // Handle value for the request that has completed. + HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + uint64 m_ulContextValue; + + // This will be true if we actually got any sort of response from the server (even an error). + // It will be false if we failed due to an internal error or client side network failure. + bool m_bRequestSuccessful; + + // Will be the HTTP status code value returned by the server, k_EHTTPStatusCode200OK is the normal + // OK response, if you get something else you probably need to treat it as a failure. + EHTTPStatusCode m_eStatusCode; + + uint32 m_unBodySize; // Same as GetHTTPResponseBodySize() +}; + +struct HTTPRequestHeadersReceived_t +{ + enum { k_iCallback = k_iClientHTTPCallbacks + 2 }; + + // Handle value for the request that has received headers. + HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + uint64 m_ulContextValue; +}; + +struct HTTPRequestDataReceived_t +{ + enum { k_iCallback = k_iClientHTTPCallbacks + 3 }; + + // Handle value for the request that has received data. + HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + uint64 m_ulContextValue; + + + // Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + uint32 m_cOffset; + + // Size to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + uint32 m_cBytesReceived; +}; + + +#endif // HTTPCOMMON_H diff --git a/src/public SDK/IClientAppManager.h b/src/public SDK/IClientAppManager.h new file mode 100644 index 0000000..367484b --- /dev/null +++ b/src/public SDK/IClientAppManager.h @@ -0,0 +1,109 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTAPPMANAGER_H +#define ICLIENTAPPMANAGER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + + + +abstract_class UNSAFE_INTERFACE IClientAppManager +{ +public: + virtual EAppUpdateError InstallApp( AppId_t unAppID, const char *cszAppDir, int32 iBaseFolder, bool bLegacy ) = 0; + virtual EAppUpdateError ConvertFromSteam2( AppId_t unAppID, const char *cszPath ) = 0; + virtual EAppUpdateError UninstallApp( AppId_t unAppID, bool bComplete ) = 0; + + virtual EAppUpdateError LaunchApp( AppId_t unAppID, uint32 uLaunchOption, const char *pszUserArgs ) = 0; + virtual bool ShutdownApp( AppId_t unAppID, bool bForce ) = 0; + + virtual EAppState GetAppInstallState( AppId_t unAppID ) = 0; + virtual uint32 GetAppBuildID( AppId_t unAppID ) = 0; + + // /!\ IPC is broken for this function + virtual bool GetAppSizeOnDisk( AppId_t unAppID, uint64 *pullAppSize, uint64 *pullUnk ) = 0; + + virtual uint32 GetAppInstallDir( AppId_t unAppID, char *pchPath, uint32 cchPath ) = 0; + + virtual bool IsAppDlcInstalled( AppId_t unAppID, AppId_t unDLCAppID ) = 0; + virtual uint32 GetNumInstalledApps() = 0; + virtual uint32 GetInstalledApps( uint32 *punAppIDs, uint32 cAppIDsMax ) = 0; + + virtual uint32 GetAppDependency( AppId_t unAppID ) = 0; + virtual uint32 GetDependentApps( AppId_t unAppID, AppId_t *punAppIDs, int32 cAppIDsMax ) = 0; + + virtual uint32 GetUpdateInfo( AppId_t unAppID, AppUpdateInfo_s *pUpdateInfo ) = 0; + + virtual bool SetContentLocked( AppId_t unAppID, bool bLockContent ) = 0; + + virtual bool SetAppConfig( AppId_t unAppID, uint8 *pchBuffer, int32 cbBuffer, bool bSharedKVSymbols ) = 0; + virtual int32 GetAppConfigValue( AppId_t unAppID, const char *pchKey, char *pchValue, int32 cchValueMax ) = 0; + virtual bool SetAppConfigValue( AppId_t unAppID, const char *pchKey, const char *pchValue ) = 0; + + virtual bool BIsAppUpToDate( AppId_t unAppID ) = 0; + + virtual uint32 GetAvailableLaunchOptions( AppId_t unAppID, uint32 puOptions[], uint32 cuOptionsMax ) = 0; + virtual uint32 GetAvailableLanguages( AppId_t unAppID, bool, char *pchLanguages, uint32 cchLanguagesMax ) = 0; + + virtual bool StartValidatingApp( AppId_t unAppID ) = 0; + virtual bool MarkContentCorrupt( AppId_t unAppID, bool bCorrupt ) = 0; + + virtual uint32 GetInstalledDepots( AppId_t unAppID, AppId_t puDepots[], uint32 cuDepotsMax ) = 0; + + virtual bool BCacheBetaPassword( AppId_t unAppID, const char *cszBetaKey, const char *cszBetaPassword ) = 0; + virtual bool BRequestBetaPasswords( AppId_t unAppID ) = 0; + virtual bool BIsCachedBetaPasswordValid( AppId_t unAppID, const char *cszBetaKey ) = 0; + + virtual bool SetDownloadingEnabled( bool bState ) = 0; + virtual bool BIsDownloadingEnabled() = 0; + + virtual bool GetDownloadStats( DownloadStats_s *pDownloadStats ) = 0; + + virtual AppId_t GetDownloadingAppID() = 0; + virtual bool ChangeAppPriority( AppId_t unAppID, EAppDownloadPriority ePriority ) = 0; + + virtual bool BHasLocalContentServer() = 0; + + virtual bool BuildBackup( AppId_t unAppID, uint64 ullMaxFileSize, const char *cszBackupPath ) = 0; + virtual bool BuildInstaller( const char *cszProjectFile, const char *cszBackupPath, const char * ) = 0; + virtual bool CancelBackup() = 0; + virtual EAppUpdateError RestoreApp( AppId_t unAppID, int32 iBaseFolder, char const *cszBackupPath ) = 0; + virtual bool BNeedsFile( AppId_t unAppID, char const *cszFilePath, uint64 ullFileSize, uint32 uUnk ) = 0; + virtual bool BAddFileOnDisk( AppId_t unAppID, char const *cszFilePath, uint64 ullFileSize, uint32 uUnk, SHADigestWrapper_t ubSha1 ) = 0; + virtual uint32 FinishAddingFiles( AppId_t unAppID ) = 0; + + virtual bool GetAppStateInfo( AppId_t unAppID, EAppReleaseState * peReleaseState, EAppOwernshipFlags * peOwernshipFlags, EAppState * peAppState ) = 0; + + virtual int32 GetNumInstallBaseFolders() = 0; + virtual int32 GetInstallBaseFolder( int32 iBaseFolder, char *pchPath, int32 cbPath ) = 0; + virtual int32 AddInstallBaseFolder( const char *szPath ) = 0; + virtual bool RemoveInstallBaseFolder( int32 iBaseFolder ) = 0; + virtual uint64 GetFreeDiskSpace( int32 iBaseFolder ) = 0; + + virtual int32 GetAppInstallBaseFolder( int32 iBaseFolder ) = 0; + virtual void ForceInstallDirOverride( const char *cszPath ) = 0; + + virtual bool SetDownloadThrottleRateKbps( int32 iRate ) = 0; + virtual int32 GetDownloadThrottleRateKbps() = 0; + virtual void SuspendDownloadThrottling( bool bSuspend ) = 0; +}; + +#endif // ICLIENTAPPMANAGER_H diff --git a/src/public SDK/IClientApps.h b/src/public SDK/IClientApps.h new file mode 100644 index 0000000..ec79abe --- /dev/null +++ b/src/public SDK/IClientApps.h @@ -0,0 +1,53 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTAPPS_H +#define ICLIENTAPPS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientApps +{ +public: + // returns 0 if the key does not exist + // this may be true on first call, since the app data may not be cached locally yet + // If you expect it to exists wait for the AppDataChanged_t after the first failure and ask again + virtual int32 GetAppData( AppId_t unAppID, const char *pchKey, char *pchValue, int32 cchValueMax ) = 0; + + virtual AppId_t GetInternalAppIDFromGameID( CGameID nGameID ) = 0; + + virtual int32 GetAllOwnedMultiplayerApps( uint32 *punAppIDs, int32 cAppIDsMax ) = 0; + + virtual int32 GetAppDataSection( AppId_t unAppID, EAppInfoSection eSection, uint8 *pchBuffer, int32 cbBufferMax, bool bSharedKVSymbols ) = 0; + virtual bool RequestAppInfoUpdate( const AppId_t *pAppIDs, int32 nNumAppIDs ) = 0; + + virtual void NotifyAppEventTriggered( AppId_t unAppID, EAppEvent eAppEvent ) = 0; + virtual void NotifyDlcInstalled( AppId_t unAppID ) = 0; + + virtual int32 GetDLCCount( AppId_t unAppID ) = 0; + virtual bool BGetDLCDataByIndex( AppId_t unAppID, int32 iDLC, AppId_t* pDlcAppID, bool *pbAvailable, char *pchName, int32 cchNameBufferSize ) = 0; + + virtual bool BReloadLocalAppInfoOverrides() = 0; + + virtual bool BIsDlcInstalled( AppId_t unDlcAppID, AppId_t unGameAppID ) = 0; +}; + +#endif // ICLIENTAPPS_H diff --git a/src/public SDK/IClientAudio.h b/src/public SDK/IClientAudio.h new file mode 100644 index 0000000..36ce4af --- /dev/null +++ b/src/public SDK/IClientAudio.h @@ -0,0 +1,105 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTAUDIO_H +#define ICLIENTAUDIO_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +//#include "AudioCommon.h" + + +typedef uint32 HAudio; +typedef uint32 HFileSource; + +#define CLIENTAUDIO_INTERFACE_VERSION "CLIENTAUDIO_INTERFACE_VERSION001" + + +abstract_class UNSAFE_INTERFACE IClientAudio +{ +public: + + enum EPlayMode + { + }; + + virtual void StartVoiceRecording() = 0; + virtual void StopVoiceRecording() = 0; + virtual void ResetVoiceRecording() = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + // nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case) + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) = 0; + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate ) = 0; + // Gets the latest voice data. It should be called as often as possible once recording has started. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + virtual EVoiceResult GetCompressedVoice( void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at the requested samples per second. + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + + virtual bool PlayAudio( HAudio hAudio ) = 0; + virtual void StopAudio() = 0; + virtual void PauseAudio() = 0; + virtual void UnPauseAudio() = 0; + + virtual void SetPlayOrder( IClientAudio::EPlayMode ePlayMode ) = 0; + virtual void ShufflePlayList() = 0; + virtual IClientAudio::EPlayMode GetPlayMode() = 0; + + virtual HAudio GetAudioHandle( const char *cszFilePath ) = 0; + virtual bool GetAudioDetails( HAudio hAudio, char *, int32, char *, int32, char *, int32 ) = 0; + virtual bool GetAudioArtSize( HAudio hAudio, uint32 *punWidth, uint32 *punHeight ) = 0; + virtual bool GetAudioArtImage( HAudio hAudio, uint8 *pubBuffer, int32 cubBuffer ) = 0; + + virtual uint32 GetPlayListCount() = 0; + virtual bool AddSongToPlaylist( HAudio hAudio ) = 0; + virtual bool RemoveSongFromPlaylist( HAudio hAudio ) = 0; + + virtual bool SaveCurrentPlaylistToFile( const char *cszFilePath ) = 0; + virtual bool LoadPlaylistFromFile( const char *cszFilePath ) = 0; + + virtual uint32 GetFileSourceCount() = 0; + + virtual HFileSource AddLocalFileSource( const char *cszFileSource ) = 0; + virtual HFileSource AddSMBFileSource( const char *cszFileSource ) = 0; + virtual HFileSource AddITunesFileSource( const char *cszFileSource ) = 0; + virtual bool RemoveFileSource( HFileSource hFileSource ) = 0; + +}; + +#endif // ICLIENTAUDIO_H diff --git a/src/public SDK/IClientBilling.h b/src/public SDK/IClientBilling.h new file mode 100644 index 0000000..1979de4 --- /dev/null +++ b/src/public SDK/IClientBilling.h @@ -0,0 +1,94 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTBILLING_H +#define ICLIENTBILLING_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "BillingCommon.h" + + +enum EPackageStatus +{ +}; + + +abstract_class UNSAFE_INTERFACE IClientBilling +{ +public: + virtual bool PurchaseWithActivationCode( const char *pchActivationCode ) = 0; + + virtual bool CancelLicense( PackageId_t packageID, int32 nCancelReason ) = 0; + + virtual PackageId_t GetLicensePackageID( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeCreated( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeNextProcess( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinuteLimit( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinutesUsed( uint32 nLicenseIndex ) = 0; + virtual EPaymentMethod GetLicensePaymentMethod( uint32 nLicenseIndex ) = 0; + virtual ELicenseFlags GetLicenseFlags( uint32 nLicenseIndex ) = 0; + virtual const char *GetLicensePurchaseCountryCode( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseTerritoryCode( uint32 nLicenseIndex ) = 0; + virtual bool GetLicenseInfo( uint32 nLicenseIndex, RTime32* pRTime32Created, RTime32* pRTime32NextProcess, int32* pnMinuteLimit, int32 * pnMinutesUsed, EPaymentMethod* pePaymentMethod, uint32* punFlags, int32 * pnTerritoryCode, char * prgchPurchaseCountryCode /* Use a 3 bytes buffer */) = 0; + + virtual PackageId_t GetReceiptPackageID( uint32 nReceiptIndex ) = 0; + virtual EPurchaseStatus GetReceiptStatus( uint32 nReceiptIndex ) = 0; + virtual EPurchaseResultDetail GetReceiptResultDetail( uint32 nReceiptIndex ) = 0; + virtual RTime32 GetReceiptTransTime( uint32 nReceiptIndex ) = 0; + virtual uint64 GetReceiptTransID( uint32 nReceiptIndex ) = 0; + virtual EPaymentMethod GetReceiptPaymentMethod( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptBaseCost( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptTotalDiscount( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptTax( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptShipping( uint32 nReceiptIndex ) = 0; + virtual ECurrencyCode GetReceiptCurrencyCode( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptCountryCode( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptErrorHeadline( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptErrorString( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptErrorLinkText( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptErrorLinkURL( uint32 nReceiptIndex ) = 0; + + virtual AppId_t GetReceiptErrorAppID( uint32 nReceiptIndex ) = 0; + + virtual uint32 GetNumLicenses() = 0; + virtual uint32 GetNumReceipts() = 0; + + virtual bool PurchaseWithMachineID( PackageId_t nPackageID, const char *pchCustomData ) = 0; + + virtual bool GetReceiptCardInfo( uint32 nReceiptIndex, ECreditCardType* eCreditCardType, char* pchCardLast4Digits, char* pchCardHolderFirstName, char* pchCardHolderLastName, char* pchCardExpYear, char* pchCardExpMonth ) = 0; + + virtual bool GetReceiptBillingAddress( uint32 nReceiptIndex, char* pchFirstName, char* pchLastName, char* pchAddress1, char* pchAddress2, char* pchCity, char* pchPostcode, char* pchState, char* pchCountry, char* pchPhone ) = 0; + + virtual uint32 GetReceiptLineItemCount( uint32 nReceiptIndex ) = 0; + virtual bool GetReceiptLineItemInfo( uint32 nReceiptIndex, uint32 nLineItemIndex, PackageId_t *nPackageID, uint32 *nBaseCost, uint32 *nDiscount, uint32 *nTax, uint32 *nShipping, ECurrencyCode *eCurrencyCode, AppId_t *punAppId, char *pchDescription, char *pchCouponInfoURL ) = 0; + + virtual void EnableTestLicense( PackageId_t unPackageID ) = 0; + virtual void DisableTestLicense( PackageId_t unPackageID ) = 0; + + virtual bool ActivateOEMTicket( const char *pchOEMLicenseFile ) = 0; + + virtual uint32 GetPackageName( PackageId_t unPackageID, char *pchName, int32 cubName ) = 0; + virtual bool GetPackageInfo( PackageId_t unPackageID, uint32 * puNumAppIds, uint32 * puNumDepotIDs, EBillingType * peBillingType, ELicenseType * peLicenseType, EPackageStatus * pePackageStatus, int32 * piCodeClass, int32 * piGameCode, int32 * piTerritoryCode, bool *pbRequiresShipping, bool *pbIsPreorder ) = 0; + virtual uint32 GetAppsInPackage( PackageId_t unPackageID, AppId_t puIds[], uint32 uMaxIds, bool bExcludeDepots, bool bExcludeApps ) = 0; + virtual uint32 GetPackageExtendedInfo( PackageId_t unPackageID, uint8 *pubData, int32 cubData, bool bSharedKVSymbols ) = 0; + + virtual SteamAPICall_t RequestFreeLicenseForApp( AppId_t unAppId ) = 0; +}; + +#endif // ICLIENTBILLING_H diff --git a/src/public SDK/IClientConfigStore.h b/src/public SDK/IClientConfigStore.h new file mode 100644 index 0000000..85d0734 --- /dev/null +++ b/src/public SDK/IClientConfigStore.h @@ -0,0 +1,57 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTCONFIGSTORE_H +#define ICLIENTCONFIGSTORE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + + +#define CLIENTCONFIGSTORE_INTERFACE_VERSION "CLIENTCONFIGSTORE_INTERFACE_VERSION001" + + +abstract_class UNSAFE_INTERFACE IClientConfigStore +{ +public: + virtual bool IsSet( EConfigStore eConfigStore, const char *pszKeyNameIn ) = 0; + + virtual bool GetBool( EConfigStore eConfigStore, const char *pszKeyNameIn, bool defaultValue ) = 0; + virtual int32 GetInt( EConfigStore eConfigStore, const char *pszKeyName, int32 defaultValue ) = 0; + virtual uint64 GetUint64( EConfigStore eConfigStore, const char *pszKeyName, uint64 defaultValue ) = 0; + virtual float GetFloat( EConfigStore eConfigStore, const char *pszKeyName, float defaultValue ) = 0; + virtual const char* GetString( EConfigStore eConfigStore, const char *pszKeyName, const char *defaultValue ) = 0; + virtual uint32 GetBinary( EConfigStore eConfigStore, const char *pszKeyName, uint8 *pubBuf, uint32 cubBuf ) = 0; + virtual uint32 GetBinaryWatermarked( EConfigStore eConfigStore, const char *pszKeyName, uint8 *pubBuf, uint32 cubBuf ) = 0; + + virtual bool SetBool( EConfigStore eConfigStore, const char *pszKeyNameIn, bool value ) = 0; + virtual bool SetInt( EConfigStore eConfigStore, const char *pszKeyNameIn, int32 nValue ) = 0; + virtual bool SetUint64( EConfigStore eConfigStore, const char *pszKeyNameIn, uint64 unValue ) = 0; + virtual bool SetFloat( EConfigStore eConfigStore, const char *pszKeyNameIn, float flValue ) = 0; + virtual bool SetString( EConfigStore eConfigStore, const char *pszKeyNameIn, const char *pszValue ) = 0; + virtual bool SetBinary( EConfigStore eConfigStore, const char *pszKeyName, const uint8 *pubData, uint32 cubData ) = 0; + virtual bool SetBinaryWatermarked( EConfigStore eConfigStore, const char *pszKeyName, const uint8 *pubData, uint32 cubData ) = 0; + + virtual bool RemoveKey( EConfigStore eConfigStore, const char *pszKeyName ) = 0; + virtual int32 GetKeySerialized( EConfigStore eConfigStore, const char *pszKeyNameIn, uint8 *pchBuffer, int32 cbBufferMax ) = 0; + + virtual bool FlushToDisk( bool bIsShuttingDown ) = 0; +}; + +#endif // ICLIENTCONFIGSTORE_H diff --git a/src/public SDK/IClientContentServer.h b/src/public SDK/IClientContentServer.h new file mode 100644 index 0000000..94f7673 --- /dev/null +++ b/src/public SDK/IClientContentServer.h @@ -0,0 +1,50 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTCONTENTSERVER_H +#define ICLIENTCONTENTSERVER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ContentServerCommon.h" +#include "UserCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientContentServer +{ + virtual HSteamUser GetHSteamUser() = 0; + + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + virtual void LogOn( uint32 uContentServerID ) = 0; + virtual void LogOff() = 0; + + virtual bool BLoggedOn() = 0; + virtual ELogonState GetLogonState() = 0; + virtual bool BConnected() = 0; + + virtual int RaiseConnectionPriority( EConnectionPriority eConnectionPriority ) = 0; + virtual void ResetConnectionPriority( int hRaiseConnectionPriorityPrev ) = 0; + + virtual void SetCellID( CellID_t cellID ) = 0; + + virtual bool SendClientContentAuthRequest( CSteamID steamID, uint32 unContentID, bool bUseToken, uint64 ulSessionToken, bool bTokenPresent ) = 0; + virtual bool BCheckTicket( CSteamID steamID, uint32 uContentID, const void *pvTicketData, uint32 cubTicketLength ) = 0; +}; + +#endif // ICLIENTCONTENTSERVER_H diff --git a/src/public SDK/IClientDepotBuilder.h b/src/public SDK/IClientDepotBuilder.h new file mode 100644 index 0000000..14c372c --- /dev/null +++ b/src/public SDK/IClientDepotBuilder.h @@ -0,0 +1,82 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTDEPOTBUILDER_H +#define ICLIENTDEPOTBUILDER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + + + +#define CLIENTDEPOTBUILDER_INTERFACE_VERSION "CLIENTDEPOTBUILDER_INTERFACE_VERSION001" + + + +typedef enum EDepotBuildStatus +{ + k_EDepotBuildStatusInvalid = 0, + k_EDepotBuildStatusProcessingConfig = 1, + k_EDepotBuildStatusBuildingFileList = 2, + k_EDepotBuildStatusProcessingData = 3, + k_EDepotBuildStatusUploadingData = 4, + k_EDepotBuildStatusCompleted = 5, + k_EDepotBuildStatusFailed = 6, +} EDepotBuildStatus; + +//----------------------------------------------------------------------------- +// Purpose: Status of a given depot version, these are stored in the DB, don't renumber +//----------------------------------------------------------------------------- +enum EStatusDepotVersion +{ + k_EStatusDepotVersionInvalid = 0, + k_EStatusDepotVersionDisabled = 1, // version was disabled, no manifest & content available + k_EStatusDepotVersionAvailable = 2, // manifest & content is available, but not current + k_EStatusDepotVersionCurrent = 3, // current depot version. The can be multiple, one for public and one for each beta key +}; + + +typedef uint32 HDEPOTBUILD; + + +abstract_class IClientDepotBuilder +{ +public: + virtual uint32 RegisterAppBuild( AppId_t nAppID, bool bLocalCSBuild, const char *cszDescription ) = 0; + virtual uint32 GetRegisteredBuildID( uint32 ) = 0; + + virtual HDEPOTBUILD InitializeDepotBuildForConfigFile( const char *pchConfigFile, const char *, const char * ) = 0; + + virtual bool StartBuild( HDEPOTBUILD hDepotBuild, uint32 uFlags, const char *cszChunksPath, const char*, uint32 ) = 0; + + virtual bool BGetDepotBuildStatus( HDEPOTBUILD hDepotBuild, EDepotBuildStatus* pStatusOut, uint32* pPercentDone ) = 0; + virtual bool CloseDepotBuildHandle( HDEPOTBUILD hDepotBuild ) = 0; + + virtual HDEPOTBUILD ReconstructDepotFromManifestAndChunks( const char *pchLocalManifestPath, const char *pchLocalChunkPath, const char *pchRestorePath, uint32 ) = 0; + + virtual bool BGetChunkCounts( HDEPOTBUILD hDepotBuild, uint32 *unTotalChunksInNewBuild, uint32 *unChunksAlsoInOldBuild ) = 0; + + virtual bool GetManifestGIDs( HDEPOTBUILD hDepotBuild, GID_t* pBaselineGID, GID_t* pNewGID, bool* ) = 0; + + virtual uint32 FinishAppBuild( uint32 uBuildID, uint32 nAppID, const char *cszBetaKey, bool bOnlyFinish, uint32 cNumSkipDepots ) = 0; + + virtual uint32 VerifyChunkStore( uint32, uint32, const char * ) = 0; + virtual uint32 StartUploadTest( uint32, uint32 ) = 0; +}; + +#endif // ICLIENTDEPOTBUILDER_H diff --git a/src/public SDK/IClientDeviceAuth.h b/src/public SDK/IClientDeviceAuth.h new file mode 100644 index 0000000..ef2aec4 --- /dev/null +++ b/src/public SDK/IClientDeviceAuth.h @@ -0,0 +1,36 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTDEVICEAUTH_H +#define ICLIENTDEVICEAUTH_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#define CLIENTDEVICEAUTH_INTERFACE_VERSION "CLIENTDEVICEAUTH_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientDeviceAuth +{ +public: + virtual uint64 AuthorizeLocalDevice( const char * pubUnk, uint32 cubUnk ) = 0; + virtual uint64 DeauthorizeLocalDevice( uint32 uUnk) = 0; + virtual uint32 GetDeviceAuthorizations( uint32 * puUnk, uint32 uUnk ) = 0; + virtual bool GetDeviceAuthorizationInfo( uint32 uUnk, uint32 * puUnk, bool * pbUnk, char * pubUnk, int32 cubUnk ) = 0; +}; + +#endif // ICLIENTDEVICEAUTH_H diff --git a/src/public SDK/IClientEngine.h b/src/public SDK/IClientEngine.h new file mode 100644 index 0000000..8231f86 --- /dev/null +++ b/src/public SDK/IClientEngine.h @@ -0,0 +1,132 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTENGINE_H +#define ICLIENTENGINE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +class IClientApps; +class IClientBilling; +class IClientContentServer; +class IClientFriends; +class IClientGameCoordinator; +class IClientGameServer; +class IClientGameServerItems; +class IClientGameStats; +class IClientMasterServerUpdater; +class IClientMatchmaking; +class IClientMatchmakingServers; +class IClientNetworking; +class IClientRemoteStorage; +class IClientUser; +class IClientUserItems; +class IClientUserStats; +class IClientUtils; +class IP2PController; +class IClientAppManager; +class IClientDepotBuilder; +class IConCommandBaseAccessor; +class IClientGameCoordinator; +class IClientHTTP; +class IClientGameServerStats; +class IClientConfigStore; +class IClientScreenshots; +class IClientAudio; +class IClientUnifiedMessages; +class IClientStreamLauncher; +class IClientNetworkDeviceManager; +class IClientController; +class IClientParentalSettings; +class IClientDeviceAuth; + +abstract_class UNSAFE_INTERFACE IClientEngine +{ + +public: + virtual HSteamPipe CreateSteamPipe() = 0; + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + virtual HSteamUser CreateGlobalUser( HSteamPipe* phSteamPipe ) = 0; + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + virtual HSteamUser CreateLocalUser( HSteamPipe* phSteamPipe, EAccountType eAccountType ) = 0; + virtual void CreatePipeToLocalUser( HSteamUser hSteamUser, HSteamPipe* phSteamPipe ) = 0; + + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + virtual bool IsValidHSteamUserPipe( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + virtual IClientUser *GetIClientUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientGameServer *GetIClientGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + virtual char const *GetUniverseName( EUniverse eUniverse ) = 0; + + virtual IClientFriends *GetIClientFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientUtils *GetIClientUtils( HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientBilling *GetIClientBilling( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientMatchmaking *GetIClientMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientApps *GetIClientApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientContentServer *GetIClientContentServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientMatchmakingServers *GetIClientMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + + virtual void RunFrame() = 0; + virtual uint32 GetIPCCallCount() = 0; + + virtual IClientUserStats *GetIClientUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientGameServerStats *GetIClientGameServerStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientNetworking *GetIClientNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientRemoteStorage *GetIClientRemoteStorage( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientScreenshots *GetIClientScreenshots( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + virtual IClientGameCoordinator *GetIClientGameCoordinator( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + virtual bool HookScreenshots( bool bHook ) = 0; + virtual bool IsOverlayEnabled() = 0; + + virtual bool GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed ) = 0; + + virtual IClientDepotBuilder *GetIClientDepotBuilder( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientNetworkDeviceManager *GetIClientNetworkDeviceManager( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + + virtual void ConCommandInit( IConCommandBaseAccessor *pAccessor ) = 0; + + virtual IClientAppManager *GetIClientAppManager( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientConfigStore *GetIClientConfigStore( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + + virtual bool BOverlayNeedsPresent() = 0; + + virtual IClientGameStats *GetIClientGameStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientHTTP *GetIClientHTTP( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + + virtual bool BShutdownIfAllPipesClosed() = 0; + + virtual IClientAudio *GetIClientAudio( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientUnifiedMessages *GetIClientUnifiedMessages( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientController *GetIClientController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientParentalSettings *GetIClientParentalSettings( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientStreamLauncher *GetIClientStreamLauncher( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; + virtual IClientDeviceAuth *GetIClientDeviceAuth( HSteamUser hSteamUser, HSteamPipe hSteamPipe, char const* pchVersion ) = 0; +}; + +#endif // ICLIENTENGINE_H diff --git a/src/public SDK/IClientFriends.h b/src/public SDK/IClientFriends.h new file mode 100644 index 0000000..0502d3c --- /dev/null +++ b/src/public SDK/IClientFriends.h @@ -0,0 +1,386 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTFRIENDS_H +#define ICLIENTFRIENDS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientFriends +{ +public: + + // returns the local players name - guaranteed to not be NULL. + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + virtual SteamAPICall_t SetPersonaNameEx( const char *pchPersonaName, bool bSendCallback ) = 0; + + virtual bool IsPersonaNameSet() = 0; + + // gets the friend status of the current user + virtual EPersonaState GetPersonaState() = 0; + // sets the status, communicates to server, tells all friends + virtual void SetPersonaState( EPersonaState ePersonaState ) = 0; + + virtual bool NotifyUIOfMenuChange( bool bShowAvatars, bool bSortByName, bool bShowOnlineOnly, bool bShowUntaggedFriends ) = 0; + + // friend iteration + virtual int32 GetFriendCount( EFriendFlags iFriendFlags ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendByIndex, int32, iFriend, EFriendFlags, iFriendFlags) /*virtual CSteamID GetFriendByIndex( int32 iFriend, EFriendFlags iFriendFlags ) = 0;*/ + + virtual int32 GetOnlineFriendCount() = 0; + + // gets the relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + // returns the name of a friend - guaranteed to not be NULL. + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int32 GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + virtual int32 GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + virtual int32 GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // steam registry, accessed by friend + virtual void SetFriendRegValue( CSteamID steamIDFriend, const char *pchKey, const char *pchValue ) = 0; + virtual const char *GetFriendRegValue( CSteamID steamIDFriend, const char *pchKey ) = 0; + + virtual bool DeleteFriendRegValue( CSteamID steamID, const char *pchKey ) = 0; + + virtual bool GetFriendGamePlayed( CSteamID steamID, FriendGameInfo_t *pGamePlayInfo ) = 0; + virtual const char *GetFriendGamePlayedExtraInfo( CSteamID steamIDFriend ) = 0; + + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetFriendGameServer, CSteamID, steamIDFriend) /*virtual CSteamID GetFriendGameServer( CSteamID steamIDFriend ) = 0;*/ + + virtual EPersonaStateFlag GetFriendPersonaStateFlags( CSteamID steamIDFriend ) = 0; + virtual bool IsFriendGameOnConsole( CSteamID steamIDFriend ) = 0; + STEAMWORKS_STRUCT_RETURN_1(FriendSessionStateInfo_t, GetFriendSessionStateInfo, CSteamID, steamIDFriend) /*virtual FriendSessionStateInfo_t GetFriendSessionStateInfo( CSteamID steamIDFriend ) = 0;*/ + virtual EUserRestriction GetFriendRestrictions( CSteamID steamIDFriend ) = 0; + + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int32 iPersonaName ) = 0; + + virtual SteamAPICall_t RequestPersonaNameHistory( CSteamID steamIDFriend ) = 0; + virtual const char * GetFriendPersonaNameHistoryAndDate( CSteamID steamIDFriend, int32 iPersonaName, RTime32 * puTime ) = 0; + + virtual bool AddFriend( CSteamID steamID ) = 0; + virtual bool RemoveFriend( CSteamID steamID ) = 0; + virtual bool HasFriend( CSteamID steamID, EFriendFlags iFriendFlags ) = 0; + + // adds a friend by email address or account name - value returned in callback + virtual HSteamCall AddFriendByName( const char *pchEmailOrAccountName ) = 0; + + virtual bool InviteFriendByEmail( const char *pchEmailAddress ) = 0; + + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + virtual bool SetIgnoreFriend( CSteamID steamIDFriend, bool bIgnore ) = 0; + + virtual bool ReportChatDeclined( CSteamID steamID ) = 0; + + + virtual bool CreateFriendsGroup( const char* pchGroupName ) = 0; + virtual bool DeleteFriendsGroup( int16 iGroupID ) = 0; + virtual bool RenameFriendsGroup( const char* pchNewGroupName, int16 iGroupID ) = 0; + virtual bool AddFriendToGroup( CSteamID steamID, int16 iGroupID ) = 0; + virtual bool RemoveFriendFromGroup( CSteamID steamID, int16 iGroupID ) = 0; + virtual bool IsFriendMemberOfFriendsGroup( CSteamID steamID, int16 iGroupID ) = 0; + virtual int16 GetFriendsGroupCount() = 0; + virtual int16 GetFriendsGroupIDByIndex( int16 iGroupIndex ) = 0; + virtual const char * GetFriendsGroupName( int16 iGroupID ) = 0; + virtual int16 GetFriendsGroupMembershipCount( int16 iGroupID ) = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetFirstFriendsGroupMember, int16, iGroupID) /*virtual CSteamID GetFirstFriendsGroupMember( int16 iGroupID ) = 0;*/ + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetNextFriendsGroupMember, int16, iGroupID) /*virtual CSteamID GetNextFriendsGroupMember( int16 iGroupID ) = 0;*/ + virtual int16 GetGroupFriendsMembershipCount( CSteamID steamID ) = 0; + virtual int16 GetFirstGroupFriendsMember( CSteamID steamID ) = 0; + virtual int16 GetNextGroupFriendsMember( CSteamID steamID ) = 0; + + virtual const char * GetPlayerNickname( CSteamID playerSteamID ) = 0; + virtual bool SetPlayerNickname( CSteamID playerSteamID, const char *cszNickname ) = 0; + + virtual uint32 GetFriendsSteamLevel( CSteamID steamIDFriend ) = 0; + + virtual int32 GetChatMessagesCount( CSteamID steamIDFriend ) = 0; + // chat message iteration + // returns the number of bytes in the message, filling pvData with as many of those bytes as possible + // returns 0 if the steamID or iChatID are invalid + virtual int32 GetChatMessage( CSteamID steamIDFriend, int32 iChatID, void *pvData, int32 cubData, EChatEntryType *peChatEntryType, CSteamID* pSteamIDChatter, RTime32 *puTime ) = 0; + + // generic friend->friend message sending, takes a sized buffer + virtual bool SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eChatEntryType, const void *pvMsgBody, int32 cubMsgBody ) = 0; + + // clears the chat history - should be called when a chat dialog closes + virtual void ClearChatHistory( CSteamID steamIDFriend ) = 0; + + virtual int32 GetKnownClanCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetKnownClanByIndex, int32, iClan) /*virtual CSteamID GetKnownClanByIndex( int32 iClan ) = 0;*/ + virtual int32 GetClanCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanByIndex, int32, iClan) /*virtual CSteamID GetClanByIndex( int32 iClan ) = 0;*/ + + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + virtual bool GetFriendActivityCounts( int32 *pnOnline, int32 *pnInGame, bool bExcludeTaggedFriends ) = 0; + virtual bool GetClanActivityCounts( CSteamID steamID, int32 *pnOnline, int32 *pnInGame, int32 *pnChatting ) = 0; + + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID groupIDs[], int32 nIds ) = 0; + virtual bool GetFriendsGroupActivityCounts( int16 iGroupID, int32 *pnOnline, int32 *pnInGame ) = 0; + + virtual bool IsClanPublic( CSteamID steamID ) = 0; + virtual bool IsClanLarge( CSteamID steamID ) = 0; + + virtual void SubscribeToPersonaStateFeed( CSteamID steamID, bool bSubscribed ) = 0; + + virtual SteamAPICall_t JoinClanChatRoom( CSteamID groupID ) = 0; + virtual bool LeaveClanChatRoom( CSteamID groupID ) = 0; + virtual int32 GetClanChatMemberCount( CSteamID groupID ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetChatMemberByIndex, CSteamID, groupID, int32, iIndex) /*virtual CSteamID GetChatMemberByIndex( CSteamID groupID, int32 iIndex ) = 0;*/ + virtual bool SendClanChatMessage( CSteamID groupID, const char *cszMessage ) = 0; + virtual int32 GetClanChatMessage( CSteamID groupID, int32 iChatID, void *pvData, int32 cubData, EChatEntryType *peChatEntryType, CSteamID *pSteamIDChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID groupID, CSteamID userID ) = 0; + virtual bool IsClanChatWindowOpenInSteam( CSteamID groupID ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID groupID ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID groupID ) = 0; + virtual bool SetListenForFriendsMessages( bool bListen ) = 0; + virtual bool ReplyToFriendMessage( CSteamID friendID, const char *cszMessage ) = 0; + virtual int32 GetFriendMessage( CSteamID friendID, int32 iChatID, void *pvData, int32 cubData, EChatEntryType *peChatEntryType ) = 0; + + virtual bool InviteFriendToClan( CSteamID steamIDfriend, CSteamID steamIDclan ) = 0; + virtual bool AcknowledgeInviteToClan( CSteamID steamID, bool bAcceptOrDenyClanInvite ) = 0; + + // iterators for any source + virtual int32 GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendFromSourceByIndex, CSteamID, steamIDSource, int32, iFriend) /*virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int32 iFriend ) = 0;*/ + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + virtual int32 GetCoplayFriendCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetCoplayFriend, int32, iCoplayEvent) /*virtual CSteamID GetCoplayFriend( int32 iCoplayEvent ) = 0;*/ + + virtual RTime32 GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + virtual bool SetRichPresence( AppId_t nAppId, const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence( AppId_t nAppId ) = 0; + virtual const char* GetFriendRichPresence( AppId_t nAppId, CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int32 GetFriendRichPresenceKeyCount( AppId_t nAppId, CSteamID steamIDFriend ) = 0; + virtual const char* GetFriendRichPresenceKeyByIndex( AppId_t nAppId, CSteamID steamIDFriend, int32 iIndex ) = 0; + + virtual void RequestFriendRichPresence( AppId_t nAppId, CSteamID steamIDFriend ) = 0; + + virtual bool JoinChatRoom( CSteamID steamIDChat ) = 0; + virtual void LeaveChatRoom( CSteamID steamIDChat ) = 0; + + virtual bool InviteUserToChatRoom( CSteamID steamIDChat, CSteamID steamIDInvitee ) = 0; + + virtual bool SendChatMsg( CSteamID steamIDChat, EChatEntryType eChatEntryType, const void *pvMsgBody, int32 cubMsgBody ) = 0; + + virtual int32 GetChatRoomMessagesCount( CSteamID steamIDChat ) = 0; + + virtual int32 GetChatRoomEntry( CSteamID steamIDChat, int32 iChatID, CSteamID *steamIDuser, void *pvData, int32 cubData, EChatEntryType *peChatEntryType ) = 0; + + virtual void ClearChatRoomHistory( CSteamID steamID ) = 0; + + virtual bool SerializeChatRoomDlg( CSteamID steamIDChat, void const* pvHistory, int32 cubHistory ) = 0; + virtual int32 GetSizeOfSerializedChatRoomDlg( CSteamID steamIDChat ) = 0; + virtual bool GetSerializedChatRoomDlg( CSteamID steamIDChat, void* pvHistory, int32 cubBuffer, int32* pcubData ) = 0; + virtual bool ClearSerializedChatRoomDlg( CSteamID steamIDChat ) = 0; + + virtual bool KickChatMember( CSteamID steamIDChat, CSteamID steamIDUserToActOn ) = 0; + virtual bool BanChatMember( CSteamID steamIDChat, CSteamID steamIDUserToActOn ) = 0; + virtual bool UnBanChatMember( CSteamID steamIDChat, CSteamID steamIDUserToActOn ) = 0; + + virtual bool SetChatRoomType( CSteamID steamIDChat, ELobbyType eLobbyType ) = 0; + virtual bool GetChatRoomLockState( CSteamID steamIDChat, bool *pbLocked ) = 0; + virtual bool GetChatRoomPermissions( CSteamID steamIDChat, uint32 *prgfChatRoomPermissions ) = 0; + + virtual bool SetChatRoomModerated( CSteamID steamIDChat, bool bModerated ) = 0; + virtual bool BChatRoomModerated( CSteamID steamIDChat ) = 0; + + virtual bool NotifyChatRoomDlgsOfUIChange( CSteamID steamIDChat, bool bShowAvatars, bool bBeepOnNewMsg, bool bShowSteamIDs, bool bShowTimestampOnNewMsg ) = 0; + + virtual bool TerminateChatRoom( CSteamID steamIDChat ) = 0; + + virtual int32 GetChatRoomCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetChatRoomByIndex, int32, iChatRoom) /*virtual CSteamID GetChatRoomByIndex( int32 iChatRoom ) = 0;*/ + + virtual const char *GetChatRoomName( CSteamID steamIDChat ) = 0; + + virtual bool BGetChatRoomMemberDetails( CSteamID steamIDChat, CSteamID steamIDUser, uint32* prgfChatMemberDetails, uint32* prgfChatMemberDetailsLocal ) = 0; + + virtual void CreateChatRoom( EChatRoomType eType, uint64 ulGameID, const char *pchName, ELobbyType eLobbyType, CSteamID steamIDClan, CSteamID steamIDFriendChat, CSteamID steamIDInvited, uint32 rgfChatPermissionOfficer, uint32 rgfChatPermissionMember, uint32 rgfChatPermissionAll ) = 0; + + virtual void VoiceCall( CSteamID steamIDLocalPeer, CSteamID steamIDRemotePeer ) = 0; + virtual void VoiceHangUp( HVoiceCall hVoiceCall ) = 0; + + virtual void SetVoiceSpeakerVolume( float flVolume ) = 0; + virtual void SetVoiceMicrophoneVolume( float flVolume ) = 0; + + virtual void SetAutoAnswer( bool bAutoAnswer ) = 0; + + virtual void VoiceAnswer( HVoiceCall hVoiceCall ) = 0; + + virtual void VoicePutOnHold( HVoiceCall HVoiceCall, bool bLocalHold ) = 0; + virtual bool BVoiceIsLocalOnHold( HVoiceCall hVoiceCall ) = 0; + virtual bool BVoiceIsRemoteOnHold( HVoiceCall hVoiceCall ) = 0; + + virtual void SetDoNotDisturb( bool bDoNotDisturb ) = 0; + + virtual void EnableVoiceNotificationSounds( bool bEnable ) = 0; + + virtual void SetPushToTalkEnabled( bool bEnable ) = 0; + virtual bool IsPushToTalkEnabled() = 0; + + virtual void SetPushToTalkKey( int32 nVirtualKey ) = 0; + virtual int32 GetPushToTalkKey() = 0; + + virtual bool IsPushToTalkKeyDown() = 0; + + virtual void EnableVoiceCalibration( bool bState ) = 0; + virtual bool IsVoiceCalibrating() = 0; + virtual float GetVoiceCalibrationSamplePeak() = 0; + + virtual void SetMicBoost( bool bBoost ) = 0; + virtual bool GetMicBoost() = 0; + + virtual bool HasHardwareMicBoost() = 0; + + virtual const char *GetMicDeviceName() = 0; + + virtual void StartTalking( HVoiceCall hVoiceCall ) = 0; + virtual void EndTalking( HVoiceCall hVoiceCall ) = 0; + + virtual bool VoiceIsValid( HVoiceCall hVoiceCall ) = 0; + + virtual void SetAutoReflectVoice( bool bState ) = 0; + + virtual ECallState GetCallState( HVoiceCall hVoiceCall ) = 0; + + virtual float GetVoiceMicrophoneVolume() = 0; + virtual float GetVoiceSpeakerVolume() = 0; + + virtual float TimeSinceLastVoiceDataReceived( HVoiceCall hVoiceCall ) = 0; + virtual float TimeSinceLastVoiceDataSend( HVoiceCall hVoiceCall ) = 0; + + virtual bool BCanSend( HVoiceCall hVoiceCall ) = 0; + virtual bool BCanReceive( HVoiceCall hVoiceCall ) = 0; + + virtual float GetEstimatedBitsPerSecond( HVoiceCall hVoiceCall, bool bIncoming ) = 0; + virtual float GetPeakSample( HVoiceCall hVoiceCall, bool bIncoming ) = 0; + + virtual void SendResumeRequest( HVoiceCall hVoiceCall ) = 0; + + virtual void OpenChatDialog( CSteamID steamID ) = 0; + + virtual void StartChatRoomVoiceSpeaking( CSteamID steamIDChat, CSteamID steamIDMember ) = 0; + virtual void EndChatRoomVoiceSpeaking( CSteamID steamIDChat, CSteamID steamIDMember ) = 0; + + virtual RTime32 GetFriendLastLogonTime( CSteamID steamIDFriend ) = 0; + virtual RTime32 GetFriendLastLogoffTime( CSteamID steamIDFriend ) = 0; + + virtual int32 GetChatRoomVoiceTotalSlotCount( CSteamID steamIDChat ) = 0; + virtual int32 GetChatRoomVoiceUsedSlotCount( CSteamID steamIDChat ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetChatRoomVoiceUsedSlot, CSteamID, steamIDChat, int32, iSlot) /*virtual CSteamID GetChatRoomVoiceUsedSlot( CSteamID steamIDChat, int32 iSlot ) = 0;*/ + virtual EChatRoomVoiceStatus GetChatRoomVoiceStatus( CSteamID steamIDChat, CSteamID steamIDSpeaker ) = 0; + + virtual bool BChatRoomHasAvailableVoiceSlots( CSteamID steamIDChat ) = 0; + + virtual bool BIsChatRoomVoiceSpeaking( CSteamID steamIDChat, CSteamID steamIDSpeaker ) = 0; + + virtual float GetChatRoomPeakSample( CSteamID steamIDChat, CSteamID steamIDSpeaker, bool bIncoming ) = 0; + + virtual void ChatRoomVoiceRetryConnections( CSteamID steamIDChat ) = 0; + + virtual void SetPortTypes( uint32 unFlags ) = 0; + + virtual void ReinitAudio() = 0; + + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + virtual bool IsInGameVoiceSpeaking() = 0; + + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + virtual void ActivateGameOverlayToStore( AppId_t nAppId, EOverlayToStoreFlag eFlag ) = 0; + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + virtual void NotifyGameOverlayStateChanged( bool bActive ) = 0; + virtual void NotifyGameServerChangeRequested( const char *pchServerAddress, const char *pchPassword ) = 0; + virtual bool NotifyLobbyJoinRequested( AppId_t nAppId, CSteamID steamIDLobby, CSteamID steamIDFriend ) = 0; + virtual bool NotifyRichPresenceJoinRequested( AppId_t nAppId, CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + virtual EClanRelationship GetClanRelationship( CSteamID steamIDclan ) = 0; + + virtual EClanRank GetFriendClanRank( CSteamID steamIDUser, CSteamID steamIDClan ) = 0; + + virtual bool VoiceIsAvailable() = 0; + + virtual void TestVoiceDisconnect( HVoiceCall hVoiceCall ) = 0; + virtual void TestChatRoomPeerDisconnect( CSteamID steamIDChat, CSteamID steamIDSpeaker ) = 0; + virtual void TestVoicePacketLoss( float flFractionOfIncomingPacketsToDrop ) = 0; + + virtual HVoiceCall FindFriendVoiceChatHandle( CSteamID steamIDFriend ) = 0; + + virtual void RequestFriendsWhoPlayGame( CGameID gameID ) = 0; + virtual uint32 GetCountFriendsWhoPlayGame( CGameID gameID ) = 0; + + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendWhoPlaysGame, uint32, iIndex, CGameID, gameID) /*virtual CSteamID GetFriendWhoPlaysGame( uint32 iIndex, CGameID gameID ) = 0;*/ + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanOwner, CSteamID, steamIDClan) /*virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0;*/ + virtual int32 GetClanOfficerCount( CSteamID steamIDClan ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetClanOfficerByIndex, CSteamID, steamIDClan, int32, iOfficer) /*virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int32 iOfficer ) = 0;*/ + + virtual EUserRestriction GetUserRestrictions() = 0; + + virtual SteamAPICall_t RequestFriendProfileInfo( CSteamID steamIDFriend ) = 0; + // Available keys: TimeCreated, RealName, CityName, StateName, CountryName, Headline, Playtime, Summary + virtual const char* GetFriendProfileInfo( CSteamID steamIDFriend, const char* pchKey ) = 0; + + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + virtual int32 GetOnlineConsoleFriendCount() = 0; + + virtual SteamAPICall_t RequestTrade( CSteamID steamIDPartner ) = 0; + virtual void TradeResponse( uint32 unTradeRequestID, bool bAccept ) = 0; + virtual void CancelTradeRequest( CSteamID steamIDPartner ) = 0; + + virtual bool HideFriend( CSteamID steamIDFriend, bool bHide ) = 0; + virtual const char * GetFriendFacebookName( CSteamID steamIDFriend ) = 0; + virtual uint64 GetFriendFacebookID( CSteamID steamIDFriend ) = 0; + + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 uStartIndex ) = 0; + + virtual bool BOfflineMessagesEnabled() = 0; + virtual void RequestFriendMessageHistory( CSteamID steamIDFriend ) = 0; + virtual void RequestFriendMessageHistoryForOfflineMessages() = 0; + + virtual void RequestEmoticonList() = 0; + virtual int32 GetEmoticonCount() = 0; + virtual const char *GetEmoticonName( int32 iEmoticon ) = 0; +}; + +#endif // ICLIENTFRIENDS_H diff --git a/src/public SDK/IClientGameCoordinator.h b/src/public SDK/IClientGameCoordinator.h new file mode 100644 index 0000000..6c1d7d8 --- /dev/null +++ b/src/public SDK/IClientGameCoordinator.h @@ -0,0 +1,37 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTGAMECOORDINATOR_H +#define ICLIENTGAMECOORDINATOR_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameCoordinatorCommon.h" + + +abstract_class IClientGameCoordinator +{ +public: + virtual EGCResults SendMessage( AppId_t unAppID, uint32 unMsgType, const void *pubData, uint32 cubData ) = 0; + + virtual bool IsMessageAvailable( AppId_t unAppID, uint32 *pcubMsgSize ) = 0; + + virtual EGCResults RetrieveMessage( AppId_t unAppID, uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; +}; + +#endif diff --git a/src/public SDK/IClientGameServer.h b/src/public SDK/IClientGameServer.h new file mode 100644 index 0000000..deb39da --- /dev/null +++ b/src/public SDK/IClientGameServer.h @@ -0,0 +1,239 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTGAMESERVER_H +#define ICLIENTGAMESERVER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" +#include "UserCommon.h" + + +typedef enum EGameConnectSteamResponse +{ + k_EGameConnectSteamResponse_WaitingForResponse = 0, + k_EGameConnectSteamResponse_AuthorizedToPlay = 1, + k_EGameConnectSteamResponse_Denied = 2, + k_EGameConnectSteamResponse_ExceededReasonableTime_StillWaiting = 3, +} EGameConnectSteamResponse; + +struct ConnectedUserInfo_t +{ + int32 m_cubConnectedUserInfo; + int32 m_nCountOfGuestUsers; + CSteamID m_SteamID; + uint32 m_unIPPublic; + uint32 m_nFrags; + double m_flConnectTime; + EGameConnectSteamResponse m_eGameConnectSteamResponse; + EDenyReason m_eDenyReason; +}; + +abstract_class UNSAFE_INTERFACE IClientGameServer +{ +public: + // returns the HSteamUser this interface represents + virtual HSteamUser GetHSteamUser() = 0; + + virtual bool InitGameServer( uint32 unGameIP, uint16 unGamePort, uint16 usQueryPort, uint32 unServerFlags, AppId_t nAppID, const char *pchVersion ) = 0; + virtual void SetProduct( const char *pchProductName ) = 0; + virtual void SetGameDescription( const char *pchGameDescription ) = 0; + virtual void SetModDir( const char *pchModDir ) = 0; + virtual void SetDedicatedServer( bool bDedicatedServer ) = 0; + virtual void LogOn( const char *pchLogin, const char *pchPassword ) = 0; + virtual void LogOnAnonymous() = 0; + virtual void LogOff() = 0; + + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + virtual bool BLoggedOn() = 0; + + virtual bool BSecure() = 0; + + // Returns true if the master server has requested a restart. + // Only returns true once per request. + virtual bool WasRestartRequested() = 0; + + virtual void SetMaxPlayerCount( int32 cPlayersMax ) = 0; + virtual void SetBotPlayerCount( int32 cBotPlayers ) = 0; + virtual void SetServerName( const char *pchServerName ) = 0; + virtual void SetMapName( const char *pchMapName ) = 0; + virtual void SetPasswordProtected( bool bPasswordProtected ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0; + + virtual void SetSpectatorServerName( const char *pchSpectatorServerName ) = 0; + + // Call this to clear the whole list of key/values that are sent in rules queries. + virtual void ClearAllKeyValues() = 0; + + // Call this to add/update a key/value pair. + virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0; + + // Sets a string defining the "gametags" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameTags( const char *pchGameTags ) = 0; + + // Sets a string defining the "gamedata" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + // don't set this unless it actually changes, its only uploaded to the master once (when + // acknowledged) + virtual void SetGameData( const char *pchGameData ) = 0; + + virtual void SetRegion( const char *pchRegionName ) = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual EUserConnect SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + STEAMWORKS_STRUCT_RETURN_0(CSteamID, CreateUnauthenticatedUserConnection) /*virtual CSteamID CreateUnauthenticatedUserConnection() = 0;*/ + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // New auth system APIs - do not mix with the old auth system APIs. + // ---------------------------------------------------------------- + + // Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ). + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int32 cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int32 cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult IsUserSubscribedAppInTicket( CSteamID steamID, AppId_t appID ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Gets the reputation score for the game server. This API also checks if the server or some + // other server on the same IP is banned from the Steam master servers. + virtual SteamAPICall_t GetServerReputation( ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; + + // These are in GameSocketShare mode, where instead of ISteamGameServer creating its own + // socket to talk to the master server on, it lets the game use its socket to forward messages + // back and forth. This prevents us from requiring server ops to open up yet another port + // in their firewalls. + // + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + + // These are used when you've elected to multiplex the game server's UDP socket + // rather than having the master server updater use its own sockets. + // + // Source games use this to simplify the job of the server admins, so they + // don't have to open up more ports on their firewalls. + + // Call this when a packet that starts with 0xFFFFFFFF comes in. That means + // it's for us. + virtual bool HandleIncomingPacket( const void *pData, int32 cbData, uint32 srcIP, uint16 srcPort ) = 0; + + // AFTER calling HandleIncomingPacket for any packets that came in that frame, call this. + // This gets a packet that the master server updater needs to send out on UDP. + // It returns the length of the packet it wants to send, or 0 if there are no more packets to send. + // Call this each frame until it returns 0. + virtual int32 GetNextOutgoingPacket( void *pOut, int32 cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0; + + virtual void EnableHeartbeats( bool bEnabled ) = 0; + virtual void SetHeartbeatInterval( int32 iInterval ) = 0; + + // Force it to request a heartbeat from the master servers. + virtual void ForceHeartbeat() = 0; + + + virtual ELogonState GetLogonState() = 0; + virtual bool BConnected() = 0; + + virtual int32 RaiseConnectionPriority( EConnectionPriority eConnectionPriority ) = 0; + virtual void ResetConnectionPriority( int32 hRaiseConnectionPriorityPrev ) = 0; + + virtual void SetCellID( CellID_t cellID ) = 0; + + virtual void TrackSteamUsageEvent( ESteamUsageEvent eSteamUsageEvent, const uint8 *pubKV, uint32 cubKV ) = 0; + + virtual void SetCountOfSimultaneousGuestUsersPerSteamAccount( int32 nCount ) = 0; + + virtual bool EnumerateConnectedUsers( int32 iterator, ConnectedUserInfo_t *pConnectedUserInfo ) = 0; + + virtual SteamAPICall_t AssociateWithClan( CSteamID clanID ) = 0; + virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamID ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool _BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + virtual void _GSSetSpawnCount( uint32 ucSpawn ) = 0; + virtual bool _GSGetSteam2GetEncryptionKeyToSendToNewClient( void *pvEncryptionKey, uint32 *pcbEncryptionKey, uint32 cbMaxEncryptionKey ) = 0; + + virtual bool _GSSendSteam2UserConnect( uint32 unUserID, const void *pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void *pvCookie, uint32 cubCookie ) = 0; + virtual bool _GSSendSteam3UserConnect( CSteamID steamID, uint32 unIPPublic, const void *pvCookie, uint32 cubCookie ) = 0; + + virtual bool _GSSendUserConnect( uint32 unUserID, uint32 unIPPublic, uint16 usPort, const void *pvCookie, uint32 cubCookie ) = 0; + virtual bool _GSRemoveUserConnect( uint32 unUserID ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual bool _GSUpdateStatus( int32 cPlayers, int32 cPlayersMax, int32 cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0; + + virtual bool _GSCreateUnauthenticatedUser( CSteamID *pSteamID ) = 0; + + virtual bool _GSSetServerType( int32 iAppID, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + virtual void _SetBasicServerData( unsigned short nProtocolVersion, bool bDedicatedServer, const char *pRegionName, const char *pProductName, unsigned short nMaxReportedClients, bool bPasswordProtected, const char *pGameDescription ) = 0; + + virtual bool _GSSendUserDisconnect( CSteamID, uint32 unUserID ) = 0; +}; + + +#endif // ICLIENTGAMESERVER_H diff --git a/src/public SDK/IClientGameServerStats.h b/src/public SDK/IClientGameServerStats.h new file mode 100644 index 0000000..052d0e8 --- /dev/null +++ b/src/public SDK/IClientGameServerStats.h @@ -0,0 +1,56 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTGAMESERVERSTATS_H +#define ICLIENTGAMESERVERSTATS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerStatsCommon.h" + +abstract_class UNSAFE_INTERFACE IClientGameServerStats +{ +public: + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser, CGameID gameID ) = 0; + +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, float *pData ) = 0; +#else + virtual bool GetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, float *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, int32 *pData ) = 0; +#endif + + virtual bool GetUserAchievement( CSteamID steamIDUser, CGameID gameID, const char *pchName, bool *pbAchieved, RTime32 *prtTime ) = 0; + +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool SetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, int32 nData ) = 0; + virtual bool SetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, float fData ) = 0; +#else + virtual bool SetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, float fData ) = 0; + virtual bool SetUserStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, int32 nData ) = 0; +#endif + + virtual bool UpdateUserAvgRateStat( CSteamID steamIDUser, CGameID gameID, const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + virtual bool SetUserAchievement( CSteamID steamIDUser, CGameID gameID, const char *pchName ) = 0; + virtual bool ClearUserAchievement( CSteamID steamIDUser, CGameID gameID, const char *pchName ) = 0; + virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser, CGameID gameID ) = 0; + virtual void SetMaxStatsLoaded( uint32 uMax ) = 0; +}; + +#endif // ICLIENTGAMESERVERSTATS_H diff --git a/src/public SDK/IClientGameStats.h b/src/public SDK/IClientGameStats.h new file mode 100644 index 0000000..adbcb26 --- /dev/null +++ b/src/public SDK/IClientGameStats.h @@ -0,0 +1,56 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTGAMESTATS_H +#define ICLIENTGAMESTATS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameStatsCommon.h" + +abstract_class UNSAFE_INTERFACE IClientGameStats +{ +public: + virtual SteamAPICall_t GetNewSession( int8 nAccountType, uint64 ullAccountID, AppId_t nAppID, RTime32 rtTimeStarted ) = 0; + virtual SteamAPICall_t EndSession( uint64 ulSessionID, RTime32 rtTimeEnded, int16 nReasonCode ) = 0; + + virtual EResult AddSessionAttributeInt( uint64 ulSessionID, const char *pstrName, int32 nData ) = 0; + virtual EResult AddSessionAttributeString( uint64 ulSessionID, const char *pstrName, const char *pstrData ) = 0; + virtual EResult AddSessionAttributeFloat( uint64 ulSessionID, const char *pstrName, float fData ) = 0; + + virtual EResult AddNewRow( uint64 *pulRowID, uint64 ulSessionID, const char *pstrTableName ) = 0; + + virtual EResult CommitRow( uint64 ulRowID ) = 0; + virtual EResult CommitOutstandingRows( uint64 ulSessionID ) = 0; + + virtual EResult AddRowAttributeInt( uint64 ulRowID, const char *pstrName, int32 iData ) = 0; + virtual EResult AddRowAtributeString( uint64 ulRowID, const char *pstrName, const char *pstrData ) = 0; + virtual EResult AddRowAttributeFloat( uint64 ulRowID, const char *pstrName, float fData ) = 0; + + virtual EResult AddSessionAttributeInt64( uint64 ulSessionID, const char *pstrName, int64 llData ) = 0; + virtual EResult AddRowAttributeInt64( uint64 ulRowID, const char *pstrName, int64 llData ) = 0; + + virtual EResult ReportString( uint64 ulSessionID, int32 iSeverity, const char *cszFormat, ... ) = 0; + virtual EResult _ReportString( uint64 ulSessionID, int32, char const*, int32, unsigned char const* ) = 0; + virtual EResult ReportStringAccumulated( uint64 ulSessionID, int32 iSeverity, const char *cszFormat, ... ) = 0; + virtual EResult _ReportStringAccumulated( uint64 ulSessionID, int32, char const*, int32, unsigned char const* ) = 0; + virtual EResult ReportBugScreenshot( uint64 ulSessionID, char const* szBugText, int32 cubScreenshot, const uint8* pubScreenshot ) = 0; +}; + + +#endif // ICLIENTGAMESTATS_H diff --git a/src/public SDK/IClientHTTP.h b/src/public SDK/IClientHTTP.h new file mode 100644 index 0000000..8a4dd3c --- /dev/null +++ b/src/public SDK/IClientHTTP.h @@ -0,0 +1,108 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTHTTP_H +#define ICLIENTHTTP_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "HTTPCommon.h" + +abstract_class UNSAFE_INTERFACE IClientHTTP +{ +public: + // Initializes a new HTTP request, returning a handle to use in further operations on it. Requires + // the method (GET or POST) and the absolute URL for the request. Only http requests (ie, not https) are + // currently supported, so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/ + // or such. + virtual HTTPRequestHandle CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) = 0; + + // Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after + // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. + virtual bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) = 0; + + // Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default + // timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request + // has already been sent. + virtual bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) = 0; + + // Set a request header value for the request, must be called prior to sending the request. Will + // return false if the handle is invalid or the request is already sent. + virtual bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) = 0; + + // Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified + // when creating the request. Must be called prior to sending the request. Will return false if the + // handle is invalid or the request is already sent. + virtual bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asyncronous response via callback. + // + // Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control + // header and only do a local cache lookup rather than sending any actual remote request. + virtual bool SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + virtual bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool DeferHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + virtual bool CancelHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also + // returns the size of the header value if present so the caller and allocate a correctly sized buffer for + // GetHTTPResponseHeaderValue. + virtual bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) = 0; + + // Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // header is not present or if your buffer is too small to contain it's value. You should first call + // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. + virtual bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) = 0; + + // Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid. + virtual bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) = 0; + + // Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out + // the correct buffer size to use. + virtual bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + virtual bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint32, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t + // callback and finishing using the response. + virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Gets progress on downloading the body for the request. This will be zero unless a response header has already been + // received which included a content-length field. For responses that contain no content-length it will report + // zero for the duration of the request as the size is unknown until the connection closes. + virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0; + + // Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params + // have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType + // parameter will set the content-type header for the request so the server may know how to interpret the body. + virtual bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) = 0; +}; + +#endif // ICLIENTHTTP_H diff --git a/src/public SDK/IClientInventory.h b/src/public SDK/IClientInventory.h new file mode 100644 index 0000000..437016c --- /dev/null +++ b/src/public SDK/IClientInventory.h @@ -0,0 +1,259 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTINVENTORY_H +#define ICLIENTINVENTORY_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "InventoryCommon.h" + +abstract_class UNSAFE_INTERFACE IClientInventory +{ +public: + // INVENTORY ASYNC RESULT MANAGEMENT + // + // Asynchronous inventory queries always output a result handle which can be used with + // GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will + // be triggered when the asynchronous result becomes ready (or fails). + // + + // Find out the status of an asynchronous inventory result handle. Possible values: + // k_EResultPending - still in progress + // k_EResultOK - done, result ready + // k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult) + // k_EResultInvalidParam - ERROR: invalid API call parameters + // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later + // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits + // k_EResultFail - ERROR: unknown / generic error + virtual EResult GetResultStatus(SteamInventoryResult_t resultHandle) = 0; + + // Copies the contents of a result set into a flat array. The specific + // contents of the result set depend on which query which was used. + virtual bool GetResultItems(SteamInventoryResult_t resultHandle, + SteamItemDetails_t *pOutItemsArray, + uint32 *punOutItemsArraySize) = 0; + + // Returns the server time at which the result was generated. Compare against + // the value of IClientUtils::GetServerRealTime() to determine age. + virtual uint32 GetResultTimestamp(SteamInventoryResult_t resultHandle) = 0; + + // Returns true if the result belongs to the target steam ID, false if the + // result does not. This is important when using DeserializeResult, to verify + // that a remote player is not pretending to have a different user's inventory. + virtual bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) = 0; + + // Destroys a result handle and frees all associated memory. + virtual void DestroyResult(SteamInventoryResult_t resultHandle) = 0; + + + // INVENTORY ASYNC QUERY + // + + // Captures the entire state of the current user's Steam inventory. + // You must call DestroyResult on this handle when you are done with it. + // Returns false and sets *pResultHandle to zero if inventory is unavailable. + // Note: calls to this function are subject to rate limits and may return + // cached results if called too frequently. It is suggested that you call + // this function only when you are about to display the user's full inventory, + // or if you expect that the inventory may have changed. + virtual bool GetAllItems(SteamInventoryResult_t *pResultHandle) = 0; + + + // Captures the state of a subset of the current user's Steam inventory, + // identified by an array of item instance IDs. The results from this call + // can be serialized and passed to other players to "prove" that the current + // user owns specific items, without exposing the user's entire inventory. + // For example, you could call GetItemsByID with the IDs of the user's + // currently equipped cosmetic items and serialize this to a buffer, and + // then transmit this buffer to other players upon joining a game. + virtual bool GetItemsByID(SteamInventoryResult_t *pResultHandle, const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs) = 0; + + + // RESULT SERIALIZATION AND AUTHENTICATION + // + // Serialized result sets contain a short signature which can't be forged + // or replayed across different game sessions. A result set can be serialized + // on the local client, transmitted to other players via your game networking, + // and deserialized by the remote players. This is a secure way of preventing + // hackers from lying about posessing rare/high-value items. + + // Serializes a result set with signature bytes to an output buffer. Pass + // NULL as an output buffer to get the required size via punOutBufferSize. + // The size of a serialized result depends on the number items which are being + // serialized. When securely transmitting items to other players, it is + // recommended to use "GetItemsByID" first to create a minimal result set. + // Results have a built-in timestamp which will be considered "expired" after + // an hour has elapsed. See DeserializeResult for expiration handling. + virtual bool SerializeResult(SteamInventoryResult_t resultHandle, void *pOutBuffer, uint32 *punOutBufferSize) = 0; + + // Deserializes a result set and verifies the signature bytes. Returns false + // if bRequireFullOnlineVerify is set but Steam is running in Offline mode. + // Otherwise returns true and then delivers error codes via GetResultStatus. + // + // The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not + // be set to true by your game at this time. + // + // DeserializeResult has a potential soft-failure mode where the handle status + // is set to k_EResultExpired. GetResultItems() still succeeds in this mode. + // The "expired" result could indicate that the data may be out of date - not + // just due to timed expiration (one hour), but also because one of the items + // in the result set may have been traded or consumed since the result set was + // generated. You could compare the timestamp from GetResultTimestamp() to + // ISteamUtils::GetServerRealTime() to determine how old the data is. You could + // simply ignore the "expired" result code and continue as normal, or you + // could challenge the player with expired data to send an updated result set. + virtual bool DeserializeResult(SteamInventoryResult_t *pOutResultHandle, const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) = 0; + + + // INVENTORY ASYNC MODIFICATION + // + + // GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t + // notification with a matching nCallbackContext parameter. This API is insecure, and could + // be abused by hacked clients. It is, however, very useful as a development cheat or as + // a means of prototyping item-related features for your game. The use of GenerateItems can + // be restricted to certain item definitions or fully blocked via the Steamworks website. + // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should + // describe the quantity of each item to generate. + virtual bool GenerateItems(SteamInventoryResult_t *pResultHandle, const SteamItemDef_t *pArrayItemDefs, const uint32 *punArrayQuantity, uint32 unArrayLength) = 0; + + // GrantPromoItems() checks the list of promotional items for which the user may be eligible + // and grants the items (one time only). On success, the result set will include items which + // were granted, if any. If no items were granted because the user isn't eligible for any + // promotions, this is still considered a success. + virtual bool GrantPromoItems(SteamInventoryResult_t *pResultHandle) = 0; + + // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of + // scanning for all eligible promotional items, the check is restricted to a single item + // definition or set of item definitions. This can be useful if your game has custom UI for + // showing a specific promo item to the user. + virtual bool AddPromoItem(SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef) = 0; + virtual bool AddPromoItems(SteamInventoryResult_t *pResultHandle, const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength) = 0; + + // ConsumeItem() removes items from the inventory, permenantly. They cannot be recovered. + // Not for the faint of heart - if your game implements item removal at all, a high-friction + // UI confirmation process is highly recommended. Similar to GenerateItems, punArrayQuantity + // can be NULL or else an array of the same length as pArrayItems which describe the quantity + // of each item to destroy. ConsumeItem can be restricted to certain item definitions or + // fully blocked via the Steamworks website to minimize support/abuse issues such as the + // clasic "my brother borrowed my laptop and deleted all of my rare items". + virtual bool ConsumeItem(SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) = 0; + + // ExchangeItems() is an atomic combination of GenerateItems and DestroyItems. It can be + // used to implement crafting recipes or transmutations, or items which unpack themselves + // into other items. Like GenerateItems, this is a flexible and dangerous API which is + // meant for rapid prototyping. You can configure restrictions on ExchangeItems via the + // Steamworks website, such as limiting it to a whitelist of input/output combinations + // corresponding to recipes. + // (Note: although GenerateItems may be hard or impossible to use securely in your game, + // ExchangeItems is perfectly reasonable to use once the whitelists are set accordingly.) + virtual bool ExchangeItems(SteamInventoryResult_t *pResultHandle, + const SteamItemDef_t *pArrayGenerate, const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, + const SteamItemInstanceID_t *pArrayDestroy, const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength) = 0; + + + // TransferItemQuantity() is intended for use with items which are "stackable" (can have + // quantity greater than one). It can be used to split a stack into two, or to transfer + // quantity from one stack into another stack of identical items. To split one stack into + // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. + virtual bool TransferItemQuantity(SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) = 0; + + + // TIMED DROPS AND PLAYTIME CREDIT + // + + // Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when + // active gameplay begins, and at least once every two minutes afterwards. The backend + // performs its own time calculations, so the precise timing of the heartbeat is not + // critical as long as you send at least one heartbeat every two minutes. Calling the + // function more often than that is not harmful, it will simply have no effect. Note: + // players may be able to spoof this message by hacking their client, so you should not + // attempt to use this as a mechanism to restrict playtime credits. It is simply meant + // to distinguish between being in any kind of gameplay situation vs the main menu or + // a pre-game launcher window. (If you are stingy with handing out playtime credit, it + // will only encourage players to run bots or use mouse/kb event simulators.) + // + // Playtime credit accumulation can be capped on a daily or weekly basis through your + // Steamworks configuration. + // + virtual void SendItemDropHeartbeat() = 0; + + // Playtime credit must be consumed and turned into item drops by your game. Only item + // definitions which are marked as "playtime item generators" can be spawned. The call + // will return an empty result set if there is not enough playtime credit for a drop. + // Your game should call TriggerItemDrop at an appropriate time for the user to receive + // new items, such as between rounds or while the player is dead. Note that players who + // hack their clients could modify the value of "dropListDefinition", so do not use it + // to directly control rarity. It is primarily useful during testing and development, + // where you may wish to perform experiments with different types of drops. + virtual bool TriggerItemDrop(SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition) = 0; + + + // IN-GAME TRADING + // + // TradeItems() implements limited in-game trading of items, if you prefer not to use + // the overlay or an in-game web browser to perform Steam Trading through the website. + // You should implement a UI where both players can see and agree to a trade, and then + // each client should call TradeItems simultaneously (+/- 5 seconds) with matching + // (but reversed) parameters. The result is the same as if both players performed a + // Steam Trading transaction through the web. Each player will get an inventory result + // confirming the removal or quantity changes of the items given away, and the new + // item instance id numbers and quantities of the received items. + // (Note: new item instance IDs are generated whenever an item changes ownership.) + virtual bool TradeItems(SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, + const SteamItemInstanceID_t *pArrayGive, const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, + const SteamItemInstanceID_t *pArrayGet, const uint32 *pArrayGetQuantity, uint32 nArrayGetLength) = 0; + + + // ITEM DEFINITIONS + // + // Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000) + // to a set of string properties. Some of these properties are required to display items + // on the Steam community web site. Other properties can be defined by applications. + // Use of these functions is optional; there is no reason to call LoadItemDefinitions + // if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue + // weapon mod = 55) and does not allow for adding new item types without a client patch. + // + + // LoadItemDefinitions triggers the automatic load and refresh of item definitions. + // Every time new item definitions are available (eg, from the dynamic addition of new + // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t + // callback will be fired. + virtual bool LoadItemDefinitions() = 0; + + // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are + // defined via Steamworks configuration, and not necessarily contiguous integers). + // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will + // contain the total size necessary for a subsequent call. Otherwise, the call will + // return false if and only if there is not enough space in the output array. + virtual bool GetItemDefinitionIDs( + SteamItemDef_t *pItemDefIDs, + uint32 *punItemDefIDsArraySize) = 0; + + // GetItemDefinitionProperty returns a string property from a given item definition. + // Note that some properties (for example, "name") may be localized and will depend + // on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage). + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. + virtual bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, const char *pchPropertyName, + char *pchValueBuffer, uint32 *punValueBufferSize) = 0; +}; + +#endif // ICLIENTINVENTORY_H \ No newline at end of file diff --git a/src/public SDK/IClientMasterServerUpdater.h b/src/public SDK/IClientMasterServerUpdater.h new file mode 100644 index 0000000..0b1fc1a --- /dev/null +++ b/src/public SDK/IClientMasterServerUpdater.h @@ -0,0 +1,102 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTMASTERSERVERUPDATER_H +#define ICLIENTMASTERSERVERUPDATER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MasterServerUpdaterCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Game engines use this to tell the Steam master servers +// about their games so their games can show up in the server browser. +//----------------------------------------------------------------------------- +abstract_class OBSOLETE_INTERFACE IClientMasterServerUpdater +{ +public: + + // Call this as often as you like to tell the master server updater whether or not + // you want it to be active (default: off). + virtual void SetActive( bool bActive ) = 0; + + // You usually don't need to modify this. + // Pass -1 to use the default value for iHeartbeatInterval. + // Some mods change this. + virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0; + + + // These are in GameSocketShare mode, where instead of ISteamMasterServerUpdater creating its own + // socket to talk to the master server on, it lets the game use its socket to forward messages + // back and forth. This prevents us from requiring server ops to open up yet another port + // in their firewalls. + // + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + + // These are used when you've elected to multiplex the game server's UDP socket + // rather than having the master server updater use its own sockets. + // + // Source games use this to simplify the job of the server admins, so they + // don't have to open up more ports on their firewalls. + + // Call this when a packet that starts with 0xFFFFFFFF comes in. That means + // it's for us. + virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0; + + // AFTER calling HandleIncomingPacket for any packets that came in that frame, call this. + // This gets a packet that the master server updater needs to send out on UDP. + // It returns the length of the packet it wants to send, or 0 if there are no more packets to send. + // Call this each frame until it returns 0. + virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0; + + + // Functions to set various fields that are used to respond to queries. + + // Call this to set basic data that is passed to the server browser. + virtual void SetBasicServerData( unsigned short nProtocolVersion, bool bDedicatedServer, const char *pRegionName, const char *pProductName, unsigned short nMaxReportedClients, bool bPasswordProtected, const char *pGameDescription ) = 0; + + // Call this to clear the whole list of key/values that are sent in rules queries. + virtual void ClearAllKeyValues() = 0; + + // Call this to add/update a key/value pair. + virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0; + + + // You can call this upon shutdown to clear out data stored for this game server and + // to tell the master servers that this server is going away. + virtual void NotifyShutdown() = 0; + + // Returns true if the master server has requested a restart. + // Only returns true once per request. + virtual bool WasRestartRequested() = 0; + + // Force it to request a heartbeat from the master servers. + virtual void ForceHeartbeat() = 0; + + // Manually edit and query the master server list. + // It will provide name resolution and use the default master server port if none is provided. + virtual bool AddMasterServer( const char *pServerAddress ) = 0; + virtual bool RemoveMasterServer( const char *pServerAddress ) = 0; + + virtual int GetNumMasterServers() = 0; + + // Returns the # of bytes written to pOut. + virtual int GetMasterServerAddress( int iServer, char *pOut, int outBufferSize ) = 0; +}; + +#endif // ICLIENTMASTERSERVERUPDATER_H diff --git a/src/public SDK/IClientMatchmaking.h b/src/public SDK/IClientMatchmaking.h new file mode 100644 index 0000000..ac30328 --- /dev/null +++ b/src/public SDK/IClientMatchmaking.h @@ -0,0 +1,95 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTMATCHMAKING_H +#define ICLIENTMATCHMAKING_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" +#include "UserCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientMatchmaking +{ +public: + virtual int32 GetFavoriteGameCount() = 0; + virtual bool GetFavoriteGame( int32 iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + virtual int32 AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + virtual SteamAPICall_t RequestLobbyList() = 0; + + virtual void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType ) = 0; + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int32 nValueToMatch, ELobbyComparison eComparisonType ) = 0; + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int32 nValueToBeCloseTo ) = 0; + virtual void AddRequestLobbyListFilterSlotsAvailable( int32 nSlotsAvailable ) = 0; + virtual void AddRequestLobbyListDistanceFilter( ELobbyDistanceFilter filter ) = 0; + virtual void AddRequestLobbyListResultCountFilter( int32 cMaxResults ) = 0; + virtual void AddRequestLobbyListCompatibleMembersFilter( CSteamID steamID ) = 0; + + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyByIndex, int32, iLobby) /*virtual CSteamID GetLobbyByIndex( int32 iLobby ) = 0;*/ + + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int32 cMaxMembers ) = 0; + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + virtual int32 GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetLobbyMemberByIndex, CSteamID, steamIDLobby, int32, iMember) /*virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int32 iMember ) = 0;*/ + + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + virtual int32 GetLobbyDataCount( CSteamID steamIDLobby ) = 0; + virtual bool GetLobbyDataByIndex( CSteamID steamIDLobby, int32 iLobbyData, char *pchKey, int32 cchKeyBufferSize, char *pchValue, int32 cchValueBufferSize ) = 0; + virtual bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int32 cubMsgBody ) = 0; + virtual int32 GetLobbyChatEntry( CSteamID steamIDLobby, int32 iChatID, CSteamID *pSteamIDUser, void *pvData, int32 cubData, EChatEntryType *peChatEntryType ) = 0; + + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int32 cMaxMembers ) = 0; + virtual int32 GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + virtual void SetLobbyVoiceEnabled( CSteamID steamIDLobby, bool bVoiceEnabled ) = 0; + virtual bool RequestFriendsLobbies() = 0; + + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + virtual bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyOwner, CSteamID, steamIDLobby) /*virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0;*/ + virtual bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) = 0; + virtual bool SetLinkedLobby( CSteamID steamIDLobby, CSteamID steamIDLobby2 ) = 0; + + virtual uint64 BeginGMSQuery( AppId_t nAppId, int32 iRegionCode, const char* szFilterText ) = 0; + virtual int32 PollGMSQuery( uint64 ullGMSQuery ) = 0; + virtual int32 GetGMSQueryResults( uint64 ullGMSQuery, GMSQueryResult_t *pGMSQueryResults, int32 nResultBufSizeInBytes ) = 0; + virtual void ReleaseGMSQuery( uint64 ullGMSQuery ) = 0; + + virtual void SendGameServerPingSample( AppId_t unAppID, int32 nSamples, const PingSample_t * pSamples ) = 0; +}; + + +#endif // ICLIENTMATCHMAKING_H diff --git a/src/public SDK/IClientMatchmakingServers.h b/src/public SDK/IClientMatchmakingServers.h new file mode 100644 index 0000000..3e42bd5 --- /dev/null +++ b/src/public SDK/IClientMatchmakingServers.h @@ -0,0 +1,58 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTMATCHMAKINGSERVERS_H +#define ICLIENTMATCHMAKINGSERVERS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingServersCommon.h" + + +abstract_class IClientMatchmakingServers +{ +public: + virtual HServerListRequest RequestInternetServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual void ReleaseRequest( HServerListRequest hServerListRequest ) = 0; + virtual gameserveritem_t *GetServerDetails( HServerListRequest hServerListRequest, int iServer ) = 0; + virtual void CancelQuery( HServerListRequest hServerListRequest ) = 0; + virtual void RefreshQuery( HServerListRequest hServerListRequest ) = 0; + virtual bool IsRefreshing( HServerListRequest hServerListRequest ) = 0; + virtual int GetServerCount( HServerListRequest hServerListRequest ) = 0; + virtual void RefreshServer( HServerListRequest hServerListRequest, int iServer ) = 0; + virtual HServerQuery PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) = 0; + virtual HServerQuery PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0; + virtual HServerQuery ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0; + virtual void CancelServerQuery( HServerQuery hServerQuery ) = 0; + + virtual void _RequestXxxServerList_v001( EMatchMakingType eType, AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual gameserveritem_t *_GetServerDetails_v001( EMatchMakingType eType, int iServer ) = 0; + virtual void _CancelQuery_v001( EMatchMakingType eType ) = 0; + virtual void _RefreshQuery_v001 (EMatchMakingType eType ) = 0; + virtual bool _IsRefreshing_v001( EMatchMakingType eType ) = 0; + virtual int _GetServerCount_v001( EMatchMakingType eType ) = 0; + virtual void _RefreshServer_v001( EMatchMakingType eType, int iServer ) = 0; +}; + + +#endif // ICLIENTMATCHMAKINGSERVERS_H diff --git a/src/public SDK/IClientMusic.h b/src/public SDK/IClientMusic.h new file mode 100644 index 0000000..a553951 --- /dev/null +++ b/src/public SDK/IClientMusic.h @@ -0,0 +1,107 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTMUSIC_H +#define ICLIENTMUSIC_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MusicCommon.h" + +enum MediaController_Status +{ + // TODO: Reverse this enum +}; + +#define CLIENTMUSIC_INTERFACE_VERSION "CLIENTMUSIC_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientMusic +{ +public: + virtual bool BIsEnabled() = 0; + virtual void Enable( bool bUnk ) = 0; + virtual void EnableCrawlLogging( bool bUnk ) = 0; + virtual bool BIsPlaying() = 0; + + virtual int32 GetQueueCount() = 0; + virtual int32 GetCurrentQueueEntry() = 0; + virtual bool GetQueueEntryURI( int32 iIndex, char *, int32) = 0; + virtual bool GetQueueEntryData( int32 iIndex, char *, int32, char *, int32, char *, int32 ) = 0; + virtual void EmptyQueue() = 0; + virtual void RemoveQueueEntry( int32 iIndex, bool bUnk ) = 0; + virtual void AddAlbumToQueue( const char *, bool, bool ) = 0; + virtual void AddTrackToQueue( const char *, bool, bool, bool ) = 0; + + virtual AudioPlayback_Status GetPlaybackStatus() = 0; + + virtual void SetPlayingLooped( bool bPlayingLooped ) = 0; + virtual bool IsPlayingLooped() = 0; + virtual void SetPlayingShuffled( bool bPlayingShuffled ) = 0; + virtual bool IsPlayingShuffled() = 0; + + virtual void Play() = 0; + virtual void Pause() = 0; + virtual void Stop() = 0; + virtual void PlayPrevious() = 0; + virtual void PlayEntry( int32 ) = 0; + + virtual void SetVolume( float flVolume ) = 0; + virtual float GetVolume() = 0; + + virtual void ResetLocalLibrary() = 0; + + virtual MediaController_Status GetStatusLocalLibrary() = 0; + virtual void SaveLocalLibraryDirectorySettings() = 0; + + virtual int32 GetLocalLibraryDirectoryEntryCount() = 0; + virtual bool GetLocalLibraryDirectoryEntry( int32, char *, int32 ) = 0; + virtual void AddLocalLibraryDirectoryEntry( const char * ) = 0; + virtual void ResetLocalLibraryDirectories( bool ) = 0; + virtual bool GetDefaultLocalLibraryDirectory( char *, int32 ); + + virtual void LocalLibraryStopCrawling() = 0; + virtual void UpdateLocalLibraryDirectoriesToCrawl() = 0; + virtual bool BLocalLibraryIsCrawling() = 0; + virtual void CrawlAlbum( const char * ) = 0; + virtual void CrawlTrack( const char * ) = 0; + + virtual int32 GetLocalLibraryAlbumCount() = 0; + virtual bool GetLocalLibraryAlbumKey( int32, char *, int32 ) = 0; + + virtual bool GetLocalLibraryAlbumEntry( const char *, char *, int32, char *, int32, int32 *, bool * ) = 0; + virtual bool GetLocalLibraryAlbumTrackEntry( const char *, int32, char *, int32, int32 *, char *, int32 ) = 0; + virtual int32 GetLocalLibraryTrackCount() = 0; + virtual bool GetLocalLibraryAlbumTrackKey( const char *, int32, char *, int32 ) = 0; + virtual int32 GetLocalLibraryTrackCountForAlbum( const char * ) = 0; + virtual int32 GetLocalLibraryArtistCount() = 0; + virtual bool GetLocalLibraryArtistName( int32, char *, int32 ) = 0; + virtual int32 GetLocalLibraryAlbumCountForArtistName( const char * ) = 0; + virtual bool GetLocalLibraryArtistAlbumKey( const char *, int32, char *, int32 ) = 0; + + virtual void StartUsingSpotify() = 0; + virtual void StopUsingSpotify() = 0; + virtual MediaController_Status GetStatusSpotify() = 0; + virtual void LoginSpotify( const char *, const char * ) = 0; + virtual void ReloginSpotify() = 0; + virtual const char * GetCurrentUserSpotify() = 0; + virtual void ForgetCurrentUserSpotify() = 0; + virtual void LogoutSpotify() = 0; + virtual void DumpStatusToConsole() = 0; +}; + +#endif // ICLIENTMUSIC_H diff --git a/src/public SDK/IClientNetworkDeviceManager.h b/src/public SDK/IClientNetworkDeviceManager.h new file mode 100644 index 0000000..2ce498c --- /dev/null +++ b/src/public SDK/IClientNetworkDeviceManager.h @@ -0,0 +1,64 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTNETWORKDEVICEMANAGER_H +#define ICLIENTNETWORKDEVICEMANAGER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +enum ENetworkDeviceState +{ + // TODO : Reverse this enum +}; + +enum EWirelessSecurityFlags +{ + // TODO : Reverse this enum +}; + +struct WirelessAccessPoint_t +{ + // TODO : Reverse this struct +#ifdef _S4N_ + int m_iPadding; +#endif +}; + +#define CLIENTNETWORKDEVICEMANAGER_INTERFACE_VERSION "CLIENTNETWORKDEVICEMANAGER_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientNetworkDeviceManager +{ +public: + virtual bool IsInterfaceValid() = 0; + virtual void RefreshDevices() = 0; + virtual ENetworkDeviceState GetWirelessDeviceState() = 0; + virtual int32 GetWiredDeviceCount() = 0; + virtual ENetworkDeviceState GetWiredDeviceState( int32 ) = 0; + virtual bool IsWiredDevicePluggedIn( int32 ) = 0; + virtual bool GetActiveWirelessAccessPoint( WirelessAccessPoint_t * ) = 0; + virtual bool EnumerateWirelessAccessPoints( WirelessAccessPoint_t *, uint32, uint32 * ) = 0; + virtual EWirelessSecurityFlags GetPreferredSecurityMethod( uint32 ) = 0; + virtual bool ActivateWiredConnection( int32 ) = 0; + virtual void DeactivateWiredConnection( int32 ) = 0; + virtual bool ConnectToAccessPoint( const char *, bool, EWirelessSecurityFlags, const char * ) = 0; + virtual void DisconnectFromAccessPoint() = 0; +}; + +#endif // ICLIENTNETWORKDEVICEMANAGER_H diff --git a/src/public SDK/IClientNetworking.h b/src/public SDK/IClientNetworking.h new file mode 100644 index 0000000..9367759 --- /dev/null +++ b/src/public SDK/IClientNetworking.h @@ -0,0 +1,155 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTNETWORKING_H +#define ICLIENTNETWORKING_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for making connections and sending data between clients, +// traversing NAT's where possible +//----------------------------------------------------------------------------- +abstract_class UNSAFE_INTERFACE IClientNetworking +{ +public: + //////////////////////////////////////////////////////////////////////////////////////////// + // Session-less connection functions + // automatically establishes NAT-traversing or Relay server connections + + // Sends a P2P packet to the specified user + // UDP-like, unreliable and a max packet size of 1200 bytes + // the first packet send may be delayed as the NAT-traversal code runs + // if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t + // see EP2PSend enum above for the descriptions of the different ways of sending packets + virtual bool SendP2PPacket( CSteamID steamIDRemote, const void *pubData, uint32 cubData, EP2PSend eP2PSendType, int32 iVirtualPort ) = 0; + + // returns true if any data is available for read, and the amount of data that will need to be read + virtual bool IsP2PPacketAvailable( uint32 *pcubMsgSize, int32 iVirtualPort ) = 0; + + // reads in a packet that has been sent from another user via SendP2PPacket() + // returns the size of the message and the steamID of the user who sent it in the last two parameters + // if the buffer passed in is too small, the message will be truncated + // this call is not blocking, and will return false if no data is available + virtual bool ReadP2PPacket( void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, CSteamID *psteamIDRemote, int32 iVirtualPort ) = 0; + + // AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback + // P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet + // if you don't want to talk to the user, just ignore the request + // if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically + // this may be called multiple times for a single user + // (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request) + virtual bool AcceptP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood + // if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted + virtual bool CloseP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + virtual bool CloseP2PChannelWithUser( CSteamID steamIDRemote, int32 iVirtualPort ) = 0; + + // fills out P2PSessionState_t structure with details about the underlying connection to the user + // should only needed for debugging purposes + // returns false if no connection exists to the specified user + virtual bool GetP2PSessionState( CSteamID steamIDRemote, P2PSessionState_t *pConnectionState ) = 0; + + virtual bool AllowP2PPacketRelay( bool bAllow ) = 0; + + //////////////////////////////////////////////////////////////////////////////////////////// + // LISTEN / CONNECT style interface functions + // + // This is an older set of functions designed around the Berkeley TCP sockets model + // it's preferential that you use the above P2P functions, they're more robust + // and these older functions will be removed eventually + // + //////////////////////////////////////////////////////////////////////////////////////////// + + + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int32 nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketStatusCallback_t callback + // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int32 nVirtualPort, int32 nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int32 nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int32 *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + + // returns true to describe how the socket ended up connecting + virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; + + // max packet size, in bytes + virtual int32 GetMaxPacketSize( SNetSocket_t hSocket ) = 0; +}; + +#endif // ICLIENTNETWORKING_H diff --git a/src/public SDK/IClientProductBuilder.h b/src/public SDK/IClientProductBuilder.h new file mode 100644 index 0000000..fed177e --- /dev/null +++ b/src/public SDK/IClientProductBuilder.h @@ -0,0 +1,39 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTPRODUCTBUILDER_H +#define ICLIENTPRODUCTBUILDER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + + +// Not a typo, it seem that IClientProductBuilder's version string is really the same as IClientDepotBuilder's. +// Valid as of Steamclient beta 22nd March 2014 (1395164792) +#define CLIENTPRODUCTBUILDER_INTERFACE_VERSION "CLIENTDEPOTBUILDER_INTERFACE_VERSION001" + + +abstract_class IClientProductBuilder +{ +public: + virtual uint64 SignInstallScript( uint32, const char *, const char * ) = 0; + virtual uint64 DRMWrap( uint32, const char *, const char *, const char *, uint32 ) = 0; + virtual uint64 CEGWrap( uint32, const char *, const char *, const char * ) = 0; +}; + +#endif // ICLIENTPRODUCTBUILDER_H diff --git a/src/public SDK/IClientRemoteStorage.h b/src/public SDK/IClientRemoteStorage.h new file mode 100644 index 0000000..beb4051 --- /dev/null +++ b/src/public SDK/IClientRemoteStorage.h @@ -0,0 +1,145 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTREMOTESTORAGE_H +#define ICLIENTREMOTESTORAGE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +abstract_class UNSAFE_INTERFACE IClientRemoteStorage +{ +public: + + virtual EResult FileWrite( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 GetFileSize( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual int32 FileRead( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + + virtual bool FileForget( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + virtual bool FileDelete( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual bool FileExists( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual bool FilePersisted( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual bool SetSyncPlatforms( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual GID_t FileWriteStreamOpen( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + virtual EResult FileWriteStreamClose( GID_t hStream ) = 0; + virtual EResult FileWriteStreamCancel( GID_t hStream ) = 0; + virtual EResult FileWriteStreamWriteChunk( GID_t hStream, const void *pvData, int32 cubData ) = 0; + + virtual int32 GetFileCount( AppId_t nAppId, bool bFromExternalAPI ) = 0; + virtual const char *GetFileNameAndSize( AppId_t nAppId, int32 iFile, ERemoteStorageFileRoot *peRemoteStorageFileRoot, int32 *pnFileSizeInBytes, bool bFromExternalAPI ) = 0; + + virtual bool GetQuota( AppId_t nAppId, int32 *pnTotalBytes, int32 *pnAvailableBytes ) = 0; + + virtual bool IsCloudEnabledForAccount(); + virtual bool IsCloudEnabledForApp( AppId_t nAppId ); + virtual void SetCloudEnabledForApp( AppId_t nAppId, bool bEnable ); + + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, bool bUseNewCallback, uint32 uUnk ) = 0; // Old callback id = 1308, new callback id = 1317 + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *cszLocation, uint32 uUnk ) = 0; + + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, uint32 *puDownloadedBytes, uint32 *puTotalBytes ); + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 uOffset, EUGCReadAction eAction ) = 0; + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + virtual SteamAPICall_t PublishFile( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *cszFileName, const char *cszPreviewFileName, AppId_t nConsumerAppId , const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eType ) = 0; + virtual SteamAPICall_t PublishVideo( AppId_t nAppId, EWorkshopVideoProvider eVideoProvider, const char *cszVideoAccountName, const char *cszVideoIdentifier, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t PublishVideoFromURL( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *cszVideoURL, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + + virtual JobID_t CreatePublishedFileUpdateRequest( AppId_t nAppId, PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( JobID_t hUpdateRequest, const char *cszFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( JobID_t hUpdateRequest, const char *cszPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( JobID_t hUpdateRequest, const char *cszTitle ) = 0; + virtual bool UpdatePublishedFileDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( JobID_t hUpdateRequest, SteamParamStringArray_t *pTags ) = 0; + virtual bool UpdatePublishedFileURL( JobID_t hUpdateRequest, const char *cszURL ) = 0; + + virtual SteamAPICall_t CommitPublishedFileUpdate( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, JobID_t hUpdateRequest ) = 0; + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, bool bUseNewCallback, uint32 ) = 0; // Old callback id = 1310, new callback id = 1318 + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( AppId_t nAppId, uint32 uStartIndex, ERemoteStoragePublishedFileSortOrder eOrder ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( AppId_t nAppId, PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( AppId_t nAppId, uint32 uStartIndex, uint8 uListType, EPublishedFileInfoMatchingFileType eMatchingFileType ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( AppId_t nAppId, PublishedFileId_t unPublishedFileId ) = 0; + + virtual SteamAPICall_t SetUserPublishedFileAction( AppId_t nAppId, PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( AppId_t nAppId, EWorkshopFileAction eAction, uint32 uStartIndex ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFilesWithUpdates( AppId_t nAppId, uint32 uStartIndex, RTime32 uStartTime ) = 0; + virtual SteamAPICall_t GetCREItemVoteSummary( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( AppId_t nAppId, EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + virtual EFileRemoteStorageSyncState EGetFileSyncState( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + virtual bool BIsFileSyncing( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual EResult FilePersist( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual bool FileFetch( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile ) = 0; + + virtual bool ResolvePath( AppId_t nAppID, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchRelPath, char *pchDest, uint32 cchDest ) = 0; + + virtual EResult FileTouch( AppId_t nAppId, ERemoteStorageFileRoot eRemoteStorageFileRoot, const char *pchFile, bool ) = 0; + + virtual void SetCloudEnabledForAccount( bool bEnabled ); + + virtual void LoadLocalFileInfoCache( AppId_t nAppId ) = 0; + + virtual void EvaluateRemoteStorageSyncState( AppId_t nAppId ) = 0; + virtual ERemoteStorageSyncState GetRemoteStorageSyncState( AppId_t nAppId ) = 0; + + virtual bool HaveLatestFilesLocally( AppId_t nAppId ) = 0; + + virtual bool GetConflictingFileTimestamps( AppId_t nAppId, RTime32* pnTimestampLocal, RTime32* pnTimestampRemote ) = 0; + virtual bool ResolveSyncConflict( AppId_t nAppId, bool bAcceptLocalFiles ) = 0; + + virtual bool SynchronizeApp( AppId_t nAppId, bool bSyncClient, bool bSyncServer ) = 0; + virtual bool IsAppSyncInProgress( AppId_t nAppId ) = 0; + + virtual void RunAutoCloudOnAppLaunch( AppId_t nAppId ) = 0; + virtual void RunAutoCloudOnAppExit( AppId_t nAppId ) = 0; + + virtual bool ResetFileRequestState( AppId_t nAppId ) = 0; + + virtual void ClearPublishFileUpdateRequests( AppId_t nAppId ) = 0; + + virtual int32 GetSubscribedFileDownloadCount() = 0; + virtual bool BGetSubscribedFileDownloadInfo( int32 iFile, PublishedFileId_t* punPublishedFileId, uint32 *puBytesDownloaded, uint32 *puBytesExpected, AppId_t* pnAppId ) = 0; + virtual bool BGetSubscribedFileDownloadInfo( PublishedFileId_t unPublishedFileId, uint32 *puBytesDownloaded, uint32 *puBytesExpected, AppId_t* pnAppId ) = 0; + virtual void PauseSubscribedFileDownloadsForApp( AppId_t nAppId ) = 0; + virtual void ResumeSubscribedFileDownloadsForApp( AppId_t nAppId ) = 0; + virtual void PauseAllSubscribedFileDownloads() = 0; + virtual void ResumeAllSubscribedFileDownloads() = 0; + virtual void OnAppLifetime( AppId_t nAppId, bool bUnk ) = 0; +}; + +#endif // ICLIENTREMOTESTORAGE_H diff --git a/src/public SDK/IClientScreenshots.h b/src/public SDK/IClientScreenshots.h new file mode 100644 index 0000000..93b318a --- /dev/null +++ b/src/public SDK/IClientScreenshots.h @@ -0,0 +1,72 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTSCREENSHOTS_H +#define ICLIENTSCREENSHOTS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ScreenshotsCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientScreenshots +{ +public: + virtual const char *GetShortcutDisplayName( CGameID gameID ) = 0; + virtual void SetShortcutDisplayName( CGameID, const char *cszName ) = 0; + + virtual ScreenshotHandle WriteScreenshot( CGameID gameID, const uint8 *pubRGBData, uint32 uRGBDataSize, int32 iWidth, int32 iHeight ) = 0; + virtual ScreenshotHandle AddScreenshotToLibrary( CGameID gameID, const char *cszScreenshotPath, const char *cszThumbnailPath, int32 iWidth, int32 iHeight ) = 0; + + virtual void TriggerScreenshot( CGameID gameID ) = 0; + virtual void RequestScreenshotFromGame( AppId_t nAppId ) = 0; + + virtual bool SetLocation( CGameID gameID, ScreenshotHandle hScreenshot, const char *cszLocation ) = 0; + virtual bool TagUser( CGameID gameID, ScreenshotHandle hScreenshot, CSteamID userID ) = 0; + virtual bool TagPublishedFile( CGameID gameID, ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileId ) = 0; + + virtual bool ResolvePath( CGameID gameID, ScreenshotHandle hScreenshot, bool bUnk, char *szResolvedPath, uint32 cubResolvedPath ) = 0; + virtual uint32 GetSizeOnDisk( CGameID gameID, ScreenshotHandle hScreenshot ) = 0; + virtual uint32 GetSizeInCloud( CGameID gameID, ScreenshotHandle hScreenshot ) = 0; + virtual bool IsPersisted( CGameID gameID, ScreenshotHandle hScreenshot ) = 0; + + virtual int32 GetNumGamesWithLocalScreenshots() = 0; + STEAMWORKS_STRUCT_RETURN_1(CGameID, GetGameWithLocalScreenshots, int32, iGameIndex) /*virtual CGameID GetGameWithLocalScreenshots( int32 iGameIndex ) = 0;*/ + + virtual int32 GetLocalScreenshotCount( CGameID gameID ) = 0; + virtual bool GetLocalScreenshot( CGameID gameID, int32 iScreenshotIndex, ScreenshotHandle* phScreenshot, int32 *piWidth, int32 *piHeight, uint32 *puTimestamp, EUCMFilePrivacyState *pePrivacy, uint64* pullFileID, char *pchCaption, uint32 cubCaption, bool *pbSpoiler ) = 0; + virtual bool SetLocalScreenshotCaption( CGameID gameID, ScreenshotHandle hScreenshot, const char *cszCaption ) = 0; + virtual bool SetLocalScreenshotPrivacy( CGameID gameID, ScreenshotHandle hScreenshot, EUCMFilePrivacyState ePrivacy ) = 0; + virtual bool SetLocalScreenshotSpoiler( CGameID, ScreenshotHandle hScreenshot, bool bSpoiler ) = 0; + + virtual bool StartBatch( CGameID gameID ) = 0; + virtual bool AddToBatch( ScreenshotHandle hScreenshot ) = 0; + virtual SteamAPICall_t UploadBatch( EUCMFilePrivacyState ePrivacy ) = 0; + virtual SteamAPICall_t DeleteBatch( bool bDeleteFromCloud ) = 0; + virtual bool CancelBatch() = 0; + + virtual void RecoverOldScreenshots() = 0; + virtual uint32 GetTaggedUserCount( CGameID gameID, ScreenshotHandle hScreenshot ) = 0; + STEAMWORKS_STRUCT_RETURN_3(CSteamID, GetTaggedUser, CGameID, gameID, ScreenshotHandle, hScreenshot, int32, iUserIndex) /*virtual CSteamID GetTaggedUser( CGameID gameID, ScreenshotHandle hScreenshot, int32 iUserIndex ) = 0;*/ + virtual bool GetLocation( CGameID gameID, ScreenshotHandle hScreenshot, char *pchLocation, uint32 cubLocation ) = 0; + + virtual uint32 GetTaggedPublishedFileCount( CGameID gameID, ScreenshotHandle hScreenshot ) = 0; + virtual PublishedFileId_t GetTaggedPublishedFile( CGameID gameID, ScreenshotHandle hScreenshot, int32 iPublishedFileIndex ) = 0; +}; + +#endif // ICLIENTSCREENSHOTS_H diff --git a/src/public SDK/IClientShortcuts.h b/src/public SDK/IClientShortcuts.h new file mode 100644 index 0000000..5d42c00 --- /dev/null +++ b/src/public SDK/IClientShortcuts.h @@ -0,0 +1,59 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTSHORTCUTS_H +#define ICLIENTSHORTCUTS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#define CLIENTSHORTCUTS_INTERFACE_VERSION "CLIENTSHORTCUTS_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientShortcuts +{ +public: + virtual uint32 GetUniqueLocalAppId() = 0; + virtual CGameID GetGameIDForAppID( AppId_t unAppID ) = 0; + virtual uint32 GetAppIDForGameID( CGameID gameID ) = 0; + virtual uint32 GetShortcutCount() = 0; + virtual uint32 GetShortcutAppIDByIndex( uint32 uIndex ) = 0; + virtual const char * GetShortcutAppNameByIndex( uint32 uIndex ) = 0; + virtual const char * GetShortcutExeByIndex( uint32 uIndex ) = 0; + virtual uint32 GetShortcutUserTagCountByIndex( uint32 uIndex ) = 0; + virtual const char * GetShortcutUserTagByIndex( uint32 uIndex, uint32 ) = 0; + virtual bool BIsShortcutRemoteByIndex( uint32 uIndex ) = 0; + virtual const char * GetShortcutAppNameByAppID( AppId_t unAppID ) = 0; + virtual const char * GetShortcutExeByAppID( AppId_t unAppID ) = 0; + virtual const char * GetShortcutStartDirByAppID( AppId_t unAppID ) = 0; + virtual const char * GetShortcutIconByAppID( AppId_t unAppID ) = 0; + virtual uint32 GetShortcutUserTagCountByAppID( AppId_t unAppID ) = 0; + virtual const char * GetShortcutUserTagByAppID( AppId_t unAppID, uint32 ) = 0; + virtual bool BIsShortcutRemoteByAppID( AppId_t unAppID ) = 0; + virtual uint32 AddShortcut( const char *, const char *, const char * ) = 0; + virtual void SetShortcutFromFullpath( uint32, const char * ) = 0; + virtual void SetShortcutAppName( uint32, const char * ) = 0; + virtual void SetShortcutExe( uint32, const char * ) = 0; + virtual void SetShortcutStartDir( uint32, const char * ) = 0; + virtual void SetShortcutIcon( uint32, const char * ) = 0; + virtual void ClearShortcutUserTags( uint32 ) = 0; + virtual void AddShortcutUserTag( uint32, const char * ) = 0; + virtual void RemoveShortcut( uint32 ) = 0; + virtual bool LaunchShortcut( uint32 ) = 0; +}; + +#endif // ICLIENTSHORTCUTS_H diff --git a/src/public SDK/IClientStreamClient.h b/src/public SDK/IClientStreamClient.h new file mode 100644 index 0000000..75d8c19 --- /dev/null +++ b/src/public SDK/IClientStreamClient.h @@ -0,0 +1,40 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTSTREAMCLIENT_H +#define ICLIENTSTREAMCLIENT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#define CLIENTSTREAMCLIENT_INTERFACE_VERSION "CLIENTSTREAMCLIENT_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientStreamClient +{ +public: + virtual void Launched( CGameID gameID ) = 0; + virtual void FocusGained( CGameID gameID, bool ) = 0; + virtual void FocusLost( CGameID gameID ) = 0; + virtual void Finished( CGameID gameID, EResult eResult ) = 0; + virtual const char * GetSystemInfo() = 0; + virtual void StartStreamingSession( CGameID gameID ) = 0; + virtual void ReportStreamingSessionEvent( CGameID gameID, const char * ) = 0; + virtual void FinishStreamingSession( CGameID gameID, const char *, const char * ) = 0; +}; + +#endif // ICLIENTSTREAMCLIENT_H diff --git a/src/public SDK/IClientStreamLauncher.h b/src/public SDK/IClientStreamLauncher.h new file mode 100644 index 0000000..8a060fb --- /dev/null +++ b/src/public SDK/IClientStreamLauncher.h @@ -0,0 +1,33 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTSTREAMLAUNCHER_H +#define ICLIENTSTREAMLAUNCHER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "StreamLauncherCommon.h" + +abstract_class UNSAFE_INTERFACE IClientStreamLauncher +{ +public: + virtual EStreamLauncherResult StartStreaming( const char *cszFilePath ) = 0; + virtual void StopStreaming() = 0; +}; + +#endif // ICLIENTSTREAMLAUNCHER_H diff --git a/src/public SDK/IClientUGC.h b/src/public SDK/IClientUGC.h new file mode 100644 index 0000000..f8d7150 --- /dev/null +++ b/src/public SDK/IClientUGC.h @@ -0,0 +1,66 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTUGC_H +#define ICLIENTUGC_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" +#include "RemoteStorageCommon.h" + +#define CLIENTUGC_INTERFACE_VERSION "CLIENTUGC_INTERFACE_VERSION001" + +abstract_class UNSAFE_INTERFACE IClientUGC +{ +public: + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 ) = 0; + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID ) = 0; + virtual uint64 CreateItem( uint32, EWorkshopFileType ) = 0; + virtual uint64 UploadItemContent( uint64, const char * ) = 0; + virtual uint64 UploadItemPreview( uint64, const char * ) = 0; + virtual uint64 StartItemUpdate( uint32, uint64 ) = 0; + virtual bool SetItemTitle( uint64, const char * ) = 0; + virtual bool SetItemChangeDescription( uint64, const char * ) = 0; + virtual bool SetItemDescription( uint64, const char * ) = 0; + virtual bool SetItemVisibility( uint64, ERemoteStoragePublishedFileVisibility ) = 0; + virtual bool SetItemTags( uint64, SteamParamStringArray_t const* ) = 0; + virtual bool SetItemContent( uint64, uint64 ) = 0; + virtual bool SetItemPreview( uint64, uint64 ) = 0; + virtual uint64 CommitItemUpdate( uint64 ) = 0; + virtual uint64 SubscribeItem( uint32, uint64 ) = 0; + virtual uint64 UnsubscribeItem( uint32, uint64 ) = 0; + virtual uint32 GetNumSubscribedItems( uint32 ) = 0; + virtual uint32 GetSubscribedItems( uint32, uint64 *, uint32 ) = 0; + virtual bool GetSubscribedItemInfo( uint32, uint64, char *, int32, char *, int32, EWorkshopFileType *, bool *, char *, int32, uint64 * ) = 0; + }; + +#endif // ICLIENTUGC_H diff --git a/src/public SDK/IClientUnifiedMessages.h b/src/public SDK/IClientUnifiedMessages.h new file mode 100644 index 0000000..fc8d61c --- /dev/null +++ b/src/public SDK/IClientUnifiedMessages.h @@ -0,0 +1,37 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTUNIFIEDMESSAGES_H +#define ICLIENTUNIFIEDMESSAGES_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UnifiedMessagesCommon.h" + +abstract_class UNSAFE_INTERFACE IClientUnifiedMessages +{ +public: + virtual uint64 SendMethod( const char *, const void *, uint32, uint64 ) = 0; + virtual bool GetMethodResponseInfo( uint64, uint32 *, EResult * ) = 0; + virtual bool GetMethodResponseData( uint64, void *, uint32, bool ) = 0; + virtual bool ReleaseMethod( uint64 ) = 0; + virtual bool SendNotification( const char *, const void *, uint32 ) = 0; +}; + +#endif // ICLIENTUNIFIEDMESSAGES_H + diff --git a/src/public SDK/IClientUser.h b/src/public SDK/IClientUser.h new file mode 100644 index 0000000..d4a4163 --- /dev/null +++ b/src/public SDK/IClientUser.h @@ -0,0 +1,329 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTUSER_H +#define ICLIENTUSER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" +#include "ContentServerCommon.h" + +// Protobuf'ed class +class ClientAppInfo +#ifdef _S4N_ +{ + int m_iPadding; +} +#endif +; + +abstract_class UNSAFE_INTERFACE IClientUser +{ +public: + virtual HSteamUser GetHSteamUser() = 0; + + virtual void LogOn( bool bInteractive, CSteamID steamID ) = 0; + virtual void LogOnWithPassword( bool bInteractive, const char * pchLogin, const char * pchPassword ) = 0; + virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0; + virtual void LogOff() = 0; + virtual bool BLoggedOn() = 0; + virtual ELogonState GetLogonState() = 0; + virtual bool BConnected() = 0; + virtual bool BTryingToLogin() = 0; + + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetConsoleSteamID) /*virtual CSteamID GetConsoleSteamID() = 0;*/ + + virtual bool IsVACBanned( AppId_t nGameID ) = 0; + virtual bool RequireShowVACBannedMessage( AppId_t nAppID ) = 0; + virtual void AcknowledgeVACBanning( AppId_t nAppID ) = 0; + + virtual void SetSteam2Ticket( uint8* pubTicket, int32 cubTicket ) = 0; + + virtual bool BExistsSteam2Ticket() = 0; + + virtual bool SetEmail( const char *pchEmail ) = 0; + + virtual bool SetConfigString( ERegistrySubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0; + virtual bool GetConfigString( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchValue, int32 cbValue ) = 0; + virtual bool SetConfigInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int32 iValue ) = 0; + virtual bool GetConfigInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int32 *pValue ) = 0; + + virtual bool GetConfigStoreKeyName( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchStoreName, int32 cbStoreName ) = 0; + + virtual int32 InitiateGameConnection( void *pOutputBlob, int32 cbBlobMax, CSteamID steamIDGS, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + virtual int32 InitiateGameConnectionOld( void *pOutputBlob, int32 cbBlobMax, CSteamID steamIDGS, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int32 cbSteam2GetEncryptionKey ) = 0; + + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + virtual void SetSelfAsPrimaryChatDestination() = 0; + virtual bool IsPrimaryChatDestination() = 0; + + virtual void RequestLegacyCDKey( AppId_t iAppID ) = 0; + + virtual bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending ) = 0; + virtual bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending ) = 0; + + virtual bool AckGuestPass( const char *pchGuestPassCode ) = 0; + virtual bool RedeemGuestPass( const char *pchGuestPassCode ) = 0; + + virtual uint32 GetGuestPassToGiveCount() = 0; + virtual uint32 GetGuestPassToRedeemCount() = 0; + virtual uint32 GetGuestPassLastUpdateTime() = 0; + + virtual bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed, char* pchRecipientAddress, int32 cRecipientAddressSize ) = 0; + virtual bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed ) = 0; + virtual bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int32 cSenderAddressSize ) = 0; + virtual bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int32 cSenderNameSize ) = 0; + + virtual bool RequestGuestPassTargetList( GID_t gidGuestPassID ) = 0; + + virtual bool RequestGiftTargetList( PackageId_t nPackageID ) = 0; + + virtual void AcknowledgeMessageByGID( const char *pchMessageGID ) = 0; + + virtual bool SetLanguage( const char *pchLanguage ) = 0; + + virtual void TrackAppUsageEvent( CGameID gameID, int32 eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + virtual int32 RaiseConnectionPriority( EConnectionPriority eConnectionPriority ) = 0; + virtual void ResetConnectionPriority( int32 hRaiseConnectionPriorityPrev ) = 0; + + virtual void SetAccountNameFromSteam2( const char *pchAccountName ) = 0; + virtual bool SetPasswordFromSteam2( const char *pchPassword ) = 0; + + virtual bool SetAccountNameForCachedCredentialLogin( const char *pchAccountName, bool bUnk ) = 0; + virtual void SetLoginInformation( const char *pchAccountName, const char *pchPassword, bool bRememberPassword ) = 0; + virtual void SetLauncherType( ELauncherType eLauncherType ) = 0; + virtual void ClearAllLoginInformation() = 0; + + virtual void SetAccountCreationTime( RTime32 rtime32Time ) = 0; + + virtual SteamAPICall_t RequestWebAuthToken() = 0; + virtual bool GetCurrentWebAuthToken( char *pchBuffer, int32 cubBuffer ) = 0; + + virtual bool GetLanguage( char* pchLanguage, int32 cbLanguage ) = 0; + + virtual bool BIsCyberCafe() = 0; + virtual bool BIsAcademicAccount() = 0; + + virtual void CreateAccount( const char *pchAccountName, const char *pchNewPassword, const char *pchNewEmail, int32 iQuestion, const char *pchNewQuestion, const char *pchNewAnswer ) = 0; + + virtual SteamAPICall_t ResetPassword( const char *pchAccountName, const char *pchOldPassword, const char *pchNewPassword, const char *pchValidationCode, const char *pchAnswer ) = 0; + + virtual void TrackNatTraversalStat( const CNatTraversalStat *pNatStat ) = 0; + + virtual PackageId_t GetPackageIDForGuestPassToRedeemByGID( GID_t gid ) = 0; + + virtual void TrackSteamUsageEvent( ESteamUsageEvent eSteamUsageEvent, const uint8 *pubKV, uint32 cubKV ) = 0; + virtual void TrackSteamGUIUsage( const char * ) = 0; + + virtual void SetComputerInUse() = 0; + + virtual bool BIsGameRunning( CGameID gameID ) = 0; + + + virtual uint64 GetCurrentSessionToken() = 0; + + virtual bool BUpdateAppOwnershipTicket( AppId_t nAppID, bool bOnlyUpdateIfStale, bool bIsDepot ) = 0; + + virtual bool RequestCustomBinary( const char *pszAbsolutePath, AppId_t nAppID, bool bForceUpdate, bool bAppLaunchRequest ) = 0; + virtual EResult GetCustomBinariesState( AppId_t unAppID, uint32 *punProgress ) = 0; + virtual EResult RequestCustomBinaries( AppId_t unAppID, bool, bool, uint32 * ) = 0; + + virtual void SetCellID( CellID_t cellID ) = 0; + virtual void SetWinningPingTimeForCellID( uint32 uPing ) = 0; + + virtual const char *GetUserBaseFolder() = 0; + + virtual bool GetUserDataFolder( CGameID gameID, char* pchBuffer, int32 cubBuffer ) = 0; + virtual bool GetUserConfigFolder( char *pchBuffer, int32 cubBuffer ) = 0; + + virtual bool GetAccountName( char* pchAccountName, uint32 cb ) = 0; + virtual bool IsPasswordRemembered() = 0; + + virtual bool RequiresLegacyCDKey( AppId_t nAppID ) = 0; + virtual bool GetLegacyCDKey( AppId_t nAppID, char* pchKeyData, int32 cbKeyData ) = 0; + virtual bool HasLegacyCDKey( AppId_t nAppID ) = 0; + virtual bool SetLegacyCDKey( AppId_t nAppID, const char* pchKeyData ) = 0; + virtual void RemoveLegacyCDKey( AppId_t nAppID ) = 0; + virtual void RequestLegacyCDKeyFromApp( AppId_t nMainAppID, AppId_t nDLCAppID ) = 0; + + virtual bool BIsAnyGameRunning() = 0; + + virtual void TestAvailablePassword( const uint8 *pubDigestPassword, int32 cubDigestPassword ) = 0; + virtual void GetSteamGuardDetails() = 0; + + virtual void ChangePassword( const char *pchOldPassword, const char *pchNewPassword ) = 0; + virtual void ChangeEmail( const char *, const char *pchEmail ) = 0; + virtual void ChangeSecretQuestionAndAnswer( const char *, int32 iQuestion, const char *pchNewQuestion, const char *pchNewAnswer ) = 0; + + virtual void SetSteam2FullASTicket( uint8* pubTicket, int32 cubTicket ) = 0; + virtual int32 GetSteam2FullASTicket( uint8* pubTicket, int32 cubTicket ) = 0; + + virtual bool GetEmail( char* pchEmail, int32 cchEmail, bool* pbValidated ) = 0; + + virtual void RequestForgottenPasswordEmail( const char *pchAccountName, const char *pchTriedPassword ) = 0; + + virtual void FindAccountsByEmailAddress( const char *pchEmailAddress ) = 0; + virtual void FindAccountsByCdKey( const char *pchCdKey ) = 0; + virtual void GetNumAccountsWithEmailAddress( const char * pchEmailAddress ) = 0; + virtual void IsAccountNameInUse( const char * pchAccountName ) = 0; + + virtual void Test_FakeConnectionTimeout() = 0; + + virtual bool RunInstallScript( AppId_t *pAppIDs, int32 cAppIDs, const char *pchInstallPath, const char *pchLanguage, bool bUninstall ) = 0; + + virtual AppId_t IsInstallScriptRunning() = 0; + + virtual bool GetInstallScriptState( char* pchDescription, uint32 cchDescription, uint32* punNumSteps, uint32* punCurrStep ) = 0; + + virtual bool SpawnProcess( void *lpVACBlob, uint32 cbBlobSize, const char *lpApplicationName, const char *lpCommandLine, uint32 dwCreationFlags, const char *lpCurrentDirectory, CGameID gameID, AppId_t nAppID, const char *pchGameName, bool bAlwaysUseShellExec ) = 0; + + virtual uint32 GetAppOwnershipTicketLength( uint32 nAppID ) = 0; + virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength ) = 0; + + virtual uint32 GetAppOwnershipTicketExtendedData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32* piAppId, uint32* piSteamId, uint32* piSignature, uint32* pcbSignature ) = 0; + + virtual int32 GetMarketingMessageCount() = 0; + virtual bool GetMarketingMessage( int32 cMarketingMessage, GID_t* gidMarketingMessageID, char* pubMsgUrl, int32 cubMessageUrl, EMarketingMessageFlags *eMarketingMssageFlags ) = 0; + + virtual HAuthTicket GetAuthSessionTicket( void *pMyAuthTicket, int32 cbMaxMyAuthTicket, uint32* pcbAuthTicket ) = 0; + + virtual EBeginAuthSessionResult BeginAuthSession( void const* pTheirAuthTicket, int32 cbTicket, CSteamID steamID ) = 0; + virtual void EndAuthSession( CSteamID steamID ) = 0; + + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + virtual EUserHasLicenseForAppResult IsUserSubscribedAppInTicket( CSteamID steamID, AppId_t appID ) = 0; + + virtual void AdvertiseGame( CGameID gameID, CSteamID steamIDGameServer, uint32 unIPServer , uint16 usPortServer ) = 0; + + virtual SteamAPICall_t RequestEncryptedAppTicket( const void *pUserData, int32 cbUserData ) = 0; + virtual bool GetEncryptedAppTicket( void *pTicket, int32 cbMaxTicket, uint32 *pcbTicket ) = 0; + + virtual void SetAccountLimited( bool bAccountLimited ) = 0; + virtual bool BIsAccountLimited() = 0; + + virtual void SetAccountCommunityBanned( bool bBanned ) = 0; + virtual bool BIsAccountCommunityBanned() = 0; + + virtual void SendValidationEmail() = 0; + virtual bool BGameConnectTokensAvailable() = 0; + + virtual int32 NumGamesRunning() = 0; + STEAMWORKS_STRUCT_RETURN_1(CGameID, GetRunningGameID, int32, iGame) /*virtual CGameID GetRunningGameID( int32 iGame ) = 0;*/ + + virtual uint32 GetAccountSecurityPolicyFlags() = 0; + + virtual void RequestChangeEmail( const char *pchPassword, int32 eRequestType ) = 0; + virtual void ChangePasswordWithCode( const char *pchOldPassword, const char *pchCode, const char *pchNewPassword ) = 0; + virtual void ChangeEmailWithCode( const char *pchPassword, const char *pchCode, const char *pchEmail, bool bFinal ) = 0; + virtual void ChangeSecretQuestionAndAnswerWithCode( const char *pchPassword, const char *pchCode, const char *pchNewQuestion, const char *pchNewAnswer ) = 0; + + virtual void SetClientStat( EClientStat eStat, int64 llValue, AppId_t nAppID, DepotId_t nDepotID, CellID_t nCellID ) = 0; + + virtual void VerifyPassword( const char *pchPassword ) = 0; + + virtual bool BSupportUser() = 0; + + virtual bool BIsAppOverlayEnabled( AppId_t nAppID ) = 0; + + virtual bool BIsBehindNAT() = 0; + + virtual AppId_t GetMicroTxnAppID( GID_t gidTransID ) = 0; + virtual uint64 GetMicroTxnOrderID( GID_t gidTransID ) = 0; + + virtual bool BGetMicroTxnPrice( GID_t gidTransID, CAmount *pamtTotal, CAmount *pamtTax, bool *pbVat ) = 0; + + virtual int32 GetMicroTxnLineItemCount( GID_t gidTransID ) = 0; + + virtual bool BGetMicroTxnLineItem( GID_t gidTransID, uint32 unLineItem, CAmount *pamt, uint32 *punQuantity, char *pchDescription, uint32 cubDescriptionLength, int32 *pRecurringTimeUnit, uint8 *pRecurringFrequency, CAmount *pRecurringAmount, bool * pbUnk ) = 0; + + virtual bool BIsSandboxMicroTxn( GID_t gidTransID, bool* pbSandbox ) = 0; + + virtual bool BMicroTxnRequiresCachedPmtMethod( GID_t gidTransID, bool *pbRequired ) = 0; + + virtual SteamAPICall_t AuthorizeMicroTxn( GID_t gidTransID, EMicroTxnAuthResponse eMicroTxnAuthResponse ) = 0; + + virtual bool BGetWalletBalance( bool *pbHasWallet, CAmount *pamtBalance ) = 0; + + virtual SteamAPICall_t RequestMicroTxnInfo( GID_t gidTransID ) = 0; + + virtual bool BGetAppMinutesPlayed( AppId_t nAppId, int32 *pnForever, int32 *pnLastTwoWeeks ) = 0; + virtual uint32 GetAppLastPlayedTime( AppId_t nAppId ) = 0; + + virtual bool BGetGuideURL( AppId_t uAppID, char *pchURL, uint32 cchURL ) = 0; + + virtual void GetClientAppListResponse_AddApp( const ClientAppInfo * pClientAppInfo ) = 0; + virtual void GetClientAppListResponse_AddDLC( AppId_t nAppId, bool bInstalled ) = 0; + virtual void GetClientAppListResponse_Done( uint64 ulBytesFreeOnDrive ) = 0; + virtual void PostUIResultToClientJob( uint64 ulJobID, EResult eResult ) = 0; + + virtual bool BPromptToVerifyEmail() = 0; + virtual bool BPromptToChangePassword() = 0; + virtual bool BAccountLocked() = 0; + virtual bool BAccountShouldShowLockUI() = 0; + virtual bool BAccountLockedByIPT() = 0; + virtual int32 GetCountAuthedComputers() = 0; + + virtual ESteamGuardProvider GetSteamGuardProvider() = 0; + virtual bool GetSteamGuardRequireCodeByDefault() = 0; + virtual bool ShowSteamGuardProviderOptions() = 0; + virtual bool SteamGuardProviderMobileIsOption() = 0; + + virtual bool BSteamGuardNewMachineNotification() = 0; + virtual RTime32 GetSteamGuardEnabledTime() = 0; + virtual bool GetSteamGuardHistoryEntry( int32 iEntryIndex, RTime32 *puTimestamp, uint32 *puIP, bool *pbIsRemembered, char *pchGeolocInfo, int32 cchGeolocInfo ) = 0; + virtual void SetSteamGuardNewMachineDialogResponse( bool bIsApproved, bool bIsWizardComplete ) = 0; + + virtual bool BAccountCanUseIPT() = 0; + virtual void ChangeTwoFactorAuthOptions( int32 eOption ) = 0; + virtual void ChangeSteamGuardOptions( ESteamGuardProvider eProvider, bool bRequireCode ) = 0; + virtual void Set2ndFactorAuthCode( const char* pchAuthCode, bool bDontRememberComputer ) = 0; + virtual bool BAccountHasIPTConfig() = 0; + + virtual bool GetEmailDomainFromLogonFailure( char * pchEmailDomain, int32 cbEmailDomain ) = 0; + + virtual bool BIsSubscribedApp( AppId_t nAppId ) = 0; + virtual SteamAPICall_t RegisterActivationCode( const char * pchActivationCode ) = 0; + + virtual void OptionalDLCInstallation( AppId_t nAppID, bool bInstall ) = 0; + + virtual void AckSystemIM( uint64 ) = 0; + + // Result returned by RequestSpecialSurveyResult_t callback + virtual SteamAPICall_t RequestSpecialSurvey( uint32 uSurveyId ) = 0; + // Result returned by SendSpecialSurveyResponseResult_t callback + virtual SteamAPICall_t SendSpecialSurveyResponse( uint32 uSurveyId, const uint8 * pubData, uint32 cubData ) = 0; + + virtual void RequestNotifications() = 0; + + virtual bool GetAppOwnershipInfo( AppId_t unAppId, RTime32* pRTime32Created, char* pchCountry ) = 0; // Use a 3 bytes buffer for the country + + virtual void SendGameWebCallback( AppId_t unAppId, const char *szData ) = 0; + + virtual bool BIsCurrentlyStreaming() = 0; + virtual void RequestStopStreaming() = 0; + virtual void OnBigPictureStreamingResult( bool, void * ) = 0; + virtual void OnBigPictureStreamingDone() = 0; + virtual void OnBigPictureStreamRestarting() = 0; +}; + +#endif // ICLIENTUSER_H diff --git a/src/public SDK/IClientUserStats.h b/src/public SDK/IClientUserStats.h new file mode 100644 index 0000000..4592a40 --- /dev/null +++ b/src/public SDK/IClientUserStats.h @@ -0,0 +1,221 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTUSERSTATS_H +#define ICLIENTUSERSTATS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + + +abstract_class UNSAFE_INTERFACE IClientUserStats +{ +public: + // The "schema" of a Game's UserData is really defined elsewhere, and + // the game should know it before accessing this interface. These top + // three functions are mostly provided for iteration / testing purposes. + // Get the number of stats fields for nGameID + virtual uint32 GetNumStats( CGameID nGameID ) = 0; + // Get stat name iStat in [0, GetNumStats) + virtual const char * GetStatName( CGameID nGameID, uint32 iStat ) = 0; + // Get type of this field + virtual ESteamUserStatType GetStatType( CGameID nGameID, const char *pchName ) = 0; + // Get the number of achievements for nGameID + virtual uint32 GetNumAchievements( CGameID nGameID ) = 0; + // Get achievement name iAchievement in [0, GetNumAchievements) + virtual const char * GetAchievementName( CGameID nGameID, uint32 iAchievement ) = 0; + + // Ask the server to send down this user's data and achievements for nGameID + virtual bool RequestCurrentStats( CGameID nGameID ) = 0; + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; +#else + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; +#else + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; +#endif + virtual bool UpdateAvgRateStat( CGameID nGameID, const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + virtual bool SetAchievement( CGameID nGameID, const char *pchName ) = 0; + virtual bool ClearAchievement( CGameID nGameID, const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats( CGameID nGameID ) = 0; + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA( ), or 0 if none set + virtual int32 GetAchievementIcon( CGameID nGameID, const char *pchName, EGetAchievementIcon ) = 0; + // Get general attributes ( display name / text, etc) for an Achievement + virtual const char * GetAchievementDisplayAttribute( CGameID nGameID, const char *pchName, const char *pchKey, bool bUseGameLanguage ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( CGameID nGameID, const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + virtual void SetMaxStatsLoaded( uint32 uMax ) = 0; + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats( ) again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser, CGameID nGameID ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats( ) +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetUserStat( CSteamID steamIDUser, CGameID nGameID, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, CGameID nGameID, const char *pchName, float *pData ) = 0; +#else + virtual bool GetUserStat( CSteamID steamIDUser, CGameID nGameID, const char *pchName, float *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, CGameID nGameID, const char *pchName, int32 *pData ) = 0; +#endif + virtual bool GetUserAchievement( CSteamID steamIDUser, CGameID nGameID, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( CGameID nGameID, bool bAchievementsToo ) = 0; + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char * GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int32 GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries( ) ( below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int32 nRangeStart, int32 nRangeEnd ) = 0; + + // as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers + // if a user doesn't have a leaderboard entry, they won't be included in the result + // a max of 100 users can be downloaded at a time, with only one outstanding call at a time + virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, CSteamID *prgUsers, int32 cUsers ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int32 index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int32 index, LeaderboardEntry_t *pLeaderboardEntry, int32 pDetails[], int32 cDetailsMax ) = 0; + + // Attaches a piece of user generated content the user's entry on a leaderboard. + // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). + // This call is asynchronous, with the result returned in LeaderboardUGCSet_t. + virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // If the score passed in is no better than the existing score this user has in the leaderboard, then the leaderboard will not be updated. + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int32 cScoreDetailsCount ) = 0; + + // Retrieves the number of players currently playing your game ( online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; + + virtual uint32 GetNumAchievedAchievements( CGameID nGameID ) = 0; + virtual const char * GetLastAchievementUnlocked( CGameID nGameID ) = 0; + + // Requests that Steam fetch data on the percentage of players who have received each achievement + // for the game globally. + // This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t. + virtual SteamAPICall_t RequestGlobalAchievementPercentages( CGameID nGameID ) = 0; + + // Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch + // the next most achieved afterwards. Will return -1 if there is no data on achievement + // percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback). + virtual int32 GetMostAchievedAchievementInfo( CGameID nGameID, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another + // GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last + // achievement has been iterated. + virtual int32 GetNextMostAchievedAchievementInfo( CGameID nGameID, int32 iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Returns the percentage of users who have achieved the specified achievement. + virtual bool GetAchievementAchievedPercent( CGameID nGameID, const char *pchName, float *pflPercent ) = 0; + + // Requests global stats data, which is available for stats marked as "aggregated". + // This call is asynchronous, with the results returned in GlobalStatsReceived_t. + // nHistoryDays specifies how many days of day-by-day history to retrieve in addition + // to the overall totals. The limit is 60. + virtual SteamAPICall_t RequestGlobalStats( CGameID nGameID, int32 nHistoryDays ) = 0; + + // Gets the lifetime totals for an aggregated stat +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetGlobalStat( CGameID nGameID, char const* pchName, int64 *pData ) = 0; + virtual bool GetGlobalStat( CGameID nGameID, char const* pchName, double *pData ) = 0; +#else + virtual bool GetGlobalStat( CGameID nGameID, char const* pchName, double *pData ) = 0; + virtual bool GetGlobalStat( CGameID nGameID, char const* pchName, int64 *pData ) = 0; +#endif + + // Gets history for an aggregated stat. pData will be filled with daily values, starting with today. + // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, + // etc. cubData is the size in bytes of the pubData buffer. Returns the number of + // elements actually set. +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual int32 GetGlobalStatHistory( CGameID nGameID, char const* pchName, int64 *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( CGameID nGameID, char const* pchName, double *pData, uint32 cubData ) = 0; +#else + virtual int32 GetGlobalStatHistory( CGameID nGameID, char const* pchName, double *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( CGameID nGameID, char const* pchName, int64 *pData, uint32 cubData ) = 0; +#endif +}; + +#endif // ICLIENTUSERSTATS_H diff --git a/src/public SDK/IClientUtils.h b/src/public SDK/IClientUtils.h new file mode 100644 index 0000000..d67c77a --- /dev/null +++ b/src/public SDK/IClientUtils.h @@ -0,0 +1,104 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ICLIENTUTILS_H +#define ICLIENTUTILS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +abstract_class UNSAFE_INTERFACE IClientUtils +{ +public: + + virtual const char *GetInstallPath() = 0; + virtual const char *GetUserBaseFolderInstallImage() = 0; + virtual const char *GetManagedContentRoot() = 0; + + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + virtual void SetComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int32 iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int32 iImage, uint8 *pubDest, int32 nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + virtual uint32 GetNumRunningApps() = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + virtual void SetOfflineMode( bool bOffline ) = 0; + virtual bool GetOfflineMode() = 0; + + virtual AppId_t SetAppIDForCurrentPipe( AppId_t nAppID, bool bTrackProcess ) = 0; + virtual AppId_t GetAppID() = 0; + + virtual void SetAPIDebuggingActive( bool bActive, bool bVerbose ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int32 cubCallback, int32 iCallbackExpected, bool *pbFailed ) = 0; + + virtual bool SignalAppsToShutDown() = 0; + + virtual CellID_t GetCellID() = 0; + + virtual bool BIsGlobalInstance() = 0; + + // Asynchronous call to check if file is signed, result is returned in CheckFileSignature_t + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; + + virtual uint64 GetBuildID() = 0; + + virtual void SetCurrentUIMode( EUIMode eUIMode ) = 0; + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eInputLineMode, const char *szText, uint32 uMaxLength ) = 0; + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchValue, uint32 cchValueMax ) = 0; + virtual void GamepadTextInputClosed( HSteamPipe hSteamPipe, bool, const char * ) = 0; + + virtual void SetSpew( ESpewGroup eSpewGroup, int32 iSpewLevel, int32 iLogLevel ) = 0; + + virtual bool BDownloadsDisabled() = 0; + + virtual void SetFocusedWindow( EWindowType eWindowType, uint32 uUnk ) = 0; + virtual const char *GetSteamUILanguage() = 0; +}; + +#endif // ICLIENTUTILS_H diff --git a/src/public SDK/ISteam003.h b/src/public SDK/ISteam003.h new file mode 100644 index 0000000..1493310 --- /dev/null +++ b/src/public SDK/ISteam003.h @@ -0,0 +1,159 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM003_H +#define ISTEAM003_H +#ifdef _WIN32 +#pragma once +#endif + +abstract_class ISteam003 +{ +public: + #if defined(_WIN32) && defined(__GNUC__) && !defined(_S4N_) + // We can't use the real destructor name here because gcc will put 2 destructors in the vtable. + virtual void _ISteam003() = 0; + #else + virtual ~ISteam003() = 0; + #endif + + virtual SteamCallHandle_t ChangePassword(const char* cszCurrentPassphrase, const char* cszNewPassphrase, TSteamError* pError) = 0; + virtual int GetCurrentEmailAddress(char* szEmailaddress, unsigned int uBufSize, unsigned int* puEmailaddressChars, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangePersonalQA(const char* cszCurrentPassphrase, const char* cszNewPersonalQuestion, const char* cszNewAnswerToQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeEmailAddress(const char* cszNewEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t VerifyEmailAddress(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestEmailAddressVerificationEmail(TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeAccountName(const char* cszCurrentPassphrase, const char* cszNewAccountName, TSteamError* pError) = 0; + virtual int MountAppFilesystem(TSteamError* pError) = 0; + virtual int UnmountAppFilesystem(TSteamError* pError) = 0; + virtual SteamHandle_t MountFilesystem(unsigned int uAppId, const char* szMountPath, TSteamError* pError) = 0; + virtual int UnmountFilesystem(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Stat(const char* cszName, TSteamElemInfo* pInfo, TSteamError* pError) = 0; + virtual int SetvBuf(SteamHandle_t hFile, void* pBuf, ESteamBufferMethod eMethod, unsigned int uBytes, TSteamError* pError) = 0; + virtual int FlushFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFile(const char* cszName, const char* cszMode, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFileEx(const char* cszFileName, const char* cszMode, unsigned int* puFileSize, TSteamError* pError) = 0; + virtual SteamHandle_t OpenTmpFile(TSteamError* pError) = 0; + virtual void ClearError(TSteamError* pError) = 0; + virtual int GetVersion(char* szVersion, unsigned int uVersionBufSize) = 0; + virtual int GetOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ChangeOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ProcessCall(SteamCallHandle_t handle, TSteamProgress* pProgress, TSteamError* pError) = 0; + virtual int AbortCall(SteamCallHandle_t handle, TSteamError* pError) = 0; + virtual int BlockingCall(SteamCallHandle_t handle, unsigned int uiProcessTickMS, TSteamError* pError) = 0; + virtual int SetMaxStallCount(unsigned int uNumStalls, TSteamError* pError) = 0; + virtual int CloseFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int ReadFile(void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int WriteFile(const void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Getc(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Putc(int cChar, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SeekFile(SteamHandle_t hFile, long lOffset, ESteamSeekMethod eMethod, TSteamError* pError) = 0; + virtual long TellFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SizeFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t FindFirst(const char* cszPattern, ESteamFindFilter eFilter, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindNext(SteamHandle_t hFind, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindClose(SteamHandle_t hFind, TSteamError* pError) = 0; + virtual int GetLocalFileCopy(const char* cszName, TSteamError* pError) = 0; + virtual int IsFileImmediatelyAvailable(const char* cszName, TSteamError* pError) = 0; + virtual int HintResourceNeed(const char* cszMasterList, int bForgetEverything, TSteamError* pError) = 0; + virtual int ForgetAllHints(TSteamError* pError) = 0; + virtual int PauseCachePreloading(TSteamError* pError) = 0; + virtual int ResumeCachePreloading(TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForResources(const char* cszMasterList, TSteamError* pError) = 0; + virtual int StartEngine(TSteamError* pError) = 0; + virtual int ShutdownEngine(TSteamError* pError) = 0; + virtual int Startup(unsigned int uUsingMask, TSteamError* pError) = 0; + virtual int Cleanup(TSteamError* pError) = 0; + virtual unsigned int NumAppsRunning(TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateAccount(const char* cszUser, const char* cszEmailAddress, const char* cszPassphrase, const char* cszCreationKey, const char* cszPersonalQuestion, const char* cszAnswerToQuestion, int* pbCreated, TSteamError* pError) = 0; + virtual SteamCallHandle_t GenerateSuggestedAccountNames(const char* cszAccountNameToSelectMasterAS, const char* cszGenerateNamesLikeAccountName, char* pSuggestedNamesBuf, unsigned int uBufSize, unsigned int* puNumSuggestedChars, TSteamError* pError) = 0; + virtual int IsLoggedIn(int* pbIsLoggedIn, TSteamError* pError) = 0; + virtual SteamCallHandle_t Logout(TSteamError* pError) = 0; + virtual int IsSecureComputer(int* pbIsSecureComputer, TSteamError* pError) = 0; + virtual SteamHandle_t CreateLogContext(const char* cszName) = 0; + virtual int Log(SteamHandle_t hContext, const char* cszMsg) = 0; + virtual void LogResourceLoadStarted(const char* cszMsg) = 0; + virtual void LogResourceLoadFinished(const char* cszMsg) = 0; + virtual SteamCallHandle_t RefreshLogin(const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual int VerifyPassword(const char* cszPassphrase, int* pbCorrect, TSteamError* pError) = 0; + virtual int GetUserType(unsigned int* puUserTypeFlags, TSteamError* pError) = 0; + virtual int GetAppStats(TSteamAppStats* pAppStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t IsAccountNameInUse(const char* cszAccountName, int* pbIsUsed, TSteamError* pError) = 0; + virtual int GetAppIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int GetSubscriptionStats(TSteamSubscriptionStats* pSubscriptionStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t RefreshAccountInfo(TSteamError* pError) = 0; + virtual SteamCallHandle_t Subscribe(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t Unsubscribe(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int GetSubscriptionReceipt(unsigned int uSubscriptionId , TSteamSubscriptionReceipt* pSteamSubscriptionReceipt, TSteamError* pError) = 0; + virtual int GetAccountStatus(unsigned int* puAccountStatusFlags, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetUser(const char* cszUser, int* pbUserSet, TSteamError* pError) = 0; + virtual int GetUser(char* szUser, unsigned int uBufSize, unsigned int* puUserChars, TSteamGlobalUserID* pSteamGlobalUserID, TSteamError* pError) = 0; + virtual SteamCallHandle_t Login(const char* cszUser, const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual SteamCallHandle_t AckSubscriptionReceipt(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int IsAppSubscribed(unsigned int uAppId, int* pbIsAppSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetSubscriptionIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int EnumerateSubscription(unsigned int uSubscriptionId, TSteamSubscription* pSubscription, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscount(unsigned int uSubscriptionId, unsigned int uDiscountIndex, TSteamSubscriptionDiscount* pSteamSubscriptionDiscount, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscountQualifier(unsigned int uSubscriptionId, unsigned int uDiscountIndex, unsigned int uQualifierIndex, TSteamDiscountQualifier* pSteamDiscountQualifier, TSteamError* pError) = 0; + virtual int EnumerateApp(unsigned int uAppId, TSteamApp* pApp, TSteamError* pError) = 0; + virtual int EnumerateAppLaunchOption(unsigned int uAppId, unsigned int uLaunchOptionIndex, TSteamAppLaunchOption* pLaunchOption, TSteamError* pError) = 0; + virtual SteamCallHandle_t DeleteAccount(TSteamError* pError) = 0; + virtual int EnumerateAppIcon(unsigned int uAppId, unsigned int uIconIndex, unsigned char* pIconData, unsigned int uIconDataBufSize, unsigned int* puSizeOfIconData, TSteamError* pError) = 0; + virtual SteamCallHandle_t LaunchApp(unsigned int uAppId, unsigned int uLaunchOption, const char* cszArgs, TSteamError* pError) = 0; + virtual int GetCacheFilePath(unsigned int uAppId, char* szFilePath, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int EnumerateAppVersion(unsigned int uAppId, unsigned int uVersionIndex, TSteamAppVersion* pAppVersion, TSteamError* pError) = 0; + virtual int EnumerateAppDependency(unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t StartLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual int InsertAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual int RemoveAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamError* pError) = 0; + virtual int FindApp(const char* cszAppName, unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppDependencies(unsigned int uAppId, unsigned int puCacheIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int IsSubscribed(unsigned int uSubscriptionId, int* pbIsSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetAppUserDefinedInfo(unsigned int uAppId, const char* cszPropertyName, char* szPropertyValue, unsigned int uBufSize, unsigned int* puPropertyValueLength, TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForAppReadyToLaunch(unsigned int uAppId, TSteamError* pError) = 0; + virtual int IsCacheLoadingEnabled(unsigned int uAppId, int* pbIsLoading, TSteamError* pError) = 0; + virtual SteamCallHandle_t StopLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual ESteamError GetEncryptedUserIDTicket(const void* pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void* pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int* pReceiveSizeOfEncryptedTicket, TSteamError* pError) = 0; + virtual SteamCallHandle_t FlushCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual SteamCallHandle_t RepairOrDecryptCaches(unsigned int uAppId, int bForceValidation, TSteamError* pError) = 0; + virtual SteamCallHandle_t LoadCacheFromDir(unsigned int uAppId, const char* cszPath, TSteamError* pError) = 0; + virtual int GetCacheDefaultDirectory(char* szPath, TSteamError* pError) = 0; + virtual int SetCacheDefaultDirectory(const char* cszPath, TSteamError* pError) = 0; + virtual int GetAppDir(unsigned int uAppId, char* szAppDir, TSteamError* pError) = 0; + virtual SteamCallHandle_t MoveApp(unsigned int uAppId, const char* szPath, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppCacheSize(unsigned int uAppId, unsigned int* puCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppCacheSize(unsigned int uAppId, unsigned int uCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppVersion(unsigned int uAppId, unsigned int uAppVersionId, TSteamError* pError) = 0; + virtual SteamCallHandle_t Uninstall(TSteamError* pError) = 0; + virtual int SetNotificationCallback(SteamNotificationCallback_t pCallbackFunction, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeForgottenPassword(const char* cszUser, const char* cszAnswerToQuestion, const char* cszEmailVerificationKey, const char* cszNewPassphrase, int* pbChanged, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestForgottenPasswordEmail(const char* cszUser, char* ReceivePersonalQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByEmailAddressEmail(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByCdKeyEmail(const char* cszCdKey, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetNumAccountsWithEmailAddress(const char *cszEmailAddress, unsigned int *puNumAccounts, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateAccountBillingInfo(const TSteamPaymentCardInfo* pPaymentCardInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateSubscriptionBillingInfo(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual int GetSponsorUrl(unsigned int uAppId, char* szUrl, unsigned int uBufSize, unsigned int* pUrlChars, TSteamError* pError) = 0; + virtual int GetContentServerInfo(unsigned int uAppId, unsigned int* puServerId, unsigned int* puServerIpAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppUpdateStats(unsigned int uAppOrCacheId, ESteamAppUpdateStatsQueryType eQueryType, TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual int GetTotalUpdateStats(TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateCachePreloaders(TSteamError* pError) = 0; +}; + + +#define STEAM_INTERFACE_VERSION_003 "Steam003" + +#endif // ISTEAM003_H diff --git a/src/public SDK/ISteam004.h b/src/public SDK/ISteam004.h new file mode 100644 index 0000000..996ae47 --- /dev/null +++ b/src/public SDK/ISteam004.h @@ -0,0 +1,168 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM004_H +#define ISTEAM004_H +#ifdef _WIN32 +#pragma once +#endif + +abstract_class ISteam004 +{ +public: + #if defined(_WIN32) && defined(__GNUC__) && !defined(_S4N_) + // We can't use the real destructor name here because gcc will put 2 destructors in the vtable. + virtual void _ISteam004() = 0; + #else + virtual ~ISteam004() = 0; + #endif + + virtual SteamCallHandle_t ChangePassword(const char* cszCurrentPassphrase, const char* cszNewPassphrase, TSteamError* pError) = 0; + virtual int GetCurrentEmailAddress(char* szEmailaddress, unsigned int uBufSize, unsigned int* puEmailaddressChars, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangePersonalQA(const char* cszCurrentPassphrase, const char* cszNewPersonalQuestion, const char* cszNewAnswerToQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeEmailAddress(const char* cszNewEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t VerifyEmailAddress(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestEmailAddressVerificationEmail(TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeAccountName(const char* cszCurrentPassphrase, const char* cszNewAccountName, TSteamError* pError) = 0; + virtual int MountAppFilesystem(TSteamError* pError) = 0; + virtual int UnmountAppFilesystem(TSteamError* pError) = 0; + virtual SteamHandle_t MountFilesystem(unsigned int uAppId, const char* szMountPath, TSteamError* pError) = 0; + virtual int UnmountFilesystem(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Stat(const char* cszName, TSteamElemInfo* pInfo, TSteamError* pError) = 0; + virtual int SetvBuf(SteamHandle_t hFile, void* pBuf, ESteamBufferMethod eMethod, unsigned int uBytes, TSteamError* pError) = 0; + virtual int FlushFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFile(const char* cszName, const char* cszMode, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFileEx(const char* cszFileName, const char* cszMode, unsigned int* puFileSize, TSteamError* pError) = 0; + virtual SteamHandle_t OpenTmpFile(TSteamError* pError) = 0; + virtual void ClearError(TSteamError* pError) = 0; + virtual int GetVersion(char* szVersion, unsigned int uVersionBufSize) = 0; + virtual int GetOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ChangeOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ProcessCall(SteamCallHandle_t handle, TSteamProgress* pProgress, TSteamError* pError) = 0; + virtual int AbortCall(SteamCallHandle_t handle, TSteamError* pError) = 0; + virtual int BlockingCall(SteamCallHandle_t handle, unsigned int uiProcessTickMS, TSteamError* pError) = 0; + virtual int SetMaxStallCount(unsigned int uNumStalls, TSteamError* pError) = 0; + virtual int CloseFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int ReadFile(void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int WriteFile(const void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Getc(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Putc(int cChar, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SeekFile(SteamHandle_t hFile, long lOffset, ESteamSeekMethod eMethod, TSteamError* pError) = 0; + virtual long TellFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SizeFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t FindFirst(const char* cszPattern, ESteamFindFilter eFilter, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindNext(SteamHandle_t hFind, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindClose(SteamHandle_t hFind, TSteamError* pError) = 0; + virtual int GetLocalFileCopy(const char* cszName, TSteamError* pError) = 0; + virtual int IsFileImmediatelyAvailable(const char* cszName, TSteamError* pError) = 0; + virtual int HintResourceNeed(const char* cszMasterList, int bForgetEverything, TSteamError* pError) = 0; + virtual int ForgetAllHints(TSteamError* pError) = 0; + virtual int PauseCachePreloading(TSteamError* pError) = 0; + virtual int ResumeCachePreloading(TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForResources(const char* cszMasterList, TSteamError* pError) = 0; + virtual int StartEngine(TSteamError* pError) = 0; + virtual int ShutdownEngine(TSteamError* pError) = 0; + virtual int Startup(unsigned int uUsingMask, TSteamError* pError) = 0; + virtual int Cleanup(TSteamError* pError) = 0; + virtual unsigned int NumAppsRunning(TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateAccount(const char* cszUser, const char* cszEmailAddress, const char* cszPassphrase, const char* cszCreationKey, const char* cszPersonalQuestion, const char* cszAnswerToQuestion, int* pbCreated, TSteamError* pError) = 0; + virtual SteamCallHandle_t GenerateSuggestedAccountNames(const char* cszAccountNameToSelectMasterAS, const char* cszGenerateNamesLikeAccountName, char* pSuggestedNamesBuf, unsigned int uBufSize, unsigned int* puNumSuggestedChars, TSteamError* pError) = 0; + virtual int IsLoggedIn(int* pbIsLoggedIn, TSteamError* pError) = 0; + virtual SteamCallHandle_t Logout(TSteamError* pError) = 0; + virtual int IsSecureComputer(int* pbIsSecureComputer, TSteamError* pError) = 0; + virtual SteamHandle_t CreateLogContext(const char* cszName) = 0; + virtual int Log(SteamHandle_t hContext, const char* cszMsg) = 0; + virtual void LogResourceLoadStarted(const char* cszMsg) = 0; + virtual void LogResourceLoadFinished(const char* cszMsg) = 0; + virtual SteamCallHandle_t RefreshLogin(const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual int VerifyPassword(const char* cszPassphrase, int* pbCorrect, TSteamError* pError) = 0; + virtual int GetUserType(unsigned int* puUserTypeFlags, TSteamError* pError) = 0; + virtual int GetAppStats(TSteamAppStats* pAppStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t IsAccountNameInUse(const char* cszAccountName, int* pbIsUsed, TSteamError* pError) = 0; + virtual int GetAppIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int GetSubscriptionStats(TSteamSubscriptionStats* pSubscriptionStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t RefreshAccountInfo(TSteamError* pError) = 0; + virtual SteamCallHandle_t Subscribe(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t Unsubscribe(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int GetSubscriptionReceipt(unsigned int uSubscriptionId , TSteamSubscriptionReceipt* pSteamSubscriptionReceipt, TSteamError* pError) = 0; + virtual int GetAccountStatus(unsigned int* puAccountStatusFlags, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetUser(const char* cszUser, int* pbUserSet, TSteamError* pError) = 0; + virtual int GetUser(char* szUser, unsigned int uBufSize, unsigned int* puUserChars, TSteamGlobalUserID* pOptionalReceiveUserID, TSteamError* pError) = 0; + virtual SteamCallHandle_t Login(const char* cszUser, const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual SteamCallHandle_t AckSubscriptionReceipt(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int IsAppSubscribed(unsigned int uAppId, int* pbIsAppSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetSubscriptionIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int EnumerateSubscription(unsigned int uSubscriptionId, TSteamSubscription* pSubscription, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscount(unsigned int uSubscriptionId, unsigned int uDiscountIndex, TSteamSubscriptionDiscount* pSteamSubscriptionDiscount, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscountQualifier(unsigned int uSubscriptionId, unsigned int uDiscountIndex, unsigned int uQualifierIndex, TSteamDiscountQualifier* pSteamDiscountQualifier, TSteamError* pError) = 0; + virtual int EnumerateApp(unsigned int uAppId, TSteamApp* pApp, TSteamError* pError) = 0; + virtual int EnumerateAppLaunchOption(unsigned int uAppId, unsigned int uLaunchOptionIndex, TSteamAppLaunchOption* pLaunchOption, TSteamError* pError) = 0; + virtual SteamCallHandle_t DeleteAccount(TSteamError* pError) = 0; + virtual int EnumerateAppIcon(unsigned int uAppId, unsigned int uIconIndex, unsigned char* pIconData, unsigned int uIconDataBufSize, unsigned int* puSizeOfIconData, TSteamError* pError) = 0; + virtual SteamCallHandle_t LaunchApp(unsigned int uAppId, unsigned int uLaunchOption, const char* cszArgs, TSteamError* pError) = 0; + virtual int GetCacheFilePath(unsigned int uAppId, char* szFilePath, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int EnumerateAppVersion(unsigned int uAppId, unsigned int uVersionIndex, TSteamAppVersion* pAppVersion, TSteamError* pError) = 0; + virtual int EnumerateAppDependency(unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t StartLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual int InsertAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual int RemoveAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamError* pError) = 0; + virtual int FindApp(const char* cszAppName, unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppDependencies(unsigned int uAppId, unsigned int puCacheIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int IsSubscribed(unsigned int uSubscriptionId, int* pbIsSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetAppUserDefinedInfo(unsigned int uAppId, const char* cszPropertyName, char* szPropertyValue, unsigned int uBufSize, unsigned int* puPropertyValueLength, TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForAppReadyToLaunch(unsigned int uAppId, TSteamError* pError) = 0; + virtual int IsCacheLoadingEnabled(unsigned int uAppId, int* pbIsLoading, TSteamError* pError) = 0; + virtual SteamCallHandle_t StopLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual ESteamError GetEncryptedUserIDTicket(const void* pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void* pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int* pReceiveSizeOfEncryptedTicket, TSteamError* pError) = 0; + virtual SteamCallHandle_t FlushCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual SteamCallHandle_t RepairOrDecryptCaches(unsigned int uAppId, int bForceValidation, TSteamError* pError) = 0; + virtual SteamCallHandle_t LoadCacheFromDir(unsigned int uAppId, const char* cszPath, TSteamError* pError) = 0; + virtual int GetCacheDefaultDirectory(char* szPath, TSteamError* pError) = 0; + virtual int SetCacheDefaultDirectory(const char* cszPath, TSteamError* pError) = 0; + virtual int GetAppDir(unsigned int uAppId, char* szAppDir, TSteamError* pError) = 0; + virtual SteamCallHandle_t MoveApp(unsigned int uAppId, const char* szPath, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppCacheSize(unsigned int uAppId, unsigned int* puCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppCacheSize(unsigned int uAppId, unsigned int uCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppVersion(unsigned int uAppId, unsigned int uAppVersionId, TSteamError* pError) = 0; + virtual SteamCallHandle_t Uninstall(TSteamError* pError) = 0; + virtual int SetNotificationCallback(SteamNotificationCallback_t pCallbackFunction, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeForgottenPassword(const char* cszUser, const char* cszAnswerToQuestion, const char* cszEmailVerificationKey, const char* cszNewPassphrase, int* pbChanged, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestForgottenPasswordEmail(const char* cszUser, char* ReceivePersonalQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByEmailAddressEmail(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByCdKeyEmail(const char* cszCdKey, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetNumAccountsWithEmailAddress(const char *cszEmailAddress, unsigned int *puNumAccounts, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateAccountBillingInfo(const TSteamPaymentCardInfo* pPaymentCardInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateSubscriptionBillingInfo(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual int GetSponsorUrl(unsigned int uAppId, char* szUrl, unsigned int uBufSize, unsigned int* pUrlChars, TSteamError* pError) = 0; + virtual int GetContentServerInfo(unsigned int uAppId, unsigned int* puServerId, unsigned int* puServerIpAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppUpdateStats(unsigned int uAppOrCacheId, ESteamAppUpdateStatsQueryType eQueryType, TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual int GetTotalUpdateStats(TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateCachePreloaders(TSteamError* pError) = 0; + + // ISteam004 + virtual void Win32SetMiniDumpComment(const char* cszComment) = 0; + virtual void Win32SetMiniDumpSourceControlId(unsigned int uSourceControlId) = 0; + virtual void Win32SetMiniDumpEnableFullMemory() = 0; + virtual void Win32WriteMiniDump(const char* szErrorOrAssertType, const char* szDescriptionOrAssertName, const char* szAssertExpr, const char* szAssertFilename, unsigned int uAssertLineNumber) = 0; + virtual int GetCurrentAppId(unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppPurchaseCountry(unsigned int uAppId, char* szCountryCode, unsigned int uBufferLength, int* piRecievedLength, TSteamError* pError) = 0; +}; + + + +#define STEAM_INTERFACE_VERSION_004 "Steam004" + +#endif // ISTEAM004_H diff --git a/src/public SDK/ISteam005.h b/src/public SDK/ISteam005.h new file mode 100644 index 0000000..7bb6d59 --- /dev/null +++ b/src/public SDK/ISteam005.h @@ -0,0 +1,177 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM005_H +#define ISTEAM005_H +#ifdef _WIN32 +#pragma once +#endif + + +abstract_class ISteam005 +{ +public: + #if defined(_WIN32) && defined(__GNUC__) && !defined(_S4N_) + // We can't use the real destructor name here because gcc will put 2 destructors in the vtable. + virtual void _ISteam005() = 0; + #else + virtual ~ISteam005() = 0; + #endif + + virtual SteamCallHandle_t ChangePassword(const char* cszCurrentPassphrase, const char* cszNewPassphrase, TSteamError* pError) = 0; + virtual int GetCurrentEmailAddress(char* szEmailaddress, unsigned int uBufSize, unsigned int* puEmailaddressChars, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangePersonalQA(const char* cszCurrentPassphrase, const char* cszNewPersonalQuestion, const char* cszNewAnswerToQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeEmailAddress(const char* cszNewEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t VerifyEmailAddress(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestEmailAddressVerificationEmail(TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeAccountName(const char* cszCurrentPassphrase, const char* cszNewAccountName, TSteamError* pError) = 0; + virtual int MountAppFilesystem(TSteamError* pError) = 0; + virtual int UnmountAppFilesystem(TSteamError* pError) = 0; + virtual SteamHandle_t MountFilesystem(unsigned int uAppId, const char* szMountPath, TSteamError* pError) = 0; + virtual int UnmountFilesystem(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Stat(const char* cszName, TSteamElemInfo* pInfo, TSteamError* pError) = 0; + virtual int SetvBuf(SteamHandle_t hFile, void* pBuf, ESteamBufferMethod eMethod, unsigned int uBytes, TSteamError* pError) = 0; + virtual int FlushFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFile(const char* cszName, const char* cszMode, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFileEx(const char* cszFileName, const char* cszMode, unsigned int* puFileSize, TSteamError* pError) = 0; + virtual SteamHandle_t OpenTmpFile(TSteamError* pError) = 0; + virtual void ClearError(TSteamError* pError) = 0; + virtual int GetVersion(char* szVersion, unsigned int uVersionBufSize) = 0; + virtual int GetOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ChangeOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ProcessCall(SteamCallHandle_t handle, TSteamProgress* pProgress, TSteamError* pError) = 0; + virtual int AbortCall(SteamCallHandle_t handle, TSteamError* pError) = 0; + virtual int BlockingCall(SteamCallHandle_t handle, unsigned int uiProcessTickMS, TSteamError* pError) = 0; + virtual int SetMaxStallCount(unsigned int uNumStalls, TSteamError* pError) = 0; + virtual int CloseFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int ReadFile(void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int WriteFile(const void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Getc(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Putc(int cChar, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SeekFile(SteamHandle_t hFile, long lOffset, ESteamSeekMethod eMethod, TSteamError* pError) = 0; + virtual long TellFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SizeFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t FindFirst(const char* cszPattern, ESteamFindFilter eFilter, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindNext(SteamHandle_t hFind, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindClose(SteamHandle_t hFind, TSteamError* pError) = 0; + virtual int GetLocalFileCopy(const char* cszName, TSteamError* pError) = 0; + virtual int IsFileImmediatelyAvailable(const char* cszName, TSteamError* pError) = 0; + virtual int HintResourceNeed(const char* cszMasterList, int bForgetEverything, TSteamError* pError) = 0; + virtual int ForgetAllHints(TSteamError* pError) = 0; + virtual int PauseCachePreloading(TSteamError* pError) = 0; + virtual int ResumeCachePreloading(TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForResources(const char* cszMasterList, TSteamError* pError) = 0; + virtual int StartEngine(TSteamError* pError) = 0; + virtual int ShutdownEngine(TSteamError* pError) = 0; + virtual int Startup(unsigned int uUsingMask, TSteamError* pError) = 0; + virtual int Cleanup(TSteamError* pError) = 0; + virtual unsigned int NumAppsRunning(TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateAccount(const char* cszUser, const char* cszEmailAddress, const char* cszPassphrase, const char* cszCreationKey, const char* cszPersonalQuestion, const char* cszAnswerToQuestion, int* pbCreated, TSteamError* pError) = 0; + virtual SteamCallHandle_t GenerateSuggestedAccountNames(const char* cszAccountNameToSelectMasterAS, const char* cszGenerateNamesLikeAccountName, char* pSuggestedNamesBuf, unsigned int uBufSize, unsigned int* puNumSuggestedChars, TSteamError* pError) = 0; + virtual int IsLoggedIn(int* pbIsLoggedIn, TSteamError* pError) = 0; + virtual SteamCallHandle_t Logout(TSteamError* pError) = 0; + virtual int IsSecureComputer(int* pbIsSecureComputer, TSteamError* pError) = 0; + virtual SteamHandle_t CreateLogContext(const char* cszName) = 0; + virtual int Log(SteamHandle_t hContext, const char* cszMsg) = 0; + virtual void LogResourceLoadStarted(const char* cszMsg) = 0; + virtual void LogResourceLoadFinished(const char* cszMsg) = 0; + virtual SteamCallHandle_t RefreshLogin(const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual int VerifyPassword(const char* cszPassphrase, int* pbCorrect, TSteamError* pError) = 0; + virtual int GetUserType(unsigned int* puUserTypeFlags, TSteamError* pError) = 0; + virtual int GetAppStats(TSteamAppStats* pAppStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t IsAccountNameInUse(const char* cszAccountName, int* pbIsUsed, TSteamError* pError) = 0; + virtual int GetAppIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int GetSubscriptionStats(TSteamSubscriptionStats* pSubscriptionStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t RefreshAccountInfo(int bContentDescriptionOnly, TSteamError* pError) = 0; + virtual SteamCallHandle_t Subscribe(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t Unsubscribe(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int GetSubscriptionReceipt(unsigned int uSubscriptionId , TSteamSubscriptionReceipt* pSteamSubscriptionReceipt, TSteamError* pError) = 0; + virtual int GetAccountStatus(unsigned int* puAccountStatusFlags, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetUser(const char* cszUser, int* pbUserSet, TSteamError* pError) = 0; + virtual int GetUser(char* szUser, unsigned int uBufSize, unsigned int* puUserChars, TSteamGlobalUserID* pOptionalReceiveUserID, TSteamError* pError) = 0; + virtual SteamCallHandle_t Login(const char* cszUser, const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual SteamCallHandle_t AckSubscriptionReceipt(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int IsAppSubscribed(unsigned int uAppId, int* pbIsAppSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetSubscriptionIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int EnumerateSubscription(unsigned int uSubscriptionId, TSteamSubscription* pSubscription, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscount(unsigned int uSubscriptionId, unsigned int uDiscountIndex, TSteamSubscriptionDiscount* pSteamSubscriptionDiscount, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscountQualifier(unsigned int uSubscriptionId, unsigned int uDiscountIndex, unsigned int uQualifierIndex, TSteamDiscountQualifier* pSteamDiscountQualifier, TSteamError* pError) = 0; + virtual int EnumerateApp(unsigned int uAppId, TSteamApp* pApp, TSteamError* pError) = 0; + virtual int EnumerateAppLaunchOption(unsigned int uAppId, unsigned int uLaunchOptionIndex, TSteamAppLaunchOption* pLaunchOption, TSteamError* pError) = 0; + virtual SteamCallHandle_t DeleteAccount(TSteamError* pError) = 0; + virtual int EnumerateAppIcon(unsigned int uAppId, unsigned int uIconIndex, unsigned char* pIconData, unsigned int uIconDataBufSize, unsigned int* puSizeOfIconData, TSteamError* pError) = 0; + virtual SteamCallHandle_t LaunchApp(unsigned int uAppId, unsigned int uLaunchOption, const char* cszArgs, TSteamError* pError) = 0; + virtual int GetCacheFilePath(unsigned int uAppId, char* szFilePath, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int EnumerateAppVersion(unsigned int uAppId, unsigned int uVersionIndex, TSteamAppVersion* pAppVersion, TSteamError* pError) = 0; + virtual int EnumerateAppDependency(unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t StartLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual int InsertAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual int RemoveAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamError* pError) = 0; + virtual int FindApp(const char* cszAppName, unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppDependencies(unsigned int uAppId, unsigned int puCacheIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int IsSubscribed(unsigned int uSubscriptionId, int* pbIsSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetAppUserDefinedInfo(unsigned int uAppId, const char* cszPropertyName, char* szPropertyValue, unsigned int uBufSize, unsigned int* puPropertyValueLength, TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForAppReadyToLaunch(unsigned int uAppId, TSteamError* pError) = 0; + virtual int IsCacheLoadingEnabled(unsigned int uAppId, int* pbIsLoading, TSteamError* pError) = 0; + virtual SteamCallHandle_t StopLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual ESteamError GetEncryptedUserIDTicket(const void* pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void* pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int* pReceiveSizeOfEncryptedTicket, TSteamError* pError) = 0; + virtual SteamCallHandle_t FlushCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual SteamCallHandle_t RepairOrDecryptCaches(unsigned int uAppId, int bForceValidation, TSteamError* pError) = 0; + virtual SteamCallHandle_t LoadCacheFromDir(unsigned int uAppId, const char* cszPath, TSteamError* pError) = 0; + virtual int GetCacheDefaultDirectory(char* szPath, TSteamError* pError) = 0; + virtual int SetCacheDefaultDirectory(const char* cszPath, TSteamError* pError) = 0; + virtual int GetAppDir(unsigned int uAppId, char* szAppDir, TSteamError* pError) = 0; + virtual SteamCallHandle_t MoveApp(unsigned int uAppId, const char* szPath, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppCacheSize(unsigned int uAppId, unsigned int* puCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppCacheSize(unsigned int uAppId, unsigned int uCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppVersion(unsigned int uAppId, unsigned int uAppVersionId, TSteamError* pError) = 0; + virtual SteamCallHandle_t Uninstall(TSteamError* pError) = 0; + virtual int SetNotificationCallback(SteamNotificationCallback_t pCallbackFunction, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeForgottenPassword(const char* cszUser, const char* cszAnswerToQuestion, const char* cszEmailVerificationKey, const char* cszNewPassphrase, int* pbChanged, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestForgottenPasswordEmail(const char* cszUser, char* ReceivePersonalQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByEmailAddressEmail(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByCdKeyEmail(const char* cszCdKey, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetNumAccountsWithEmailAddress(const char *cszEmailAddress, unsigned int *puNumAccounts, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateAccountBillingInfo(const TSteamPaymentCardInfo* pPaymentCardInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateSubscriptionBillingInfo(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual int GetSponsorUrl(unsigned int uAppId, char* szUrl, unsigned int uBufSize, unsigned int* pUrlChars, TSteamError* pError) = 0; + virtual int GetContentServerInfo(unsigned int uAppId, unsigned int* puServerId, unsigned int* puServerIpAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppUpdateStats(unsigned int uAppOrCacheId, ESteamAppUpdateStatsQueryType eQueryType, TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual int GetTotalUpdateStats(TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateCachePreloaders(TSteamError* pError) = 0; + + // ISteam004 + virtual void Win32SetMiniDumpComment(const char* cszComment) = 0; + virtual void Win32SetMiniDumpSourceControlId(unsigned int uSourceControlId) = 0; + virtual void Win32SetMiniDumpEnableFullMemory() = 0; + virtual void Win32WriteMiniDump(const char* szErrorOrAssertType, const char* szDescriptionOrAssertName, const char* szAssertExpr, const char* szAssertFilename, unsigned int uAssertLineNumber) = 0; + virtual int GetCurrentAppId(unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppPurchaseCountry(unsigned int uAppId, char* szCountryCode, unsigned int uBufferLength, int* piRecievedLength, TSteamError* pError) = 0; + + // ISteam005 + virtual int GetLocalClientVersion(unsigned int* puBootStrapperVersionNum, unsigned int* puClientAppVersionNum, TSteamError* pError) = 0; + virtual int IsFileNeededByCache(unsigned int uCacheId, const char* cszFileName, unsigned int uFileSize, TSteamError* pError) = 0; + virtual int LoadFileToCache(unsigned int uCacheId, const char* pchFileName, const void* pubDataChunk, unsigned int cubDataChunk, unsigned int cubDataOffset, TSteamError* pError) = 0; + virtual int GetCacheDecryptionKey(unsigned int uAppId, char* szCacheDecryptionKey, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int GetSubscriptionExtendedInfo(unsigned int uSubscriptionId, const char* cszKeyName, char* szKeyValue, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int GetSubscriptionPurchaseCountry(unsigned int uSubscriptionId, char* szCountry, unsigned int uBufSize , int* pPurchaseTime, TSteamError* pError) = 0; + virtual int GetAppUserDefinedRecord(unsigned int uAppId, KeyValueIteratorCallback_t AddEntryToKeyValueFunc, void* pvCKeyValue, TSteamError* pError) = 0; +}; + + +#define STEAM_INTERFACE_VERSION_005 "Steam005" + +#endif // ISTEAM005_H diff --git a/src/public SDK/ISteam006.h b/src/public SDK/ISteam006.h new file mode 100644 index 0000000..50a8187 --- /dev/null +++ b/src/public SDK/ISteam006.h @@ -0,0 +1,195 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM006_H +#define ISTEAM006_H +#ifdef _WIN32 +#pragma once +#endif + + +abstract_class ISteam006 +{ +public: + #if defined(_WIN32) && defined(__GNUC__) && !defined(_S4N_) + // We can't use the real destructor name here because gcc will put 2 destructors in the vtable. + virtual void _ISteam006() = 0; + #else + virtual ~ISteam006() = 0; + #endif + + virtual SteamCallHandle_t ChangePassword(const char* cszCurrentPassphrase, const char* cszNewPassphrase, TSteamError* pError) = 0; + virtual int GetCurrentEmailAddress(char* szEmailaddress, unsigned int uBufSize, unsigned int* puEmailaddressChars, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangePersonalQA(const char* cszCurrentPassphrase, const char* cszNewPersonalQuestion, const char* cszNewAnswerToQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeEmailAddress(const char* cszNewEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t VerifyEmailAddress(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestEmailAddressVerificationEmail(TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeAccountName(const char* cszCurrentPassphrase, const char* cszNewAccountName, TSteamError* pError) = 0; + virtual int MountAppFilesystem(TSteamError* pError) = 0; + virtual int UnmountAppFilesystem(TSteamError* pError) = 0; + virtual SteamHandle_t MountFilesystem(unsigned int uAppId, const char* szMountPath, TSteamError* pError) = 0; + virtual int UnmountFilesystem(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Stat(const char* cszName, TSteamElemInfo* pInfo, TSteamError* pError) = 0; + virtual int SetvBuf(SteamHandle_t hFile, void* pBuf, ESteamBufferMethod eMethod, unsigned int uBytes, TSteamError* pError) = 0; + virtual int FlushFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFile(const char* cszName, const char* cszMode, TSteamError* pError) = 0; + virtual SteamHandle_t OpenFileEx(const char* cszFileName, const char* cszMode, int nFlags, unsigned int* puFileSize, int* pnLocal, TSteamError* pError) = 0; + virtual SteamHandle_t OpenTmpFile(TSteamError* pError) = 0; + virtual void ClearError(TSteamError* pError) = 0; + virtual int GetVersion(char* szVersion, unsigned int uVersionBufSize) = 0; + virtual int GetOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ChangeOfflineStatus(TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError) = 0; + virtual int ProcessCall(SteamCallHandle_t handle, TSteamProgress* pProgress, TSteamError* pError) = 0; + virtual int AbortCall(SteamCallHandle_t handle, TSteamError* pError) = 0; + virtual int BlockingCall(SteamCallHandle_t handle, unsigned int uiProcessTickMS, TSteamError* pError) = 0; + virtual int SetMaxStallCount(unsigned int uNumStalls, TSteamError* pError) = 0; + virtual int CloseFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int ReadFile(void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual unsigned int WriteFile(const void* pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Getc(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int Putc(int cChar, SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SeekFile(SteamHandle_t hFile, long lOffset, ESteamSeekMethod eMethod, TSteamError* pError) = 0; + virtual long TellFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual int SizeFile(SteamHandle_t hFile, TSteamError* pError) = 0; + virtual SteamHandle_t FindFirst(const char* cszPattern, ESteamFindFilter eFilter, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindNext(SteamHandle_t hFind, TSteamElemInfo* pFindInfo, TSteamError* pError) = 0; + virtual int FindClose(SteamHandle_t hFind, TSteamError* pError) = 0; + virtual int GetLocalFileCopy(const char* cszName, TSteamError* pError) = 0; + virtual int IsFileImmediatelyAvailable(const char* cszName, TSteamError* pError) = 0; + virtual int HintResourceNeed(const char* cszMasterList, int bForgetEverything, TSteamError* pError) = 0; + virtual int ForgetAllHints(TSteamError* pError) = 0; + virtual int PauseCachePreloading(TSteamError* pError) = 0; + virtual int ResumeCachePreloading(TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForResources(const char* cszMasterList, TSteamError* pError) = 0; + virtual int StartEngine(TSteamError* pError) = 0; + virtual int ShutdownEngine(TSteamError* pError) = 0; + virtual int Startup(unsigned int uUsingMask, TSteamError* pError) = 0; + virtual int Cleanup(TSteamError* pError) = 0; + virtual unsigned int NumAppsRunning(TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateAccount(const char* cszUser, const char* cszEmailAddress, const char* cszPassphrase, const char* cszCreationKey, const char* cszPersonalQuestion, const char* cszAnswerToQuestion, int* pbCreated, TSteamError* pError) = 0; + virtual SteamCallHandle_t GenerateSuggestedAccountNames(const char* cszAccountNameToSelectMasterAS, const char* cszGenerateNamesLikeAccountName, char* pSuggestedNamesBuf, unsigned int uBufSize, unsigned int* puNumSuggestedChars, TSteamError* pError) = 0; + virtual int IsLoggedIn(int* pbIsLoggedIn, TSteamError* pError) = 0; + virtual SteamCallHandle_t Logout(TSteamError* pError) = 0; + virtual int IsSecureComputer(int* pbIsSecureComputer, TSteamError* pError) = 0; + virtual SteamHandle_t CreateLogContext(const char* cszName) = 0; + virtual int Log(SteamHandle_t hContext, const char* cszMsg) = 0; + virtual void LogResourceLoadStarted(const char* cszMsg) = 0; + virtual void LogResourceLoadFinished(const char* cszMsg) = 0; + virtual SteamCallHandle_t RefreshLogin(const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual int VerifyPassword(const char* cszPassphrase, int* pbCorrect, TSteamError* pError) = 0; + virtual int GetUserType(unsigned int* puUserTypeFlags, TSteamError* pError) = 0; + virtual int GetAppStats(TSteamAppStats* pAppStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t IsAccountNameInUse(const char* cszAccountName, int* pbIsUsed, TSteamError* pError) = 0; + virtual int GetAppIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int GetSubscriptionStats(TSteamSubscriptionStats* pSubscriptionStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t RefreshAccountInfo(int bContentDescriptionOnly, TSteamError* pError) = 0; + virtual SteamCallHandle_t Subscribe(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t Unsubscribe(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int GetSubscriptionReceipt(unsigned int uSubscriptionId , TSteamSubscriptionReceipt* pSteamSubscriptionReceipt, TSteamError* pError) = 0; + virtual int GetAccountStatus(unsigned int* puAccountStatusFlags, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetUser(const char* cszUser, int* pbUserSet, TSteamError* pError) = 0; + virtual int GetUser(char* szUser, unsigned int uBufSize, unsigned int* puUserChars, TSteamGlobalUserID* pOptionalReceiveUserID, TSteamError* pError) = 0; + virtual SteamCallHandle_t Login(const char* cszUser, const char* cszPassphrase, int bIsSecureComputer, TSteamError* pError) = 0; + virtual SteamCallHandle_t AckSubscriptionReceipt(unsigned int uSubscriptionId, TSteamError* pError) = 0; + virtual int IsAppSubscribed(unsigned int uAppId, int* pbIsAppSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetSubscriptionIds(unsigned int puIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int EnumerateSubscription(unsigned int uSubscriptionId, TSteamSubscription* pSubscription, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscount(unsigned int uSubscriptionId, unsigned int uDiscountIndex, TSteamSubscriptionDiscount* pSteamSubscriptionDiscount, TSteamError* pError) = 0; + virtual int EnumerateSubscriptionDiscountQualifier(unsigned int uSubscriptionId, unsigned int uDiscountIndex, unsigned int uQualifierIndex, TSteamDiscountQualifier* pSteamDiscountQualifier, TSteamError* pError) = 0; + virtual int EnumerateApp(unsigned int uAppId, TSteamApp* pApp, TSteamError* pError) = 0; + virtual int EnumerateAppLaunchOption(unsigned int uAppId, unsigned int uLaunchOptionIndex, TSteamAppLaunchOption* pLaunchOption, TSteamError* pError) = 0; + virtual SteamCallHandle_t DeleteAccount(TSteamError* pError) = 0; + virtual int EnumerateAppIcon(unsigned int uAppId, unsigned int uIconIndex, unsigned char* pIconData, unsigned int uIconDataBufSize, unsigned int* puSizeOfIconData, TSteamError* pError) = 0; + virtual SteamCallHandle_t LaunchApp(unsigned int uAppId, unsigned int uLaunchOption, const char* cszArgs, TSteamError* pError) = 0; + virtual int GetCacheFilePath(unsigned int uAppId, char* szFilePath, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int EnumerateAppVersion(unsigned int uAppId, unsigned int uVersionIndex, TSteamAppVersion* pAppVersion, TSteamError* pError) = 0; + virtual int EnumerateAppDependency(unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t StartLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual int InsertAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamAppDependencyInfo* pDependencyInfo, TSteamError* pError) = 0; + virtual int RemoveAppDependency(unsigned int uAppId, unsigned int uFileSystemIndex, TSteamError* pError) = 0; + virtual int FindApp(const char* cszAppName, unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppDependencies(unsigned int uAppId, unsigned int puCacheIds[], unsigned int uMaxIds, TSteamError* pError) = 0; + virtual int IsSubscribed(unsigned int uSubscriptionId, int* pbIsSubscribed, int* pbIsSubscriptionPending, TSteamError* pError) = 0; + virtual int GetAppUserDefinedInfo(unsigned int uAppId, const char* cszPropertyName, char* szPropertyValue, unsigned int uBufSize, unsigned int* puPropertyValueLength, TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForAppReadyToLaunch(unsigned int uAppId, TSteamError* pError) = 0; + virtual int IsCacheLoadingEnabled(unsigned int uAppId, int* pbIsLoading, TSteamError* pError) = 0; + virtual SteamCallHandle_t StopLoadingCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual ESteamError GetEncryptedUserIDTicket(const void* pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void* pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int* pReceiveSizeOfEncryptedTicket, TSteamError* pError) = 0; + virtual SteamCallHandle_t FlushCache(unsigned int uAppId, TSteamError* pError) = 0; + virtual SteamCallHandle_t RepairOrDecryptCaches(unsigned int uAppId, int bForceValidation, TSteamError* pError) = 0; + virtual SteamCallHandle_t LoadCacheFromDir(unsigned int uAppId, const char* cszPath, TSteamError* pError) = 0; + virtual int GetCacheDefaultDirectory(char* szPath, TSteamError* pError) = 0; + virtual int SetCacheDefaultDirectory(const char* cszPath, TSteamError* pError) = 0; + virtual int GetAppDir(unsigned int uAppId, char* szAppDir, TSteamError* pError) = 0; + virtual SteamCallHandle_t MoveApp(unsigned int uAppId, const char* szPath, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppCacheSize(unsigned int uAppId, unsigned int* puCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppCacheSize(unsigned int uAppId, unsigned int uCacheSizeInMb, TSteamError* pError) = 0; + virtual SteamCallHandle_t SetAppVersion(unsigned int uAppId, unsigned int uAppVersionId, TSteamError* pError) = 0; + virtual SteamCallHandle_t Uninstall(TSteamError* pError) = 0; + virtual int SetNotificationCallback(SteamNotificationCallback_t pCallbackFunction, TSteamError* pError) = 0; + virtual SteamCallHandle_t ChangeForgottenPassword(const char* cszUser, const char* cszAnswerToQuestion, const char* cszEmailVerificationKey, const char* cszNewPassphrase, int* pbChanged, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestForgottenPasswordEmail(const char* cszUser, char* ReceivePersonalQuestion, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByEmailAddressEmail(const char* cszEmailAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t RequestAccountsByCdKeyEmail(const char* cszCdKey, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetNumAccountsWithEmailAddress(const char *cszEmailAddress, unsigned int *puNumAccounts, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateAccountBillingInfo(const TSteamPaymentCardInfo* pPaymentCardInfo, TSteamError* pError) = 0; + virtual SteamCallHandle_t UpdateSubscriptionBillingInfo(unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo* pSubscriptionBillingInfo, TSteamError* pError) = 0; + virtual int GetSponsorUrl(unsigned int uAppId, char* szUrl, unsigned int uBufSize, unsigned int* pUrlChars, TSteamError* pError) = 0; + virtual int GetContentServerInfo(unsigned int uAppId, unsigned int* puServerId, unsigned int* puServerIpAddress, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetAppUpdateStats(unsigned int uAppOrCacheId, ESteamAppUpdateStatsQueryType eQueryType, TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual int GetTotalUpdateStats(TSteamUpdateStats* pUpdateStats, TSteamError* pError) = 0; + virtual SteamCallHandle_t CreateCachePreloaders(TSteamError* pError) = 0; + + // ISteam004 + virtual void Win32SetMiniDumpComment(const char* cszComment) = 0; + virtual void Win32SetMiniDumpSourceControlId(unsigned int uSourceControlId) = 0; + virtual void Win32SetMiniDumpEnableFullMemory() = 0; + virtual void Win32WriteMiniDump(const char* szErrorOrAssertType, const char* szDescriptionOrAssertName, const char* szAssertExpr, const char* szAssertFilename, unsigned int uAssertLineNumber) = 0; + virtual int GetCurrentAppId(unsigned int* puAppId, TSteamError* pError) = 0; + virtual int GetAppPurchaseCountry(unsigned int uAppId, char* szCountryCode, unsigned int uBufferLength, int* piRecievedLength, TSteamError* pError) = 0; + + // ISteam005 + virtual int GetLocalClientVersion(unsigned int* puBootStrapperVersionNum, unsigned int* puClientAppVersionNum, TSteamError* pError) = 0; + virtual int IsFileNeededByCache(unsigned int uCacheId, const char* cszFileName, unsigned int uFileSize, TSteamError* pError) = 0; + virtual int LoadFileToCache(unsigned int uCacheId, const char* pchFileName, const void* pubDataChunk, unsigned int cubDataChunk, unsigned int cubDataOffset, TSteamError* pError) = 0; + virtual int GetCacheDecryptionKey(unsigned int uAppId, char* szCacheDecryptionKey, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int GetSubscriptionExtendedInfo(unsigned int uSubscriptionId, const char* cszKeyName, char* szKeyValue, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError* pError) = 0; + virtual int GetSubscriptionPurchaseCountry(unsigned int uSubscriptionId, char* szCountry, unsigned int uBufSize , int* pPurchaseTime, TSteamError* pError) = 0; + virtual int GetAppUserDefinedRecord(unsigned int uAppId, KeyValueIteratorCallback_t AddEntryToKeyValueFunc, void* pvCKeyValue, TSteamError* pError) = 0; + + // ISteam006 + virtual int FindServersNumServers(ESteamServerType eSteamServerType) = 0; + virtual int FindServersIterateServer(ESteamServerType eSteamServerType, unsigned int uIndex, char* szServerAddress, int iServerAddressChars) = 0; + virtual const char * FindServersGetErrorString() = 0; + virtual int CheckAppOwnership(unsigned int uAppId, int* pbOwned, TSteamGlobalUserID* pSteamGlobalUserID, TSteamError* pError) = 0; + virtual SteamCallHandle_t GetCachePercentFragmentation(unsigned int uAppId, unsigned int* puPercentFragmented, TSteamError* pError) = 0; + virtual SteamCallHandle_t DefragCaches(unsigned int uAppId, TSteamError* pError) = 0; + virtual int IsFileNeededByApp(unsigned int uAppId, const char* cszFileName, unsigned int uFileSize, unsigned int* puCacheId, TSteamError* pError) = 0; + virtual SteamCallHandle_t WaitForAppResources(unsigned int uAppId, const char* cszMasterList, TSteamError* pError) = 0; + virtual int ForceCellId(unsigned int uCellId, TSteamError* pError) = 0; + virtual int GetAppDLCStatus( unsigned int uAppId, unsigned int uDLCCacheId, int* pbDownloaded, TSteamError* pError ) = 0; + virtual int StartEngineEx( TSteamError* pError, bool bStartOffline, bool bDetectOnlineOfflineState ) = 0; + virtual int IsUsingSdkContentServer( int* pbUsingSdkCS, TSteamError* pError ) = 0; + virtual int GetDepotParent( unsigned int uDepotId, unsigned int* puParentId, TSteamError* pError ) = 0; + virtual int GetCurrentCellID( unsigned int* puCellID, unsigned int* puPing, TSteamError* pError ) = 0; + virtual int ForceProcessLocalEngine() = 0; + virtual SteamCallHandle_t SetUser2( const char* cszUser, TSteamError* pError ) = 0; +}; + + +#define STEAM_INTERFACE_VERSION_006 "Steam006" + +#endif // ISTEAM006_H diff --git a/src/public SDK/ISteam2Bridge001.h b/src/public SDK/ISteam2Bridge001.h new file mode 100644 index 0000000..eb4e8a6 --- /dev/null +++ b/src/public SDK/ISteam2Bridge001.h @@ -0,0 +1,54 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM2BRIDGE001_H +#define ISTEAM2BRIDGE001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "BridgeCommon.h" + +abstract_class ISteam2Bridge001 +{ +public: + virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0; + + virtual bool SetAccountName( const char *pchAccountName ) = 0; + virtual bool SetPassword( const char *pchPassword ) = 0; + virtual bool SetAccountCreationTime( RTime32 rt ) = 0; + + virtual bool CreateProcess( void *lpVACBlob, uint32 cbBlobSize, char const *lpApplicationName, char *lpCommandLine, uint32 dwCreationFlags, void *lpEnvironment, char *lpCurrentDirectory, uint32 nGameID ) = 0; + + virtual EUniverse GetConnectedUniverse() = 0; + virtual const char *GetIPCountry() = 0; + + virtual uint32 GetNumLicenses() = 0; + + virtual int32 GetLicensePackageID( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeCreated( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeNextProcess( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinuteLimit( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinutesUsed( uint32 nLicenseIndex ) = 0; + virtual EPaymentMethod GetLicensePaymentMethod( uint32 nLicenseIndex ) = 0; + virtual ELicenseFlags GetLicenseFlags( uint32 nLicenseIndex ) = 0; + virtual const char *GetLicensePurchaseCountryCode( uint32 nLicenseIndex ) = 0; + + virtual bool SetOfflineMode( bool bOffline ) = 0; +}; + +#endif // ISTEAM2BRIDGE001_H diff --git a/src/public SDK/ISteam2Bridge002.h b/src/public SDK/ISteam2Bridge002.h new file mode 100644 index 0000000..716eb31 --- /dev/null +++ b/src/public SDK/ISteam2Bridge002.h @@ -0,0 +1,75 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAM2BRIDGE002_H +#define ISTEAM2BRIDGE002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "BridgeCommon.h" + +abstract_class ISteam2Bridge002 +{ +public: + virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0; + + virtual bool SetAccountName( const char *pchAccountName ) = 0; + virtual bool SetPassword( const char *pchPassword ) = 0; + virtual bool SetAccountCreationTime( RTime32 rt ) = 0; + + virtual bool CreateProcess( void *lpVACBlob, uint32 cbBlobSize, const char *lpApplicationName, char *lpCommandLine, uint32 dwCreationFlags, void *lpEnvironment, char *lpCurrentDirectory, uint32 nGameID ) = 0; + + virtual EUniverse GetConnectedUniverse() = 0; + virtual const char *GetIPCountry() = 0; + + virtual uint32 GetNumLicenses() = 0; + + virtual int32 GetLicensePackageID( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeCreated( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeNextProcess( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinuteLimit( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinutesUsed( uint32 nLicenseIndex ) = 0; + virtual EPaymentMethod GetLicensePaymentMethod( uint32 nLicenseIndex ) = 0; + virtual ELicenseFlags GetLicenseFlags( uint32 nLicenseIndex ) = 0; + virtual const char *GetLicensePurchaseCountryCode( uint32 nLicenseIndex ) = 0; + + virtual bool SetOfflineMode( bool bOffline ) = 0; + + virtual uint64 GetCurrentSessionToken() = 0; + + virtual void SetCellID( CellID_t cellID ) = 0; + + virtual void SetSteam2FullASTicket( uint8 *pubTicket, int cubTicket ) = 0; + + virtual bool BUpdateAppOwnershipTicket( AppId_t nAppID, bool bOnlyUpdateIfStale ) = 0; + + virtual uint32 GetAppOwnershipTicketLength( AppId_t nAppID ) = 0; + virtual uint32 GetAppOwnershipTicketData( AppId_t nAppID, void *pvBuffer, uint32 cubBuffer ) = 0; + + virtual bool GetAppDecryptionKey( AppId_t nAppID, void *pvBuffer, uint32 cubBuffer ) = 0; + + virtual const char* GetPlatformName( bool* pbIs64Bit ) = 0; + + virtual int32 GetSteam2FullASTicket( uint8* pubTicket, int32 cubTicket ) = 0; + + virtual void SetWinningPingTimeForCellID( uint32 uPing ) = 0; + + virtual void GetSteam2ID( TSteamGlobalUserID *pUserID ) = 0; +}; + +#endif // ISTEAM2BRIDGE002_H diff --git a/src/public SDK/ISteamAppList001.h b/src/public SDK/ISteamAppList001.h new file mode 100644 index 0000000..776a159 --- /dev/null +++ b/src/public SDK/ISteamAppList001.h @@ -0,0 +1,45 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPLIST001_H +#define ISTEAMAPPLIST001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppListCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: This is a restricted interface that can only be used by previously approved apps, +// contact your Steam Account Manager if you believe you need access to this API. +// This interface lets you detect installed apps for the local Steam client, useful for debugging tools +// to offer lists of apps to debug via Steam. +//----------------------------------------------------------------------------- +abstract_class ISteamAppList001 +{ +public: + virtual uint32 GetNumInstalledApps() = 0; + virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0; + + virtual int GetAppName( AppId_t nAppID, char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found + virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found + + 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 +}; + + +#endif // ISTEAMAPPLIST001_H diff --git a/src/public SDK/ISteamAppTicket001.h b/src/public SDK/ISteamAppTicket001.h new file mode 100644 index 0000000..70db99e --- /dev/null +++ b/src/public SDK/ISteamAppTicket001.h @@ -0,0 +1,38 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPTICKET001_H +#define ISTEAMAPPTICKET001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppTicketCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: hand out a reasonable "future proof" view of an app ownership ticket +// the raw (signed) buffer, and indices into that buffer where the appid and +// steamid are located. the sizes of the appid and steamid are implicit in +// (each version of) the interface - currently uin32 appid and uint64 steamid +//----------------------------------------------------------------------------- +abstract_class ISteamAppTicket001 +{ +public: + virtual uint32 GetAppOwnershipTicketData( AppId_t nAppId, void *pvSignedTicket, uint32 cbSignedTicket, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature ) = 0; +}; + +#endif // ISTEAMAPPTICKET001_H diff --git a/src/public SDK/ISteamApps001.h b/src/public SDK/ISteamApps001.h new file mode 100644 index 0000000..6dd7f50 --- /dev/null +++ b/src/public SDK/ISteamApps001.h @@ -0,0 +1,39 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS001_H +#define ISTEAMAPPS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps001 +{ +public: + // returns 0 if the key does not exist + // this may be true on first call, since the app data may not be cached locally yet + // If you expect it to exists wait for the AppDataChanged_t after the first failure and ask again + virtual int GetAppData( AppId_t nAppID, const char *pchKey, char *pchValue, int cchValueMax ) = 0; +}; + + +#endif // ISTEAMAPPS001_H diff --git a/src/public SDK/ISteamApps002.h b/src/public SDK/ISteamApps002.h new file mode 100644 index 0000000..0931091 --- /dev/null +++ b/src/public SDK/ISteamApps002.h @@ -0,0 +1,45 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS002_H +#define ISTEAMAPPS002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps002 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t nAppID ) = 0; +}; + + +#endif // ISTEAMAPPS002_H diff --git a/src/public SDK/ISteamApps003.h b/src/public SDK/ISteamApps003.h new file mode 100644 index 0000000..d7eb0b5 --- /dev/null +++ b/src/public SDK/ISteamApps003.h @@ -0,0 +1,47 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS003_H +#define ISTEAMAPPS003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps003 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t nAppID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t nAppID ) = 0; +}; + + +#endif // ISTEAMAPPS003_H diff --git a/src/public SDK/ISteamApps004.h b/src/public SDK/ISteamApps004.h new file mode 100644 index 0000000..800ede0 --- /dev/null +++ b/src/public SDK/ISteamApps004.h @@ -0,0 +1,70 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS004_H +#define ISTEAMAPPS004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps004 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t appID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t appID ) = 0; + + // returns the Unix time of the purchase of the app + virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0; + + // Checks if the user is subscribed to the current app through a free weekend + // This function will return false for users who have a retail or other type of license + // Before using, please ask your Valve technical contact how to package and secure your free weekened + virtual bool BIsSubscribedFromFreeWeekend() = 0; + + // Returns the number of DLC pieces for the running app + virtual int GetDLCCount() = 0; + + // Returns metadata for DLC by index, of range [0, GetDLCCount()] + virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0; + + // Install/Uninstall control for optional DLC + virtual void InstallDLC( AppId_t nAppID ) = 0; + virtual void UninstallDLC( AppId_t nAppID ) = 0; + +#ifdef _PS3 + // Result returned in a RegisterActivationCodeResponse_t callresult + virtual SteamAPICall_t RegisterActivationCode( const char *pchActivationCode ) = 0; +#endif +}; + + +#endif // ISTEAMAPPS004_H diff --git a/src/public SDK/ISteamApps005.h b/src/public SDK/ISteamApps005.h new file mode 100644 index 0000000..f4ad018 --- /dev/null +++ b/src/public SDK/ISteamApps005.h @@ -0,0 +1,86 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS005_H +#define ISTEAMAPPS005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps005 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t appID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t appID ) = 0; + + // returns the Unix time of the purchase of the app + virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0; + + // Checks if the user is subscribed to the current app through a free weekend + // This function will return false for users who have a retail or other type of license + // Before using, please ask your Valve technical contact how to package and secure your free weekened + virtual bool BIsSubscribedFromFreeWeekend() = 0; + + // Returns the number of DLC pieces for the running app + virtual int GetDLCCount() = 0; + + // Returns metadata for DLC by index, of range [0, GetDLCCount()] + virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0; + + // Install/Uninstall control for optional DLC + virtual void InstallDLC( AppId_t nAppID ) = 0; + virtual void UninstallDLC( AppId_t nAppID ) = 0; + + // Request cd-key for yourself or owned DLC. If you are interested in this + // data then make sure you provide us with a list of valid keys to be distributed + // to users when they purchase the game, before the game ships. + // You'll receive an AppProofOfPurchaseKeyResponse_t callback when + // the key is available (which may be immediately). + virtual void RequestAppProofOfPurchaseKey( AppId_t nAppID ) = 0; + + virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch + virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing + + virtual uint32 GetInstalledDepots( DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order + + // returns current app install folder for AppID, returns folder name length + virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0; + virtual bool BIsAppInstalled( AppId_t appID ) = 0; + +#ifdef _PS3 + // Result returned in a RegisterActivationCodeResponse_t callresult + virtual SteamAPICall_t RegisterActivationCode( const char *pchActivationCode ) = 0; +#endif +}; + + +#endif // ISTEAMAPPS005_H diff --git a/src/public SDK/ISteamApps006.h b/src/public SDK/ISteamApps006.h new file mode 100644 index 0000000..f970df0 --- /dev/null +++ b/src/public SDK/ISteamApps006.h @@ -0,0 +1,97 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS006_H +#define ISTEAMAPPS006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps006 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t appID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t appID ) = 0; + + // returns the Unix time of the purchase of the app + virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0; + + // Checks if the user is subscribed to the current app through a free weekend + // This function will return false for users who have a retail or other type of license + // Before using, please ask your Valve technical contact how to package and secure your free weekened + virtual bool BIsSubscribedFromFreeWeekend() = 0; + + // Returns the number of DLC pieces for the running app + virtual int GetDLCCount() = 0; + + // Returns metadata for DLC by index, of range [0, GetDLCCount()] + virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0; + + // Install/Uninstall control for optional DLC + virtual void InstallDLC( AppId_t nAppID ) = 0; + virtual void UninstallDLC( AppId_t nAppID ) = 0; + + // Request cd-key for yourself or owned DLC. If you are interested in this + // data then make sure you provide us with a list of valid keys to be distributed + // to users when they purchase the game, before the game ships. + // You'll receive an AppProofOfPurchaseKeyResponse_t callback when + // the key is available (which may be immediately). + virtual void RequestAppProofOfPurchaseKey( AppId_t nAppID ) = 0; + + virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch + virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing + virtual uint32 GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order + + // returns current app install folder for AppID, returns folder name length + virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0; + virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned) + + virtual CSteamID GetAppOwner() = 0; // returns the SteamID of the original owner. If different from current user, it's borrowed + + // Returns the associated launch param if the game is run via steam://run///?param1=value1;param2=value2;param3=value3 etc. + // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. + // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, + // but it is advised that you not param names beginning with an underscore for your own features. + virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0; + + // get download progress for optional DLC + virtual bool GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + +#ifdef _PS3 + // Result returned in a RegisterActivationCodeResponse_t callresult + virtual SteamAPICall_t RegisterActivationCode( const char *pchActivationCode ) = 0; +#endif +}; + + + +#endif // ISTEAMAPPS006_H diff --git a/src/public SDK/ISteamApps007.h b/src/public SDK/ISteamApps007.h new file mode 100644 index 0000000..d9a4106 --- /dev/null +++ b/src/public SDK/ISteamApps007.h @@ -0,0 +1,100 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMAPPS007_H +#define ISTEAMAPPS007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "AppsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +abstract_class ISteamApps007 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t appID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t appID ) = 0; + + // returns the Unix time of the purchase of the app + virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0; + + // Checks if the user is subscribed to the current app through a free weekend + // This function will return false for users who have a retail or other type of license + // Before using, please ask your Valve technical contact how to package and secure your free weekened + virtual bool BIsSubscribedFromFreeWeekend() = 0; + + // Returns the number of DLC pieces for the running app + virtual int GetDLCCount() = 0; + + // Returns metadata for DLC by index, of range [0, GetDLCCount()] + virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0; + + // Install/Uninstall control for optional DLC + virtual void InstallDLC( AppId_t nAppID ) = 0; + virtual void UninstallDLC( AppId_t nAppID ) = 0; + + // Request cd-key for yourself or owned DLC. If you are interested in this + // data then make sure you provide us with a list of valid keys to be distributed + // to users when they purchase the game, before the game ships. + // You'll receive an AppProofOfPurchaseKeyResponse_t callback when + // the key is available (which may be immediately). + virtual void RequestAppProofOfPurchaseKey( AppId_t nAppID ) = 0; + + virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch + virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing + virtual uint32 GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order + + // returns current app install folder for AppID, returns folder name length + virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0; + virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned) + + virtual CSteamID GetAppOwner() = 0; // returns the SteamID of the original owner. If different from current user, it's borrowed + + // Returns the associated launch param if the game is run via steam://run///?param1=value1;param2=value2;param3=value3 etc. + // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. + // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, + // but it is advised that you not param names beginning with an underscore for your own features. + virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0; + + // get download progress for optional DLC + virtual bool GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // return the buildid of this app, may change at any time based on backend updates to the game + virtual int GetAppBuildId() = 0; + +#ifdef _PS3 + // Result returned in a RegisterActivationCodeResponse_t callresult + virtual SteamAPICall_t RegisterActivationCode( const char *pchActivationCode ) = 0; +#endif +}; + + + +#endif // ISTEAMAPPS007_H diff --git a/src/public SDK/ISteamApps008.h b/src/public SDK/ISteamApps008.h new file mode 100644 index 0000000..5a5bab5 --- /dev/null +++ b/src/public SDK/ISteamApps008.h @@ -0,0 +1,100 @@ +//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. ======= +// +// Purpose: interface to app data in Steam +// +//============================================================================= + +#include "SteamTypes.h" +#include "AppsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to app data +//----------------------------------------------------------------------------- +class ISteamApps008 +{ +public: + virtual bool BIsSubscribed() = 0; + virtual bool BIsLowViolence() = 0; + virtual bool BIsCybercafe() = 0; + virtual bool BIsVACBanned() = 0; + virtual const char *GetCurrentGameLanguage() = 0; + virtual const char *GetAvailableGameLanguages() = 0; + + // only use this member if you need to check ownership of another game related to yours, a demo for example + virtual bool BIsSubscribedApp( AppId_t appID ) = 0; + + // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed + virtual bool BIsDlcInstalled( AppId_t appID ) = 0; + + // returns the Unix time of the purchase of the app + virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0; + + // Checks if the user is subscribed to the current app through a free weekend + // This function will return false for users who have a retail or other type of license + // Before using, please ask your Valve technical contact how to package and secure your free weekened + virtual bool BIsSubscribedFromFreeWeekend() = 0; + + // Returns the number of DLC pieces for the running app + virtual int GetDLCCount() = 0; + + // Returns metadata for DLC by index, of range [0, GetDLCCount()] + virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0; + + // Install/Uninstall control for optional DLC + virtual void InstallDLC( AppId_t nAppID ) = 0; + virtual void UninstallDLC( AppId_t nAppID ) = 0; + + // Request legacy cd-key for yourself or owned DLC. If you are interested in this + // data then make sure you provide us with a list of valid keys to be distributed + // to users when they purchase the game, before the game ships. + // You'll receive an AppProofOfPurchaseKeyResponse_t callback when + // the key is available (which may be immediately). + virtual void RequestAppProofOfPurchaseKey( AppId_t nAppID ) = 0; + + virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch + virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing + virtual uint32 GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order + + // returns current app install folder for AppID, returns folder name length + virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0; + virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned) + + // returns the SteamID of the original owner. If this CSteamID is different from ISteamUser::GetSteamID(), + // the user has a temporary license borrowed via Family Sharing + virtual CSteamID GetAppOwner() = 0; + + // Returns the associated launch param if the game is run via steam://run///?param1=value1¶m2=value2¶m3=value3 etc. + // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. + // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, + // but it is advised that you not param names beginning with an underscore for your own features. + // Check for new launch parameters on callback NewUrlLaunchParameters_t + virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0; + + // get download progress for optional DLC + virtual bool GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // return the buildid of this app, may change at any time based on backend updates to the game + virtual int GetAppBuildId() = 0; + + // Request all proof of purchase keys for the calling appid and asociated DLC. + // A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with + // appropriate appid values, ending with a final callback where the m_nAppId + // member is k_uAppIdInvalid (zero). + virtual void RequestAllProofOfPurchaseKeys() = 0; + + virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0; + + // Get command line if game was launched via Steam URL, e.g. steam://run////. + // This method of passing a connect string (used when joining via rich presence, accepting an + // invite, etc) is preferable to passing the connect string on the operating system command + // line, which is a security risk. In order for rich presence joins to go through this + // path and not be placed on the OS command line, you must set a value in your app's + // configuration on Steam. Ask Valve for help with this. + // + // If game was already running and launched again, the NewUrlLaunchParameters_t will be fired. + virtual int GetLaunchCommandLine( char *pszCommandLine, int cubCommandLine ) = 0; + + // Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID + virtual bool BIsSubscribedFromFamilySharing() = 0; +}; diff --git a/src/public SDK/ISteamBilling001.h b/src/public SDK/ISteamBilling001.h new file mode 100644 index 0000000..094d2f2 --- /dev/null +++ b/src/public SDK/ISteamBilling001.h @@ -0,0 +1,56 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMBILLING001_H +#define ISTEAMBILLING001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "BillingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to billing +//----------------------------------------------------------------------------- +abstract_class OBSOLETE_INTERFACE ISteamBilling001 +{ +public: + // Sets the billing address in the ISteamBilling object for use by other ISteamBilling functions (not stored on server) + virtual bool SetBillingAddress( const char *pchName, const char *pchAddress1, const char *pchAddress2, const char *pchCity, const char *pchPostcode, const char *pchState, const char *pchCountry, const char *pchPhone ) = 0; + // Gets any previous set billing address in the ISteamBilling object (not stored on server) + virtual bool GetBillingAddress( char *pchName, char *pchAddress1, char *pchAddress2, char *pchCity, char *pchPostcode, char *pchState, char *pchCountry, char *pchPhone ) = 0; + // Sets the billing address in the ISteamBilling object for use by other ISteamBilling functions (not stored on server) + virtual bool SetShippingAddress( const char *pchName, const char *pchAddress1, const char *pchAddress2, const char *pchCity, const char *pchPostcode, const char *pchState, const char *pchCountry, const char *pchPhone ) = 0; + // Gets any previous set billing address in the ISteamBilling object (not stored on server) + virtual bool GetShippingAddress( char *pchName, char *pchAddress1, char *pchAddress2, char *pchCity, char *pchPostcode, char *pchState, char *pchCountry, char *pchPhone ) = 0; + // Ask the server for the final price of package: requires that ISteamBilling billing & shipping address are set (can be same) + virtual bool GetFinalPrice( int32 nPackageID ) = 0; + + // Sets the credit card info in the ISteamBilling object for use by other ISteamBilling functions (may eventually also be stored on server) + virtual bool SetCardInfo( ECreditCardType eCreditCardType, const char *pchCardNumber, const char *pchCardHolderName, const char *pchCardExpYear, const char *pchCardExpMonth, const char *pchCardCVV2 ) = 0; + // Gets any credit card info in the ISteamBilling object (not stored on server) + virtual bool GetCardInfo( ECreditCardType *eCreditCardType, char *pchCardNumber, char *pchCardHolderName, char *pchCardExpYear, char *pchCardExpMonth, char *pchCardCVV2 ) = 0; + + // Ask the server to purchase a package: requires that ISteamBilling cardinfo, billing & shipping address are set + // gidCardID - if non-NIL, use a server stored card + // bStoreCardInfo - Should this cardinfo also be stored on the server + virtual bool Purchase( int32 nPackageID, int32 nExpectedCostCents, uint64 gidCardID, bool bStoreCardInfo ) = 0; +}; + + +#endif // ISTEAMBILLING001_H + diff --git a/src/public SDK/ISteamBilling002.h b/src/public SDK/ISteamBilling002.h new file mode 100644 index 0000000..73d0283 --- /dev/null +++ b/src/public SDK/ISteamBilling002.h @@ -0,0 +1,106 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMBILLING002_H +#define ISTEAMBILLING002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "BillingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to billing +//----------------------------------------------------------------------------- +abstract_class OBSOLETE_INTERFACE ISteamBilling002 +{ +public: + + virtual bool InitCreditCardPurchase( PackageId_t nPackageID, uint32 nCardIndex, bool bStoreCardInfo ) = 0; + virtual bool InitPayPalPurchase( PackageId_t nPackageID ) = 0; + + virtual bool GetActivationCodeInfo( const char *pchActivationCode ) = 0; + virtual bool PurchaseWithActivationCode( const char *pchActivationCode ) = 0; + + virtual bool GetFinalPrice() = 0; + + virtual bool CancelPurchase() = 0; + virtual bool CompletePurchase() = 0; + + virtual bool UpdateCardInfo( uint32 nCardIndex ) = 0; + + virtual bool DeleteCard( uint32 ) = 0; + + virtual bool GetCardList() = 0; + + virtual bool Obsolete_GetLicenses() = 0; + + virtual bool CancelLicense( PackageId_t nPackageID, int32 nCancelReason ) = 0; + + virtual bool GetPurchaseReceipts( bool bUnacknowledgedOnly ) = 0; + + // Sets the billing address in the ISteamBilling object for use by other ISteamBilling functions (not stored on server) + virtual bool SetBillingAddress( uint32 nCardIndex, const char *pchFirstName, const char *pchLastName, const char *pchAddress1, const char *pchAddress2, const char *pchCity, const char *pchPostcode, const char *pchState, const char *pchCountry, const char *pchPhone ) = 0; + + // Gets any previous set billing address in the ISteamBilling object (not stored on server) + virtual bool GetBillingAddress( uint32 nCardIndex, char *pchFirstName, char *pchLastName, char *pchAddress1, char *pchAddress2, char *pchCity, char *pchPostcode, char *pchState, char *pchCountry, char *pchPhone ) = 0; + + // Sets the billing address in the ISteamBilling object for use by other ISteamBilling functions (not stored on server) + virtual bool SetShippingAddress( const char *pchFirstName, const char *pchLastName, const char *pchAddress1, const char *pchAddress2, const char *pchCity, const char *pchPostcode, const char *pchState, const char *pchCountry, const char *pchPhone ) = 0; + // Gets any previous set billing address in the ISteamBilling object (not stored on server) + virtual bool GetShippingAddress( char *pchFirstName, char *pchLastName, char *pchAddress1, char *pchAddress2, char *pchCity, char *pchPostcode, char *pchState, char *pchCountry, char *pchPhone ) = 0; + + // Sets the credit card info in the ISteamBilling object for use by other ISteamBilling functions (may eventually also be stored on server) + virtual bool SetCardInfo( uint32 nCardIndex, ECreditCardType eCreditCardType, const char *pchCardNumber, const char *pchCardHolderFirstName, const char *pchCardHolderLastName, const char *pchCardExpYear, const char *pchCardExpMonth, const char *pchCardCVV2 ) = 0; + // Gets any credit card info in the ISteamBilling object (not stored on server) + virtual bool GetCardInfo( uint32 nCardIndex, ECreditCardType *eCreditCardType, char *pchCardNumber, char *pchCardHolderFirstName, char *pchCardHolderLastName, char *pchCardExpYear, char *pchCardExpMonth, char *pchCardCVV2 ) = 0; + + virtual PackageId_t GetLicensePackageID( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeCreated( uint32 nLicenseIndex ) = 0; + virtual RTime32 GetLicenseTimeNextProcess( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinuteLimit( uint32 nLicenseIndex ) = 0; + virtual int32 GetLicenseMinutesUsed( uint32 nLicenseIndex ) = 0; + virtual EPaymentMethod GetLicensePaymentMethod( uint32 nLicenseIndex ) = 0; + virtual ELicenseFlags GetLicenseFlags( uint32 nLicenseIndex ) = 0; + virtual const char *GetLicensePurchaseCountryCode( uint32 nLicenseIndex ) = 0; + + virtual PackageId_t GetReceiptPackageID( uint32 nReceiptIndex ) = 0; + virtual EPurchaseStatus GetReceiptStatus( uint32 nReceiptIndex ) = 0; + virtual EPurchaseResultDetail GetReceiptResultDetail( uint32 nReceiptIndex ) = 0; + virtual RTime32 GetReceiptTransTime( uint32 nReceiptIndex ) = 0; + virtual uint64 GetReceiptTransID( uint32 nReceiptIndex ) = 0; + virtual EPaymentMethod GetReceiptPaymentMethod( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptBaseCost( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptTotalDiscount( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptTax( uint32 nReceiptIndex ) = 0; + virtual uint32 GetReceiptShipping( uint32 nReceiptIndex ) = 0; + virtual const char *GetReceiptCountryCode( uint32 nReceiptIndex ) = 0; + + virtual uint32 GetNumLicenses() = 0; + virtual uint32 GetNumReceipts() = 0; + + virtual bool PurchaseWithMachineID( PackageId_t nPackageID, const char *pchCustomData ) = 0; + + virtual bool InitClickAndBuyPurchase( PackageId_t nPackageID, int64 nAccountNum, const char *pchState, const char *pchCountryCode ) = 0; + + virtual bool GetPreviousClickAndBuyAccount( int64 *pnAccountNum, char *pchState, char *pchCountryCode ) = 0; + +}; + + +#endif // ISTEAMBILLING002_H + diff --git a/src/public SDK/ISteamClient006.h b/src/public SDK/ISteamClient006.h new file mode 100644 index 0000000..ecc83d9 --- /dev/null +++ b/src/public SDK/ISteamClient006.h @@ -0,0 +1,110 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT006_H +#define ISTEAMCLIENT006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local +//----------------------------------------------------------------------------- +abstract_class ISteamClient006 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // creates a global instance of a steam user, so that other processes can share it + // used by the steam UI, to share it's account info/connection with any games it launches + // fails (returns NULL) if an existing instance already exists + virtual HSteamUser CreateGlobalUser( HSteamPipe *phSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the IVac interface associated with the handle + // there is normally only one instance of VAC running, but using this connects it to the right user/account + virtual OBSOLETE_FUNCTION IVAC *GetIVAC( HSteamUser hSteamUser ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the name of a universe + virtual const char *GetUniverseName( EUniverse eUniverse ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamBilling interface + virtual ISteamBilling *GetISteamBilling( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamContentServer interface + virtual ISteamContentServer *GetISteamContentServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; +}; + + +#endif // ISTEAMCLIENT006_H + diff --git a/src/public SDK/ISteamClient007.h b/src/public SDK/ISteamClient007.h new file mode 100644 index 0000000..38714be --- /dev/null +++ b/src/public SDK/ISteamClient007.h @@ -0,0 +1,113 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT007_H +#define ISTEAMCLIENT007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local +//----------------------------------------------------------------------------- +abstract_class ISteamClient007 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamContentServer interface + virtual ISteamContentServer *GetISteamContentServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; +}; + +#endif // ISTEAMCLIENT007_H + diff --git a/src/public SDK/ISteamClient008.h b/src/public SDK/ISteamClient008.h new file mode 100644 index 0000000..3282e53 --- /dev/null +++ b/src/public SDK/ISteamClient008.h @@ -0,0 +1,110 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT008_H +#define ISTEAMCLIENT008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local +//----------------------------------------------------------------------------- +abstract_class ISteamClient008 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + +}; + +#endif // ISTEAMCLIENT008_H + diff --git a/src/public SDK/ISteamClient009.h b/src/public SDK/ISteamClient009.h new file mode 100644 index 0000000..110649a --- /dev/null +++ b/src/public SDK/ISteamClient009.h @@ -0,0 +1,118 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT009_H +#define ISTEAMCLIENT009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient009 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + +}; + + +#endif // ISTEAMCLIENT009_H + diff --git a/src/public SDK/ISteamClient010.h b/src/public SDK/ISteamClient010.h new file mode 100644 index 0000000..925e7ff --- /dev/null +++ b/src/public SDK/ISteamClient010.h @@ -0,0 +1,127 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT010_H +#define ISTEAMCLIENT010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient010 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; +}; + + +#endif // ISTEAMCLIENT010_H + diff --git a/src/public SDK/ISteamClient011.h b/src/public SDK/ISteamClient011.h new file mode 100644 index 0000000..f52e174 --- /dev/null +++ b/src/public SDK/ISteamClient011.h @@ -0,0 +1,133 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT011_H +#define ISTEAMCLIENT011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient011 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMasterServerUpdater interface + virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + +}; + + +#endif // ISTEAMCLIENT011_H + diff --git a/src/public SDK/ISteamClient012.h b/src/public SDK/ISteamClient012.h new file mode 100644 index 0000000..114b27c --- /dev/null +++ b/src/public SDK/ISteamClient012.h @@ -0,0 +1,137 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT012_H +#define ISTEAMCLIENT012_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient012 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUnifiedMessages interface + virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamController interface + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; +}; + + +#endif // ISTEAMCLIENT012_H + diff --git a/src/public SDK/ISteamClient013.h b/src/public SDK/ISteamClient013.h new file mode 100644 index 0000000..b9a7c6b --- /dev/null +++ b/src/public SDK/ISteamClient013.h @@ -0,0 +1,134 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT013_H +#define ISTEAMCLIENT013_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient013 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns game server stats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + + virtual ISteamHTTP* GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamUnifiedMessages* GetISteamUnifiedMessages( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamController* GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamUGC* GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamInventory* GetISteamInventory( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamVideo* GetISteamVideo( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + virtual ISteamAppList* GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + +}; + + +#endif // ISTEAMCLIENT013_H + diff --git a/src/public SDK/ISteamClient014.h b/src/public SDK/ISteamClient014.h new file mode 100644 index 0000000..5cfb400 --- /dev/null +++ b/src/public SDK/ISteamClient014.h @@ -0,0 +1,143 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT014_H +#define ISTEAMCLIENT014_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient014 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUnifiedMessages interface + virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamController interface + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player + virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; +}; + + +#endif // ISTEAMCLIENT014_H + diff --git a/src/public SDK/ISteamClient015.h b/src/public SDK/ISteamClient015.h new file mode 100644 index 0000000..0d21bef --- /dev/null +++ b/src/public SDK/ISteamClient015.h @@ -0,0 +1,146 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT015_H +#define ISTEAMCLIENT015_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient015 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUnifiedMessages interface + virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamController interface + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player + virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player Remote + virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; +}; + + +#endif // ISTEAMCLIENT015_H + diff --git a/src/public SDK/ISteamClient016.h b/src/public SDK/ISteamClient016.h new file mode 100644 index 0000000..a8e7fc2 --- /dev/null +++ b/src/public SDK/ISteamClient016.h @@ -0,0 +1,154 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT016_H +#define ISTEAMCLIENT016_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient016 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUnifiedMessages interface + virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamController interface + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player + virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player Remote + virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // html page display + virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // Helper functions for internal Steam usage + virtual void Set_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0; + virtual void Remove_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0; + virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; +}; + + +#endif // ISTEAMCLIENT016_H + diff --git a/src/public SDK/ISteamClient017.h b/src/public SDK/ISteamClient017.h new file mode 100644 index 0000000..73f4286 --- /dev/null +++ b/src/public SDK/ISteamClient017.h @@ -0,0 +1,163 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCLIENT017_H +#define ISTEAMCLIENT017_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ClientCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need to use these interfaces if you have a more complex versioning scheme, +// where you want to get different versions of the same interface in different dll's in your project. +//----------------------------------------------------------------------------- +abstract_class ISteamClient017 +{ +public: + // Creates a communication pipe to the Steam client + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + +#ifdef _PS3 + virtual ISteamPS3OverlayRender *GetISteamPS3OverlayRender() = 0; +#endif + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUnifiedMessages interface + virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamController interface + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player + virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player Remote + virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // html page display + virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // Helper functions for internal Steam usage + virtual void Set_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0; + virtual void Remove_SteamAPI_CPostAPIResultInProcess( SteamAPI_PostAPIResultInProcess_t func ) = 0; + virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; + + // inventory + virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Video + virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Parental controls + virtual void* GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; +}; + + +#endif // ISTEAMCLIENT017_H + diff --git a/src/public SDK/ISteamClient018.h b/src/public SDK/ISteamClient018.h new file mode 100644 index 0000000..bc4068c --- /dev/null +++ b/src/public SDK/ISteamClient018.h @@ -0,0 +1,154 @@ +//====== Copyright Valve Corporation, All rights reserved. ==================== +// +// Internal low-level access to Steamworks interfaces. +// +// Most users of the Steamworks SDK do not need to include this file. +// You should only include this if you are doing something special. +//============================================================================= + +#include "SteamTypes.h" +#include "ClientCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need these APIs if you have a more complex versioning scheme, +// or if you want to implement a multiplexed gameserver where a single process +// is handling multiple games at once with independent gameserver SteamIDs. +//----------------------------------------------------------------------------- +class ISteamClient018 +{ +public: + // Creates a communication pipe to the Steam client. + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0; + + // removes an allocated user + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the a generic interface + virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns apps interface + virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // networking + virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // remote storage + virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // user screenshots + virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // game search + virtual void *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead. + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message. + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + + // Expose HTTP interface + virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption. + virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; + + // Exposes the ISteamController interface - deprecated in favor of Steam Input + virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player + virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Music Player Remote + virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // html page display + virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0; + + // Helper functions for internal Steam usage + virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; + virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; + virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; + + // inventory + virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Video + virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Parental controls + virtual void *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the Steam Input interface for controller support + virtual void *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Steam Parties interface + virtual void *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + +}; diff --git a/src/public SDK/ISteamClient019.h b/src/public SDK/ISteamClient019.h new file mode 100644 index 0000000..6cb4a8c --- /dev/null +++ b/src/public SDK/ISteamClient019.h @@ -0,0 +1,157 @@ +//====== Copyright Valve Corporation, All rights reserved. ==================== +// +// Internal low-level access to Steamworks interfaces. +// +// Most users of the Steamworks SDK do not need to include this file. +// You should only include this if you are doing something special. +//============================================================================= + +#include "SteamTypes.h" +#include "ClientCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Interface to creating a new steam instance, or to +// connect to an existing steam instance, whether it's in a +// different process or is local. +// +// For most scenarios this is all handled automatically via SteamAPI_Init(). +// You'll only need these APIs if you have a more complex versioning scheme, +// or if you want to implement a multiplexed gameserver where a single process +// is handling multiple games at once with independent gameserver SteamIDs. +//----------------------------------------------------------------------------- +class ISteamClient019 +{ +public: + // Creates a communication pipe to the Steam client. + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamPipe CreateSteamPipe() = 0; + + // Releases a previously created communications pipe + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual bool BReleaseSteamPipe(HSteamPipe hSteamPipe) = 0; + + // connects to an existing global user, failing if none exists + // used by the game to coordinate with the steamUI + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) = 0; + + // used by game servers, create a steam user that won't be shared with anyone else + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual HSteamUser CreateLocalUser(HSteamPipe* phSteamPipe, EAccountType eAccountType) = 0; + + // removes an allocated user + // NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling + virtual void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) = 0; + + // retrieves the ISteamUser interface associated with the handle + virtual ISteamUser* GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // retrieves the ISteamGameServer interface associated with the handle + virtual ISteamGameServer* GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // set the local IP and Port to bind to + // this must be set before CreateLocalUser() + virtual void SetLocalIPBinding(uint32 unIP, uint16 usPort) = 0; + + // returns the ISteamFriends interface + virtual ISteamFriends* GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the ISteamUtils interface + virtual ISteamUtils* GetISteamUtils(HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the ISteamMatchmaking interface + virtual ISteamMatchmaking* GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the ISteamMatchmakingServers interface + virtual ISteamMatchmakingServers* GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the a generic interface + virtual void* GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the ISteamUserStats interface + virtual ISteamUserStats* GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns the ISteamGameServerStats interface + virtual ISteamGameServerStats* GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns apps interface + virtual ISteamApps* GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // networking + virtual ISteamNetworking* GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // remote storage + virtual ISteamRemoteStorage* GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // user screenshots + virtual ISteamScreenshots* GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // game search + virtual void* GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead. + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message. + virtual void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) = 0; + + // Trigger global shutdown for the DLL + virtual bool BShutdownIfAllPipesClosed() = 0; + + // Expose HTTP interface + virtual ISteamHTTP* GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption. + virtual void* DEPRECATED_GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Exposes the ISteamController interface - deprecated in favor of Steam Input + virtual ISteamController* GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Exposes the ISteamUGC interface + virtual ISteamUGC* GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // returns app list interface, only available on specially registered apps + virtual ISteamAppList* GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Music Player + virtual ISteamMusic* GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Music Player Remote + virtual ISteamMusicRemote* GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // html page display + virtual ISteamHTMLSurface* GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Helper functions for internal Steam usage + virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess(void (*)()) = 0; + virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess(void (*)()) = 0; + virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess(SteamAPI_CheckCallbackRegistered_t func) = 0; + + // inventory + virtual ISteamInventory* GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Video + virtual ISteamVideo* GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Parental controls + virtual void* GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Exposes the Steam Input interface for controller support + virtual void* GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Steam Parties interface + virtual void* GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + + // Steam Remote Play interface + virtual void* GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0; + +}; diff --git a/src/public SDK/ISteamContentServer001.h b/src/public SDK/ISteamContentServer001.h new file mode 100644 index 0000000..15e4b23 --- /dev/null +++ b/src/public SDK/ISteamContentServer001.h @@ -0,0 +1,38 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCONTENTSERVER001_H +#define ISTEAMCONTENTSERVER001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ContentServerCommon.h" + +abstract_class ISteamContentServer001 +{ +public: + virtual bool LogOn( uint32 uContentServerID ) = 0; + virtual bool LogOff() = 0; + + virtual bool BLoggedOn() = 0; + + virtual void SendClientContentAuthRequest( CSteamID steamID, uint32 unContentID ) = 0; +}; + + +#endif // ISTEAMCONTENTSERVER001_H diff --git a/src/public SDK/ISteamContentServer002.h b/src/public SDK/ISteamContentServer002.h new file mode 100644 index 0000000..b760480 --- /dev/null +++ b/src/public SDK/ISteamContentServer002.h @@ -0,0 +1,40 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCONTENTSERVER002_H +#define ISTEAMCONTENTSERVER002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ContentServerCommon.h" + +abstract_class ISteamContentServer002 +{ +public: + virtual bool LogOn( uint32 uContentServerID ) = 0; + virtual bool LogOff() = 0; + + virtual bool BLoggedOn() = 0; + + virtual void SendClientContentAuthRequest( CSteamID steamID, uint32 uContentID, uint64 ulSessionToken, bool bTokenPresent ) = 0; + + virtual bool BCheckTicket( CSteamID steamID, uint32 uContentID, const void *pvTicketData, uint32 cubTicketLength ) = 0; +}; + + +#endif // ISTEAMCONTENTSERVER001_H diff --git a/src/public SDK/ISteamController001.h b/src/public SDK/ISteamController001.h new file mode 100644 index 0000000..3a95f37 --- /dev/null +++ b/src/public SDK/ISteamController001.h @@ -0,0 +1,56 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCONTROLLER001_H +#define ISTEAMCONTROLLER001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ControllerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Native Steam controller support API +//----------------------------------------------------------------------------- +class ISteamController001 +{ +public: + + // + // Native controller support API + // + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init( const char *pchAbsolutePathToControllerConfigVDF ) = 0; + virtual bool Shutdown() = 0; + + // Pump callback/callresult events, SteamAPI_RunCallbacks will do this for you, + // normally never need to call directly. + virtual void RunFrame() = 0; + + // Get the state of the specified controller, returns false if that controller is not connected + virtual bool GetControllerState( uint32 unControllerIndex, SteamControllerState_t *pState ) = 0; + + // Trigger a haptic pulse on the controller + virtual void TriggerHapticPulse( uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Set the override mode which is used to choose to use different base/legacy bindings from your config file + virtual void SetOverrideMode( const char *pchMode ) = 0; +}; + + +#endif // ISTEAMCONTROLLER001_H diff --git a/src/public SDK/ISteamController002.h b/src/public SDK/ISteamController002.h new file mode 100644 index 0000000..ce4b75a --- /dev/null +++ b/src/public SDK/ISteamController002.h @@ -0,0 +1,31 @@ +#include "SteamTypes.h" +#include "ControllerCommon.h" + + +class ISteamController002 +{ +public: + + // + // Native controller support API + // + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Pump callback/callresult events, SteamAPI_RunCallbacks will do this for you, + // normally never need to call directly. + virtual void RunFrame() = 0; + + virtual int GetConnectedControllers( uint64 * ) = 0; + + // Trigger a haptic pulse on the controller + virtual void TriggerHapticPulse( uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + virtual unknown_ret ActivateMode( uint64, int32 ) = 0; + virtual int32 GetJoystickForHandle( uint64 ) = 0; + virtual uint64 GetHandleForJoystick( int32 ) = 0; + virtual unknown_ret GetModeAnalogOutputData( uint64, int32 ) = 0; + +}; diff --git a/src/public SDK/ISteamController003.h b/src/public SDK/ISteamController003.h new file mode 100644 index 0000000..13781ac --- /dev/null +++ b/src/public SDK/ISteamController003.h @@ -0,0 +1,90 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMCONTROLLER003_H +#define ISTEAMCONTROLLER003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "ControllerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Native Steam controller support API +//----------------------------------------------------------------------------- +class ISteamController003 +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Pump callback/callresult events + // Note: SteamAPI_RunCallbacks will do this for you, so you should never need to call this directly. + virtual void RunFrame() = 0; + + // Enumerate currently connected controllers + // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; + + // Invokes the Steam overlay and brings up the binding screen + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; + + // ACTION SETS + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; + virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + // ACTIONS + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual ControllerDigitalActionData003_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual ControllerAnalogActionData003_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; + + + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Trigger a haptic pulse on a controller + virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; +}; + + +#endif // ISTEAMCONTROLLER003_H diff --git a/src/public SDK/ISteamController004.h b/src/public SDK/ISteamController004.h new file mode 100644 index 0000000..f93e35f --- /dev/null +++ b/src/public SDK/ISteamController004.h @@ -0,0 +1,82 @@ +#include "SteamTypes.h" +#include "ControllerCommon.h" + + +class ISteamController004 +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. + virtual void RunFrame() = 0; + + // Enumerate currently connected controllers + // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; + + // Invokes the Steam overlay and brings up the binding screen + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; + + // ACTION SETS + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; + virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + // ACTIONS + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Trigger a haptic pulse on a controller + virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad + virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad + virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns raw motion data from the specified controller + virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; + + // Attempt to display origins of given action in the controller HUD, for the currently active action set + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + virtual bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; +}; + + diff --git a/src/public SDK/ISteamController005.h b/src/public SDK/ISteamController005.h new file mode 100644 index 0000000..f139225 --- /dev/null +++ b/src/public SDK/ISteamController005.h @@ -0,0 +1,93 @@ +#include "SteamTypes.h" +#include "ControllerCommon.h" + + +class ISteamController005 +{ +public: + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. + virtual void RunFrame() = 0; + + // Enumerate currently connected controllers + // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; + + // Invokes the Steam overlay and brings up the binding screen + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; + + // ACTION SETS + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; + virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + // ACTIONS + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Trigger a haptic pulse on a controller + virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + // Tigger a vibration event on supported controllers. + virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; + + // Set the controller LED color on supported controllers. + virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad + virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad + virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns raw motion data from the specified controller + virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; + + // Attempt to display origins of given action in the controller HUD, for the currently active action set + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + virtual bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin + virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular origin + virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; +}; + + diff --git a/src/public SDK/ISteamController006.h b/src/public SDK/ISteamController006.h new file mode 100644 index 0000000..d39b0fe --- /dev/null +++ b/src/public SDK/ISteamController006.h @@ -0,0 +1,104 @@ +#include "SteamTypes.h" +#include "ControllerCommon.h" + + +class ISteamController006 +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. + virtual void RunFrame() = 0; + + // Enumerate currently connected controllers + // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; + + // Invokes the Steam overlay and brings up the binding screen + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; + + // ACTION SETS + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; + virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0; + virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut ) = 0; + + + // ACTIONS + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Trigger a haptic pulse on a controller + virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + // Tigger a vibration event on supported controllers. + virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; + + // Set the controller LED color on supported controllers. + virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad + virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad + virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns raw motion data from the specified controller + virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; + + // Attempt to display origins of given action in the controller HUD, for the currently active action set + // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode + virtual bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + virtual bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin + virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular origin + virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Returns the input type for a particular handle + virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0; +}; + + + diff --git a/src/public SDK/ISteamController007.h b/src/public SDK/ISteamController007.h new file mode 100644 index 0000000..efaca07 --- /dev/null +++ b/src/public SDK/ISteamController007.h @@ -0,0 +1,130 @@ +#include "SteamTypes.h" +#include "ControllerCommon.h" + + +class ISteamController007 +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. This must + // be called from somewhere before GetConnectedControllers will return any handles + virtual void RunFrame() = 0; + + // Enumerate currently connected controllers + // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTION SETS + //----------------------------------------------------------------------------- + + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; + virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + // ACTION SET LAYERS + virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0; + virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTIONS + //----------------------------------------------------------------------------- + + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; + + // Get a local path to art for on-screen glyph for a particular origin - this call is cheap + virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized + virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Returns raw motion data from the specified controller + virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; + + //----------------------------------------------------------------------------- + // OUTPUTS + //----------------------------------------------------------------------------- + + // Trigger a haptic pulse on a controller + virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + // Trigger a vibration event on supported controllers. + virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; + + // Set the controller LED color on supported controllers. + virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; + + //----------------------------------------------------------------------------- + // Utility functions availible without using the rest of Steam Input API + //----------------------------------------------------------------------------- + + // Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode + // If the user is not in Big Picture Mode it will open up the binding in a new window + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; + + // Returns the input type for a particular handle + virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions + // to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input + virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index + virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified Xbox controller origin. This function is cheap. + virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular Xbox controller origin. This function is serialized. + virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for + // non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration + virtual EControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, EXboxOrigin eOrigin ) = 0; + + // Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EControllerActionOrigin_None + virtual EControllerActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin ) = 0; +}; + + + diff --git a/src/public SDK/ISteamFriends001.h b/src/public SDK/ISteamFriends001.h new file mode 100644 index 0000000..cef2409 --- /dev/null +++ b/src/public SDK/ISteamFriends001.h @@ -0,0 +1,106 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS001_H +#define ISTEAMFRIENDS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to friends +//----------------------------------------------------------------------------- +abstract_class ISteamFriends001 +{ +public: + // returns the local players name - guaranteed to not be NULL. + virtual const char *GetPersonaName() = 0; + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the friend status of the current user + virtual EPersonaState GetPersonaState() = 0; + // sets the status, communicates to server, tells all friends + virtual void SetPersonaState( EPersonaState ePersonaState ) = 0; + + // adds a friend to the users list. Friend will be notified that they have been added, and have the option of accept/decline + virtual bool AddFriend( CSteamID steamIDFriend ) = 0; + // removes the friend from the list, and blocks them from contacting the user again + virtual bool RemoveFriend( CSteamID steamIDFriend ) = 0; + // returns true if the specified user is considered a friend (can see our online status) + virtual bool HasFriend( CSteamID steamIDFriend ) = 0; + + // gets the relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + // returns true if the specified user is considered a friend (can see our online status) + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // retrieves details about the game the friend is currently playing - returns false if the friend is not playing any games + // this is deprecated, please use the GetFriendGamePlayed# functions below + virtual bool Deprecated_GetFriendGamePlayed( CSteamID steamIDFriend, int32 *pnGameID, uint32 *punGameIP, uint16 *pusGamePort ) = 0; + + // returns the name of a friend - guaranteed to not be NULL. + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // adds a friend by email address or account name - value returned in callback + virtual HSteamCall AddFriendByName( const char *pchEmailOrAccountName ) = 0; + + // friend iteration + virtual int GetFriendCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetFriendByIndex, int, iFriend) /*virtual CSteamID GetFriendByIndex( int iFriend ) = 0;*/ + + // generic friend->friend message sending + // DEPRECATED, use the sized-buffer version instead (has much higher max buffer size) + virtual void SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const char *pchMsgBody ) = 0; + + // steam registry, accessed by friend + virtual void SetFriendRegValue( CSteamID steamIDFriend, const char *pchKey, const char *pchValue ) = 0; + virtual const char *GetFriendRegValue( CSteamID steamIDFriend, const char *pchKey ) = 0; + + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // chat message iteration + // returns the number of bytes in the message, filling pvData with as many of those bytes as possible + // returns 0 if the steamID or iChatID are invalid + virtual int GetChatMessage( CSteamID steamIDFriend, int iChatID, void *pvData, int cubData, EChatEntryType *peFriendMsgType ) = 0; + + // generic friend->friend message sending, takes a sized buffer + virtual bool SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const void *pvMsgBody, int cubMsgBody ) = 0; + + // returns the chatID that a chat should be resumed from when switching chat contexts + virtual OBSOLETE_FUNCTION int GetChatIDOfChatHistoryStart( CSteamID steamIDFriend ) = 0; + // sets where a chat with a user should resume + virtual OBSOLETE_FUNCTION void SetChatHistoryStart( CSteamID steamIDFriend, int iChatID ) = 0; + // clears the chat history - should be called when a chat dialog closes + // the chat history can still be recovered by another context using SetChatHistoryStart() to reset the ChatIDOfChatHistoryStart + virtual void ClearChatHistory( CSteamID steamIDFriend ) = 0; + + virtual HSteamCall InviteFriendByEmail( const char *pchEmailOrAccountName ) = 0; + + virtual uint32 GetBlockedFriendCount() = 0; + + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort ) = 0; + virtual bool GetFriendGamePlayed2( CSteamID steamDIFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0; + +}; + + +#endif // ISTEAMFRIENDS_H + diff --git a/src/public SDK/ISteamFriends002.h b/src/public SDK/ISteamFriends002.h new file mode 100644 index 0000000..c636af8 --- /dev/null +++ b/src/public SDK/ISteamFriends002.h @@ -0,0 +1,100 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS002_H +#define ISTEAMFRIENDS002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + +abstract_class ISteamFriends002 +{ +public: + // returns the local players name - guaranteed to not be NULL. + virtual const char *GetPersonaName() = 0; + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + // gets the friend status of the current user + virtual EPersonaState GetPersonaState() = 0; + // sets the status, communicates to server, tells all friends + virtual void SetPersonaState( EPersonaState ePersonaState ) = 0; + + // friend iteration + virtual int GetFriendCount( EFriendFlags iFriendFlags ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendByIndex, int, iFriend, EFriendFlags, iFriendFlags) /*virtual CSteamID GetFriendByIndex( int iFriend, EFriendFlags iFriendFlags ) = 0;*/ + + // gets the relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + // returns true if the specified user is considered a friend (can see our online status) + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + // returns the name of a friend - guaranteed to not be NULL. + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // steam registry, accessed by friend + virtual void SetFriendRegValue( CSteamID steamIDFriend, const char *pchKey, const char *pchValue ) = 0; + virtual const char *GetFriendRegValue( CSteamID steamIDFriend, const char *pchKey ) = 0; + + // returns true if the friend is actually in a game + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0; + + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // adds a friend to the users list. Friend will be notified that they have been added, and have the option of accept/decline + virtual bool AddFriend( CSteamID steamIDFriend ) = 0; + // removes the friend from the list, and blocks them from contacting the user again + virtual bool RemoveFriend( CSteamID steamIDFriend ) = 0; + + // returns true if the specified user is considered a friend (can see our online status) + virtual bool HasFriend( CSteamID steamIDFriend, EFriendFlags iFriendFlags ) = 0; + + // adds a friend by email address or account name - value returned in callback + virtual HSteamCall AddFriendByName( const char *pchEmailOrAccountName ) = 0; + + virtual bool InviteFriendByEmail( const char *emailAddr ) = 0; + + // chat message iteration + // returns the number of bytes in the message, filling pvData with as many of those bytes as possible + // returns 0 if the steamID or iChatID are invalid + virtual int GetChatMessage( CSteamID steamIDFriend, int iChatID, void *pvData, int cubData, EChatEntryType *peFriendMsgType ) = 0; + + // generic friend->friend message sending, takes a sized buffer + virtual bool SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eFriendMsgType, const void *pvMsgBody, int cubMsgBody ) = 0; + + // returns the chatID that a chat should be resumed from when switching chat contexts + virtual OBSOLETE_FUNCTION int GetChatIDOfChatHistoryStart( CSteamID steamIDFriend ) = 0; + // sets where a chat with a user should resume + virtual OBSOLETE_FUNCTION void SetChatHistoryStart( CSteamID steamIDFriend, int iChatID ) = 0; + // clears the chat history - should be called when a chat dialog closes + // the chat history can still be recovered by another context using SetChatHistoryStart() to reset the ChatIDOfChatHistoryStart + virtual void ClearChatHistory( CSteamID steamIDFriend ) = 0; + + // clan functions + virtual int GetClanCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanByIndex, int, iClan) /*virtual CSteamID GetClanByIndex( int iClan ) = 0;*/ + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + + virtual bool InviteFriendToClan( CSteamID steamIDfriend, CSteamID steamIDclan ) = 0; + virtual bool AcknowledgeInviteToClan( CSteamID steamID, bool ) = 0; + + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendFromSourceByIndex, CSteamID, steamIDSource, int, iFriend) /*virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;*/ +}; + +#endif // ISTEAMFRIENDS002_H diff --git a/src/public SDK/ISteamFriends003.h b/src/public SDK/ISteamFriends003.h new file mode 100644 index 0000000..bcf9c43 --- /dev/null +++ b/src/public SDK/ISteamFriends003.h @@ -0,0 +1,104 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS003_H +#define ISTEAMFRIENDS003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + + +//----------------------------------------------------------------------------- +// Purpose: interface to friends +//----------------------------------------------------------------------------- +abstract_class ISteamFriends003 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetFriendAvatar( CSteamID steamIDFriend ) = 0; + // returns true if the friend is actually in a game + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open ("Friends", "Community", "Players", "Settings") + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; +}; + + +#endif // ISTEAMFRIENDS003_H diff --git a/src/public SDK/ISteamFriends004.h b/src/public SDK/ISteamFriends004.h new file mode 100644 index 0000000..fc81788 --- /dev/null +++ b/src/public SDK/ISteamFriends004.h @@ -0,0 +1,99 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS004_H +#define ISTEAMFRIENDS004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + +abstract_class ISteamFriends004 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetFriendAvatar( CSteamID steamIDFriend, int eAvatarSize ) = 0; + // returns true if the friend is actually in a game + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open ("Friends", "Community", "Players", "Settings") + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; +}; + + +#endif // ISTEAMFRIENDS004_H diff --git a/src/public SDK/ISteamFriends005.h b/src/public SDK/ISteamFriends005.h new file mode 100644 index 0000000..91d635f --- /dev/null +++ b/src/public SDK/ISteamFriends005.h @@ -0,0 +1,123 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS005_H +#define ISTEAMFRIENDS005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends005 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetFriendAvatar( CSteamID steamIDFriend, int eAvatarSize ) = 0; + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; +}; + + + +#endif // ISTEAMFRIENDS005_H diff --git a/src/public SDK/ISteamFriends006.h b/src/public SDK/ISteamFriends006.h new file mode 100644 index 0000000..e3e3f29 --- /dev/null +++ b/src/public SDK/ISteamFriends006.h @@ -0,0 +1,130 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS006_H +#define ISTEAMFRIENDS006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends006 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // gets the avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetFriendAvatar( CSteamID steamIDFriend, int eAvatarSize ) = 0; + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; +}; + + + +#endif // ISTEAMFRIENDS006_H diff --git a/src/public SDK/ISteamFriends007.h b/src/public SDK/ISteamFriends007.h new file mode 100644 index 0000000..b89ddae --- /dev/null +++ b/src/public SDK/ISteamFriends007.h @@ -0,0 +1,138 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS007_H +#define ISTEAMFRIENDS007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends007 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; +}; + + + +#endif // ISTEAMFRIENDS007_H diff --git a/src/public SDK/ISteamFriends008.h b/src/public SDK/ISteamFriends008.h new file mode 100644 index 0000000..8a2d69f --- /dev/null +++ b/src/public SDK/ISteamFriends008.h @@ -0,0 +1,166 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS008_H +#define ISTEAMFRIENDS008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends008 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; +}; + + + +#endif // ISTEAMFRIENDS008_H diff --git a/src/public SDK/ISteamFriends009.h b/src/public SDK/ISteamFriends009.h new file mode 100644 index 0000000..c265f9d --- /dev/null +++ b/src/public SDK/ISteamFriends009.h @@ -0,0 +1,197 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS009_H +#define ISTEAMFRIENDS009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends009 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; +}; + + + +#endif // ISTEAMFRIENDS009_H diff --git a/src/public SDK/ISteamFriends010.h b/src/public SDK/ISteamFriends010.h new file mode 100644 index 0000000..cb0daa2 --- /dev/null +++ b/src/public SDK/ISteamFriends010.h @@ -0,0 +1,214 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS010_H +#define ISTEAMFRIENDS010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends010 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendByIndex, int, iFriend, int, iFriendFlags) /*virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0;*/ + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanByIndex, int, iClan) /*virtual CSteamID GetClanByIndex( int iClan ) = 0;*/ + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + virtual bool GetClanActivityCounts( CSteamID steamID, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID groupIDs[], int nIds ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendFromSourceByIndex, CSteamID, steamIDSource, int, iFriend) /*virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;*/ + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanOwner, CSteamID, steamIDClan) /*virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0;*/ + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetClanOfficerByIndex, CSteamID, steamIDClan, int, iOfficer) /*virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0;*/ + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual EUserRestriction GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetCoplayFriend, int, iCoplayFriend) /*virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0;*/ + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + + virtual SteamAPICall_t JoinClanChatRoom( CSteamID groupID ) = 0; + virtual bool LeaveClanChatRoom( CSteamID groupID ) = 0; + virtual int GetClanChatMemberCount( CSteamID groupID ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetChatMemberByIndex, CSteamID, groupID, int, iIndex) /*virtual CSteamID GetChatMemberByIndex( CSteamID groupID, int iIndex ) = 0;*/ + virtual bool SendClanChatMessage( CSteamID groupID, const char *cszMessage ) = 0; + virtual int GetClanChatMessage( CSteamID groupID, int iChatID, void *pvData, int cubData, EChatEntryType *peChatEntryType, CSteamID *pSteamIDChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID groupID, CSteamID userID ) = 0; + virtual bool IsClanChatWindowOpenInSteam( CSteamID groupID ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID groupID ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID groupID ) = 0; + virtual bool SetListenForFriendsMessages( bool bListen ) = 0; + virtual bool ReplyToFriendMessage( CSteamID friendID, const char *cszMessage ) = 0; + virtual int GetFriendMessage( CSteamID friendID, int iChatID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; +}; + + + +#endif // ISTEAMFRIENDS010_H diff --git a/src/public SDK/ISteamFriends011.h b/src/public SDK/ISteamFriends011.h new file mode 100644 index 0000000..5a8d70b --- /dev/null +++ b/src/public SDK/ISteamFriends011.h @@ -0,0 +1,233 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS011_H +#define ISTEAMFRIENDS011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends011 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual void SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "tradeinvite" - opens a chat window to the specified user and invites them to trade + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *, CSteamID * ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; +}; + + + +#endif // ISTEAMFRIENDS011_H diff --git a/src/public SDK/ISteamFriends012.h b/src/public SDK/ISteamFriends012.h new file mode 100644 index 0000000..103e732 --- /dev/null +++ b/src/public SDK/ISteamFriends012.h @@ -0,0 +1,228 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS012_H +#define ISTEAMFRIENDS012_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends012 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // sets the player name, stores it on the server and publishes the changes to all friends who are online + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendByIndex, int, iFriend, int, iFriendFlags) /*virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0;*/ + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanByIndex, int, iClan) /*virtual CSteamID GetClanByIndex( int iClan ) = 0;*/ + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + + virtual bool GetClanActivityCounts( CSteamID steamID, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID groupIDs[], int nIds ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetFriendFromSourceByIndex, CSteamID, steamIDSource, int, iFriend) /*virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;*/ + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "LobbyInvite", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + // You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetClanOwner, CSteamID, steamIDClan) /*virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0;*/ + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetClanOfficerByIndex, CSteamID, steamIDClan, int, iOfficer) /*virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0;*/ + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual EUserRestriction GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetCoplayFriend, int, iCoplayFriend) /*virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0;*/ + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetChatMemberByIndex, CSteamID, steamIDClan, int, iUser) /*virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0;*/ + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *pSteamIDChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; +}; + + + +#endif // ISTEAMFRIENDS012_H diff --git a/src/public SDK/ISteamFriends013.h b/src/public SDK/ISteamFriends013.h new file mode 100644 index 0000000..3576d24 --- /dev/null +++ b/src/public SDK/ISteamFriends013.h @@ -0,0 +1,241 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS013_H +#define ISTEAMFRIENDS013_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends013 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // Sets the player name, stores it on the server and publishes the changes to all friends who are online. + // Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success. + // + // The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t. + // + // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted + // to change the name back, in addition to the SetPersonaNameResponse_t callback. + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + // "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend + // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend + // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite + // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *, CSteamID * ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; +}; + + + +#endif // ISTEAMFRIENDS013_H diff --git a/src/public SDK/ISteamFriends014.h b/src/public SDK/ISteamFriends014.h new file mode 100644 index 0000000..095c352 --- /dev/null +++ b/src/public SDK/ISteamFriends014.h @@ -0,0 +1,244 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS014_H +#define ISTEAMFRIENDS014_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends014 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // Sets the player name, stores it on the server and publishes the changes to all friends who are online. + // Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success. + // + // The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t. + // + // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted + // to change the name back, in addition to the SetPersonaNameResponse_t callback. + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + + // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. + virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + // "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend + // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend + // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite + // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *psteamidChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; +}; + + + +#endif // ISTEAMFRIENDS014_H diff --git a/src/public SDK/ISteamFriends015.h b/src/public SDK/ISteamFriends015.h new file mode 100644 index 0000000..0173a28 --- /dev/null +++ b/src/public SDK/ISteamFriends015.h @@ -0,0 +1,258 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMFRIENDS015_H +#define ISTEAMFRIENDS015_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +abstract_class ISteamFriends015 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // Sets the player name, stores it on the server and publishes the changes to all friends who are online. + // Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success. + // + // The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t. + // + // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted + // to change the name back, in addition to the SetPersonaNameResponse_t callback. + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + // friends steam level + virtual int GetFriendSteamLevel( CSteamID steamIDFriend ) = 0; + + // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. + virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0; + + // friend grouping (tag) apis + // returns the number of friends groups + virtual int GetFriendsGroupCount() = 0; + // returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid) + virtual FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) = 0; + // returns the name for the given friends group (NULL in the case of invalid friends group IDs) + virtual const char *GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) = 0; + // returns the number of members in a given friends group + virtual int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) = 0; + // gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid + virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + // "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend + // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend + // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite + // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Up to 20 different keys can be set + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // rich invite support + // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game + // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string + // invites can only be sent to friends + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *psteamidChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; +}; + + + +#endif // ISTEAMFRIENDS015_H diff --git a/src/public SDK/ISteamFriends016.h b/src/public SDK/ISteamFriends016.h new file mode 100644 index 0000000..8697e0b --- /dev/null +++ b/src/public SDK/ISteamFriends016.h @@ -0,0 +1,242 @@ +#include "SteamTypes.h" +#include "FriendsCommon.h" + + + +class ISteamFriends016 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // Sets the player name, stores it on the server and publishes the changes to all friends who are online. + // Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success. + // + // The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t. + // + // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted + // to change the name back, in addition to the SetPersonaNameResponse_t callback. + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + // friends steam level + virtual int GetFriendSteamLevel( CSteamID steamIDFriend ) = 0; + + // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. + // DEPRECATED: GetPersonaName follows the Steam nickname preferences, so apps shouldn't need to care about nicknames explicitly. + virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0; + + // friend grouping (tag) apis + // returns the number of friends groups + virtual int GetFriendsGroupCount() = 0; + // returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid) + virtual FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) = 0; + // returns the name for the given friends group (NULL in the case of invalid friends group IDs) + virtual const char *GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) = 0; + // returns the number of members in a given friends group + virtual int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) = 0; + // gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid + virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options include "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements", + // "chatroomgroup/nnnn" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + // "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend + // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend + // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite + // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // Rich invite support. + // If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string. + // (Or you can configure yout game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.) + // Invites can only be sent to friends. + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *psteamidChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; + + virtual bool IsClanPublic( CSteamID steamIDClan ) = 0; + virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0; + + /// Return the number of chats (friends or chat rooms) with unread messages. + /// A "priority" message is one that would generate some sort of toast or + /// notification, and depends on user settings. + /// + /// You can register for UnreadChatMessagesChanged_t callbacks to know when this + /// has potentially changed. + virtual int GetNumChatsWithUnreadPriorityMessages() = 0; +}; \ No newline at end of file diff --git a/src/public SDK/ISteamFriends017.h b/src/public SDK/ISteamFriends017.h new file mode 100644 index 0000000..1d86e14 --- /dev/null +++ b/src/public SDK/ISteamFriends017.h @@ -0,0 +1,257 @@ +//====== Copyright Valve Corporation, All rights reserved. ==================== +// +// Purpose: interface to both friends list data and general information about users +// +//============================================================================= + +#include "SteamTypes.h" +#include "FriendsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: interface to accessing information about individual users, +// that can be a friend, in a group, on a game server or in a lobby with the local user +//----------------------------------------------------------------------------- +class ISteamFriends017 +{ +public: + // returns the local players name - guaranteed to not be NULL. + // this is the same name as on the users community profile page + // this is stored in UTF-8 format + // like all the other interface functions that return a char *, it's important that this pointer is not saved + // off; it will eventually be free'd or re-allocated + virtual const char *GetPersonaName() = 0; + + // Sets the player name, stores it on the server and publishes the changes to all friends who are online. + // Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success. + // + // The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t. + // + // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted + // to change the name back, in addition to the SetPersonaNameResponse_t callback. + ///STEAM_CALL_RESULT( SetPersonaNameResponse_t ) + virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; + + // gets the status of the current user + virtual EPersonaState GetPersonaState() = 0; + + // friend iteration + // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria + // then GetFriendByIndex() can then be used to return the id's of each of those users + virtual int GetFriendCount( int iFriendFlags ) = 0; + + // returns the steamID of a user + // iFriend is a index of range [0, GetFriendCount()) + // iFriendsFlags must be the same value as used in GetFriendCount() + // the returned CSteamID can then be used by all the functions below to access details about the user + virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0; + + // returns a relationship to a user + virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0; + + // returns the current status of the specified user + // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user + virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0; + + // returns the name another user - guaranteed to not be NULL. + // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user + // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously + // + virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; + + // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo ) = 0; + // accesses old friends names - returns an empty string when their are no more items in the history + virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; + // friends steam level + virtual int GetFriendSteamLevel( CSteamID steamIDFriend ) = 0; + + // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. + // DEPRECATED: GetPersonaName follows the Steam nickname preferences, so apps shouldn't need to care about nicknames explicitly. + virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0; + + // friend grouping (tag) apis + // returns the number of friends groups + virtual int GetFriendsGroupCount() = 0; + // returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid) + virtual FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) = 0; + // returns the name for the given friends group (NULL in the case of invalid friends group IDs) + virtual const char *GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) = 0; + // returns the number of members in a given friends group + virtual int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) = 0; + // gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid + virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0; + + // returns true if the specified user meets any of the criteria specified in iFriendFlags + // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values + virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0; + + // clan (group) iteration and access functions + virtual int GetClanCount() = 0; + virtual CSteamID GetClanByIndex( int iClan ) = 0; + virtual const char *GetClanName( CSteamID steamIDClan ) = 0; + virtual const char *GetClanTag( CSteamID steamIDClan ) = 0; + // returns the most recent information we have about what's happening in a clan + virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; + // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest + virtual SteamAPICall_t DownloadClanActivityCounts( CSteamID *psteamIDClans, int cClansToRequest ) = 0; + + // iterators for getting users in a chat room, lobby, game server or clan + // note that large clans that cannot be iterated by the local user + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + // steamIDSource can be the steamID of a group, game server, lobby or chat room + virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0; + virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0; + + // returns true if the local user can see that steamIDUser is a member or in steamIDSource + virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0; + + // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) + virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; + + // activates the game overlay, with an optional dialog to open + // valid options include "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements", + // "chatroomgroup/nnnn" + virtual void ActivateGameOverlay( const char *pchDialog ) = 0; + + // activates game overlay to a specific place + // valid options are + // "steamid" - opens the overlay web browser to the specified user or groups profile + // "chat" - opens a chat window to the specified user, or joins the group chat + // "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API + // "stats" - opens the overlay web browser to the specified user's stats + // "achievements" - opens the overlay web browser to the specified user's achievements + // "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend + // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend + // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite + // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite + virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0; + + // activates game overlay web browser directly to the specified URL + // full address with protocol type is required, e.g. http://www.steamgames.com/ + virtual void ActivateGameOverlayToWebPage( const char *pchURL, int eMode = 0 ) = 0; + + // activates game overlay to store page for app + virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; + + // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is + // in game + virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0; + + // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. + virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0; + + // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0; + + // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again + virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0; + + // requests information about a user - persona name & avatar + // if bRequireNameOnly is set, then the avatar of a user isn't downloaded + // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them + // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved + // if returns false, it means that we already have all the details about that user, and functions can be called immediately + virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0; + + // requests information about a clan officer list + // when complete, data is returned in ClanOfficerListResponse_t call result + // this makes available the calls below + // you can only ask about clans that a user is a member of + // note that this won't download avatars automatically; if you get an officer, + // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar + ///STEAM_CALL_RESULT( ClanOfficerListResponse_t ) + virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; + + // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed + + // returns the steamID of the clan owner + virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0; + // returns the number of officers in a clan (including the owner) + virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0; + // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) + virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0; + // if current user is chat restricted, he can't send or receive any text/voice chat messages. + // the user can't see custom avatars. But the user can be online and send/recv game invites. + // a chat restricted user can't add friends or join any groups. + virtual uint32 GetUserRestrictions() = 0; + + // Rich Presence data is automatically shared between friends who are in the same game + // Each user has a set of Key/Value pairs + // Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength + // There are two magic keys: + // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list + // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game + // GetFriendRichPresence() returns an empty string "" if no value is set + // SetRichPresence() to a NULL or an empty string deletes the key + // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() + // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) + virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0; + virtual void ClearRichPresence() = 0; + virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0; + virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0; + virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0; + // Requests rich presence for a specific user. + virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; + + // Rich invite support. + // If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string. + // (Or you can configure yout game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.) + // Invites can only be sent to friends. + virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; + + // recently-played-with friends iteration + // this iterates the entire list of users recently played with, across games + // GetFriendCoplayTime() returns as a unix time + virtual int GetCoplayFriendCount() = 0; + virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0; + virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0; + virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0; + + // chat interface for games + // this allows in-game access to group (clan) chats from in the game + // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay + // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat + //STEAM_CALL_RESULT( JoinClanChatRoomCompletionResult_t ) + virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; + virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; + virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; + virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; + virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, CSteamID *psteamidChatter ) = 0; + virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; + + // interact with the Steam (game overlay / desktop) + virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0; + + // peer-to-peer chat interception + // this is so you can show P2P chats inline in the game + virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0; + virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0; + virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // following apis + //STEAM_CALL_RESULT( FriendsGetFollowerCount_t ) + virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; + //STEAM_CALL_RESULT( FriendsIsFollowing_t ) + virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; + //STEAM_CALL_RESULT( FriendsEnumerateFollowingList_t ) + virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; + + virtual bool IsClanPublic( CSteamID steamIDClan ) = 0; + virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0; + + /// Return the number of chats (friends or chat rooms) with unread messages. + /// A "priority" message is one that would generate some sort of toast or + /// notification, and depends on user settings. + /// + /// You can register for UnreadChatMessagesChanged_t callbacks to know when this + /// has potentially changed. + virtual int GetNumChatsWithUnreadPriorityMessages() = 0; +}; \ No newline at end of file diff --git a/src/public SDK/ISteamGameCoordinator001.h b/src/public SDK/ISteamGameCoordinator001.h new file mode 100644 index 0000000..aca21bd --- /dev/null +++ b/src/public SDK/ISteamGameCoordinator001.h @@ -0,0 +1,48 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMECOORDINATOR001_H +#define ISTEAMGAMECOORDINATOR001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameCoordinatorCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for sending and receiving messages from the Game Coordinator +// for this application +//----------------------------------------------------------------------------- +abstract_class ISteamGameCoordinator001 +{ +public: + + // sends a message to the Game Coordinator + virtual EGCResults SendMessage( uint32 unMsgType, const void *pubData, uint32 cubData ) = 0; + + // returns true if there is a message waiting from the game coordinator + virtual bool IsMessageAvailable( uint32 *pcubMsgSize ) = 0; + + // fills the provided buffer with the first message in the queue and returns k_EGCResultOK or + // returns k_EGCResultNoMessage if there is no message waiting. pcubMsgSize is filled with the message size. + // If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned + // and the message remains at the head of the queue. + virtual EGCResults RetrieveMessage( uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + +}; + +#endif // ISTEAMGAMECOORDINATOR001_H diff --git a/src/public SDK/ISteamGameSearch001.h b/src/public SDK/ISteamGameSearch001.h new file mode 100644 index 0000000..44fbd0b --- /dev/null +++ b/src/public SDK/ISteamGameSearch001.h @@ -0,0 +1,70 @@ +#include "SteamTypes.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +class ISteamGameSearch001 +{ +public: + // ============================================================================================= + // Game Player APIs + + // a keyname and a list of comma separated values: one of which is must be found in order for the match to qualify + // fails if a search is currently in progress + virtual int32_t AddGameSearchParams( const char *pchKeyToFind, const char *pchValuesToFind ) = 0; + + // all players in lobby enter the queue and await a SearchForGameNotificationCallback_t callback. fails if another search is currently in progress + // if not the owner of the lobby or search already in progress this call fails + // periodic callbacks will be sent as queue time estimates change + virtual int32_t SearchForGameWithLobby( CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax ) = 0; + + // user enter the queue and await a SearchForGameNotificationCallback_t callback. fails if another search is currently in progress + // periodic callbacks will be sent as queue time estimates change + virtual int32_t SearchForGameSolo( int nPlayerMin, int nPlayerMax ) = 0; + + // after receiving SearchForGameResultCallback_t, accept or decline the game + // multiple SearchForGameResultCallback_t will follow as players accept game until the host starts or cancels the game + virtual int32_t AcceptGame() = 0; + virtual int32_t DeclineGame() = 0; + + // after receiving GameStartedByHostCallback_t get connection details to server + virtual int32_t RetrieveConnectionDetails( CSteamID steamIDHost, char *pchConnectionDetails, int cubConnectionDetails ) = 0; + + // leaves queue if still waiting + virtual int32_t EndGameSearch() = 0; + + // ============================================================================================= + // Game Host APIs + + // a keyname and a list of comma separated values: all the values you allow + virtual int32_t SetGameHostParams( const char *pchKey, const char *pchValue ) = 0; + + // set connection details for players once game is found so they can connect to this server + virtual int32_t SetConnectionDetails( const char *pchConnectionDetails, int cubConnectionDetails ) = 0; + + // mark server as available for more players with nPlayerMin,nPlayerMax desired + // accept no lobbies with playercount greater than nMaxTeamSize + // the set of lobbies returned must be partitionable into teams of no more than nMaxTeamSize + // RequestPlayersForGameNotificationCallback_t callback will be sent when the search has started + // multple RequestPlayersForGameResultCallback_t callbacks will follow when players are found + virtual int32_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize ) = 0; + + // accept the player list and release connection details to players + // players will only be given connection details and host steamid when this is called + // ( allows host to accept after all players confirm, some confirm, or none confirm. decision is entirely up to the host ) + virtual int32_t HostConfirmGameStart( uint64 ullUniqueGameID ) = 0; + + // cancel request and leave the pool of game hosts looking for players + // if a set of players has already been sent to host, all players will receive SearchForGameHostFailedToConfirm_t + virtual int32_t CancelRequestPlayersForGame() = 0; + + // submit a result for one player. does not end the game. ullUniqueGameID continues to describe this game + virtual int32_t SubmitPlayerResult( uint64 ullUniqueGameID, CSteamID steamIDPlayer, int32_t EPlayerResult ) = 0; + + // ends the game. no further SubmitPlayerResults for ullUniqueGameID will be accepted + // any future requests will provide a new ullUniqueGameID + virtual int32_t EndGame( uint64 ullUniqueGameID ) = 0; + +}; +#define STEAMGAMESEARCH_INTERFACE_VERSION001 "SteamMatchGameSearch001" \ No newline at end of file diff --git a/src/public SDK/ISteamGameServer002.h b/src/public SDK/ISteamGameServer002.h new file mode 100644 index 0000000..fe261e1 --- /dev/null +++ b/src/public SDK/ISteamGameServer002.h @@ -0,0 +1,132 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER002_H +#define ISTEAMGAMESERVER002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer002 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + virtual bool BLoggedOn() = 0; + + // user authentication functions + virtual void SetSpawnCount( uint32 ucSpawn ) = 0; + + virtual bool GetSteam2GetEncryptionKeyToSendToNewClient( void *pvEncryptionKey, uint32 *pcbEncryptionKey, uint32 cbMaxEncryptionKey ) = 0; + + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + // Both Steam2 and Steam3 authentication + virtual bool SendSteam2UserConnect( uint32 unUserID, const void *pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void *pvCookie, uint32 cubCookie ) = 0; + + // the IP address should be in host order, i.e 127.0.0.1 == 0x7f000001 + // Steam3 only user auth + virtual bool SendSteam3UserConnect( CSteamID steamID, uint32 unIPPublic, const void *pvCookie, uint32 cubCookie ) = 0; + + virtual bool RemoveUserConnect( uint32 unUserID ) = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual bool SendUserDisconnect( CSteamID steamID, uint32 unUserID ) = 0; + + virtual bool SendUserStatusResponse( CSteamID steamID, int nSecondsConnected, int nSecondsSinceLast ) = 0; + + // obsolete, use UpdateStatus below + virtual bool Obsolete_GSSetStatus( int32 nAppIdServed, uint32 unServerFlags, int cPlayers, int cPlayersMax, int cBotPlayers, int unGamePort, const char *pchServerName, const char *pchGameDir, const char *pchMapName, const char *pchVersion ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual bool UpdateStatus( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pchMapName ) = 0; + + virtual bool BSecure() = 0; + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY), note that this is in host order + // unGamePort - The port which the server is listening for client connections on + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool SetServerType( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint32 unGamePort, const char *pchGameDir, const char *pchVersion ) = 0; + + // voided: these functions seem to have been added sometime after this interface was created, probably to keep it viable against the newer interfaces + // + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool SetServerType2( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 usSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + + virtual bool UpdateStatus2( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual bool CreateUnauthenticatedUser( CSteamID *pSteamID ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool SetUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; +}; + + +#endif // ISTEAMGAMESERVER002_H + diff --git a/src/public SDK/ISteamGameServer003.h b/src/public SDK/ISteamGameServer003.h new file mode 100644 index 0000000..d29c993 --- /dev/null +++ b/src/public SDK/ISteamGameServer003.h @@ -0,0 +1,99 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER003_H +#define ISTEAMGAMESERVER003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer003 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + virtual bool BLoggedOn() = 0; + + virtual bool BSecure() = 0; + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + virtual bool GetSteam2GetEncryptionKeyToSendToNewClient( void *pvEncryptionKey, uint32 *pcbEncryptionKey, uint32 cbMaxEncryptionKey ) = 0; + + virtual bool SendUserConnect( uint32, uint32, uint16, const void *, uint32 ) = 0; + + virtual bool RemoveUserConnect( uint32 unUserID ) = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual bool SendUserDisconnect( CSteamID steamID, uint32 unUserID ) = 0; + + // user authentication functions + virtual void SetSpawnCount( uint32 ucSpawn ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool SetServerType( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 usSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + virtual bool UpdateStatus( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual bool CreateUnauthenticatedUser( CSteamID *pSteamID ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool SetUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool GetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + +}; + +#endif // ISTEAMGAMESERVER003_H diff --git a/src/public SDK/ISteamGameServer004.h b/src/public SDK/ISteamGameServer004.h new file mode 100644 index 0000000..cf1a93f --- /dev/null +++ b/src/public SDK/ISteamGameServer004.h @@ -0,0 +1,105 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER004_H +#define ISTEAMGAMESERVER004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer004 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: true/false depending on whether the call succeeds. If the call succeeds then you + // should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed. + virtual void SendUserConnectAndAuthenticate( CSteamID steamIDUser, uint32 unIPClient, void *pvAuthBlob, uint32 cubAuthBlobSize ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, + const char *pchServerName, const char *pSpectatorServerName, + const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; +}; + +#endif // ISTEAMGAMESERVER004_H diff --git a/src/public SDK/ISteamGameServer005.h b/src/public SDK/ISteamGameServer005.h new file mode 100644 index 0000000..5c41fca --- /dev/null +++ b/src/public SDK/ISteamGameServer005.h @@ -0,0 +1,110 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER005_H +#define ISTEAMGAMESERVER005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer005 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, + const char *pchServerName, const char *pSpectatorServerName, + const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + // THIS IS NOT PRESENT ON STEAMWORKS SDK + virtual void GetGameplayStats( ) = 0; + +}; + +#endif // ISTEAMGAMESERVER005_H diff --git a/src/public SDK/ISteamGameServer006.h b/src/public SDK/ISteamGameServer006.h new file mode 100644 index 0000000..6af86ae --- /dev/null +++ b/src/public SDK/ISteamGameServer006.h @@ -0,0 +1,106 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER006_H +#define ISTEAMGAMESERVER006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer006 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + STEAMWORKS_STRUCT_RETURN_0(CSteamID, CreateUnauthenticatedUserConnection) /*virtual CSteamID CreateUnauthenticatedUserConnection() = 0;*/ + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + +}; + +#endif // ISTEAMGAMESERVER006_H diff --git a/src/public SDK/ISteamGameServer007.h b/src/public SDK/ISteamGameServer007.h new file mode 100644 index 0000000..12b82fa --- /dev/null +++ b/src/public SDK/ISteamGameServer007.h @@ -0,0 +1,109 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER007_H +#define ISTEAMGAMESERVER007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer007 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + STEAMWORKS_STRUCT_RETURN_0(CSteamID, CreateUnauthenticatedUserConnection) /*virtual CSteamID CreateUnauthenticatedUserConnection() = 0;*/ + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; +}; + +#endif // ISTEAMGAMESERVER007_H diff --git a/src/public SDK/ISteamGameServer008.h b/src/public SDK/ISteamGameServer008.h new file mode 100644 index 0000000..9fa623f --- /dev/null +++ b/src/public SDK/ISteamGameServer008.h @@ -0,0 +1,119 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER008_H +#define ISTEAMGAMESERVER008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer008 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, + const char *pchServerName, const char *pSpectatorServerName, + const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; +}; + + + +#endif // ISTEAMGAMESERVER008_H diff --git a/src/public SDK/ISteamGameServer009.h b/src/public SDK/ISteamGameServer009.h new file mode 100644 index 0000000..3de7661 --- /dev/null +++ b/src/public SDK/ISteamGameServer009.h @@ -0,0 +1,130 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER009_H +#define ISTEAMGAMESERVER009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer009 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, + const char *pchServerName, const char *pSpectatorServerName, + const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametype" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameType( const char *pchGameType ) = 0; + + // Ask if a user has a specific achievement for this game, will get a callback on reply + virtual bool BGetUserAchievementStatus( CSteamID steamID, const char *pchAchievementName ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; + + // Sets a string defining the "gamedata" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + // don't set this unless it actually changes, its only uploaded to the master once (when + // acknowledged) + virtual void SetGameData( const char *pchGameData) = 0; + + // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual uint32_t UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; +}; + + + + +#endif // ISTEAMGAMESERVER009_H diff --git a/src/public SDK/ISteamGameServer010.h b/src/public SDK/ISteamGameServer010.h new file mode 100644 index 0000000..18fc82f --- /dev/null +++ b/src/public SDK/ISteamGameServer010.h @@ -0,0 +1,146 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER010_H +#define ISTEAMGAMESERVER010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer010 +{ +public: + // connection functions + virtual void LogOn() = 0; + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // You shouldn't need to call this as it is called internally by SteamGameServer_Init() and can only be called once. + // + // To update the data in this call which may change during the servers lifetime see UpdateServerStatus() below. + // + // Input: nGameAppID - The Steam assigned AppID for the game + // unServerFlags - Any applicable combination of flags (see k_unServerFlag____ constants below) + // unGameIP - The IP Address the server is listening for client connections on (might be INADDR_ANY) + // unGamePort - The port which the server is listening for client connections on + // unSpectatorPort - the port on which spectators can join to observe the server, 0 if spectating is not supported + // usQueryPort - The port which the ISteamMasterServerUpdater API should use in order to listen for matchmaking requests + // pchGameDir - A unique string identifier for your game + // pchVersion - The current version of the server as a string like 1.0.0.0 + // bLanMode - Is this a LAN only server? + // + // bugbug jmccaskey - figure out how to remove this from the API and only expose via SteamGameServer_Init... or make this actually used, + // and stop calling it in SteamGameServer_Init()? + virtual bool BSetServerType( uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, + uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0; + + // Updates server status values which shows up in the server browser and matchmaking APIs + virtual void UpdateServerStatus( int cPlayers, int cPlayersMax, int cBotPlayers, + const char *pchServerName, const char *pSpectatorServerName, + const char *pchMapName ) = 0; + + // This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now). + virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0; + + // Sets a string defining the "gametags" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + virtual void SetGameTags( const char *pchGameTags ) = 0; + + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Gets the reputation score for the game server. This API also checks if the server or some + // other server on the same IP is banned from the Steam master servers. + virtual SteamAPICall_t GetServerReputation( ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; + + // Sets a string defining the "gamedata" for this server, this is optional, but if it is set + // it allows users to filter in the matchmaking/server-browser interfaces based on the value + // don't set this unless it actually changes, its only uploaded to the master once (when + // acknowledged) + virtual void SetGameData( const char *pchGameData) = 0; + + // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual uint32_t UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // New auth system APIs - do not mix with the old auth system APIs. + // ---------------------------------------------------------------- + + // Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ). + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual uint32_t BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + +}; + +#endif // ISTEAMGAMESERVER010_H diff --git a/src/public SDK/ISteamGameServer011.h b/src/public SDK/ISteamGameServer011.h new file mode 100644 index 0000000..70f4157 --- /dev/null +++ b/src/public SDK/ISteamGameServer011.h @@ -0,0 +1,267 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER011_H +#define ISTEAMGAMESERVER011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer011 +{ +public: + + // + // Basic server data. These properties, if set, must be set before before calling LogOn. They + // may not be changed after logged in. + // + + /// This is called by SteamGameServer_Init, and you will usually not need to call it directly + virtual bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ) = 0; + + /// Game product identifier. This is currently used by the master server for version checking purposes. + /// It's a required field, but will eventually will go away, and the AppID will be used for this purpose. + virtual void SetProduct( const char *pszProduct ) = 0; + + /// Description of the game. This is a required field and is displayed in the steam server browser....for now. + /// This is a required field, but it will go away eventually, as the data should be determined from the AppID. + virtual void SetGameDescription( const char *pszGameDescription ) = 0; + + /// If your game is a "mod," pass the string that identifies it. The default is an empty string, meaning + /// this application is the original game, not a mod. + /// + /// @see k_cbMaxGameServerGameDir + virtual void SetModDir( const char *pszModDir ) = 0; + + /// Is this is a dedicated server? The default value is false. + virtual void SetDedicatedServer( bool bDedicated ) = 0; + + // + // Login + // + + /// Begin process to login to a persistent game server account + /// + /// You need to register for callbacks to determine the result of this operation. + /// @see SteamServersConnected_t + /// @see SteamServerConnectFailure_t + /// @see SteamServersDisconnected_t + virtual void LogOn( + const char *pszAccountName, + const char *pszPassword + ) = 0; + + /// Login to a generic, anonymous account. + /// + /// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init, + /// but this is no longer the case. + virtual void LogOnAnonymous() = 0; + + /// Begin process of logging game server out of steam + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + /// Returns true if the master server has requested a restart. + /// Only returns true once per request. + virtual bool WasRestartRequested() = 0; + + // + // Server state. These properties may be changed at any time. + // + + /// Max player count that will be reported to server browser and client queries + virtual void SetMaxPlayerCount( int cPlayersMax ) = 0; + + /// Number of bots. Default value is zero + virtual void SetBotPlayerCount( int cBotplayers ) = 0; + + /// Set the name of server as it will appear in the server browser + /// + /// @see k_cbMaxGameServerName + virtual void SetServerName( const char *pszServerName ) = 0; + + /// Set name of map to report in the server browser + /// + /// @see k_cbMaxGameServerName + virtual void SetMapName( const char *pszMapName ) = 0; + + /// Let people know if your server will require a password + virtual void SetPasswordProtected( bool bPasswordProtected ) = 0; + + /// Spectator server. The default value is zero, meaning the service + /// is not used. + virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0; + + /// Name of the spectator server. (Only used if spectator port is nonzero.) + /// + /// @see k_cbMaxGameServerMapName + virtual void SetSpectatorServerName( const char *pszSpectatorServerName ) = 0; + + /// Call this to clear the whole list of key/values that are sent in rules queries. + virtual void ClearAllKeyValues() = 0; + + /// Call this to add/update a key/value pair. + virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0; + + /// Sets a string defining the "gametags" for this server, this is optional, but if it is set + /// it allows users to filter in the matchmaking/server-browser interfaces based on the value + /// + /// @see k_cbMaxGameServerTags + virtual void SetGameTags( const char *pchGameTags ) = 0; + + /// Sets a string defining the "gamedata" for this server, this is optional, but if it is set + /// it allows users to filter in the matchmaking/server-browser interfaces based on the value + /// don't set this unless it actually changes, its only uploaded to the master once (when + /// acknowledged) + /// + /// @see k_cbMaxGameServerGameData + virtual void SetGameData( const char *pchGameData) = 0; + + /// Region identifier. This is an optional field, the default value is empty, meaning the "world" region + virtual void SetRegion( const char *pszRegion ) = 0; + + // + // Player list management / authentication + // + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // New auth system APIs - do not mix with the old auth system APIs. + // ---------------------------------------------------------------- + + // Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ). + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual uint32_t BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual uint32_t UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // + // Query steam for server data + // + + // Beginning 1.28, this two function will be deprecated. + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Gets the reputation score for the game server. This API also checks if the server or some + // other server on the same IP is banned from the Steam master servers. + virtual SteamAPICall_t GetServerReputation( ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; + + // These are in GameSocketShare mode, where instead of ISteamGameServer creating its own + // socket to talk to the master server on, it lets the game use its socket to forward messages + // back and forth. This prevents us from requiring server ops to open up yet another port + // in their firewalls. + // + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + + // These are used when you've elected to multiplex the game server's UDP socket + // rather than having the master server updater use its own sockets. + // + // Source games use this to simplify the job of the server admins, so they + // don't have to open up more ports on their firewalls. + + // Call this when a packet that starts with 0xFFFFFFFF comes in. That means + // it's for us. + virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0; + + // AFTER calling HandleIncomingPacket for any packets that came in that frame, call this. + // This gets a packet that the master server updater needs to send out on UDP. + // It returns the length of the packet it wants to send, or 0 if there are no more packets to send. + // Call this each frame until it returns 0. + virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0; + + // + // Control heartbeats / advertisement with master server + // + + // Call this as often as you like to tell the master server updater whether or not + // you want it to be active (default: off). + virtual void EnableHeartbeats( bool bActive ) = 0; + + // You usually don't need to modify this. + // Pass -1 to use the default value for iHeartbeatInterval. + // Some mods change this. + virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0; + + // Force a heartbeat to steam at the next opportunity + virtual void ForceHeartbeat() = 0; + + // associate this game server with this clan for the purposes of computing player compat + virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0; + + // ask if any of the current players dont want to play with this new player - or vice versa + virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0; +}; + +#endif // ISTEAMGAMESERVER011_H diff --git a/src/public SDK/ISteamGameServer012.h b/src/public SDK/ISteamGameServer012.h new file mode 100644 index 0000000..df056ad --- /dev/null +++ b/src/public SDK/ISteamGameServer012.h @@ -0,0 +1,264 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVER012_H +#define ISTEAMGAMESERVER012_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServer012 +{ +public: + + // + // Basic server data. These properties, if set, must be set before before calling LogOn. They + // may not be changed after logged in. + // + + /// This is called by SteamGameServer_Init, and you will usually not need to call it directly + virtual bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ) = 0; + + /// Game product identifier. This is currently used by the master server for version checking purposes. + /// It's a required field, but will eventually will go away, and the AppID will be used for this purpose. + virtual void SetProduct( const char *pszProduct ) = 0; + + /// Description of the game. This is a required field and is displayed in the steam server browser....for now. + /// This is a required field, but it will go away eventually, as the data should be determined from the AppID. + virtual void SetGameDescription( const char *pszGameDescription ) = 0; + + /// If your game is a "mod," pass the string that identifies it. The default is an empty string, meaning + /// this application is the original game, not a mod. + /// + /// @see k_cbMaxGameServerGameDir + virtual void SetModDir( const char *pszModDir ) = 0; + + /// Is this is a dedicated server? The default value is false. + virtual void SetDedicatedServer( bool bDedicated ) = 0; + + // + // Login + // + + /// Begin process to login to a persistent game server account + /// + /// You need to register for callbacks to determine the result of this operation. + /// @see SteamServersConnected_t + /// @see SteamServerConnectFailure_t + /// @see SteamServersDisconnected_t + virtual void LogOn( const char *pszToken ) = 0; + + /// Login to a generic, anonymous account. + /// + /// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init, + /// but this is no longer the case. + virtual void LogOnAnonymous() = 0; + + /// Begin process of logging game server out of steam + virtual void LogOff() = 0; + + // status functions + virtual bool BLoggedOn() = 0; + virtual bool BSecure() = 0; + virtual CSteamID GetSteamID() = 0; + + /// Returns true if the master server has requested a restart. + /// Only returns true once per request. + virtual bool WasRestartRequested() = 0; + + // + // Server state. These properties may be changed at any time. + // + + /// Max player count that will be reported to server browser and client queries + virtual void SetMaxPlayerCount( int cPlayersMax ) = 0; + + /// Number of bots. Default value is zero + virtual void SetBotPlayerCount( int cBotplayers ) = 0; + + /// Set the name of server as it will appear in the server browser + /// + /// @see k_cbMaxGameServerName + virtual void SetServerName( const char *pszServerName ) = 0; + + /// Set name of map to report in the server browser + /// + /// @see k_cbMaxGameServerName + virtual void SetMapName( const char *pszMapName ) = 0; + + /// Let people know if your server will require a password + virtual void SetPasswordProtected( bool bPasswordProtected ) = 0; + + /// Spectator server. The default value is zero, meaning the service + /// is not used. + virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0; + + /// Name of the spectator server. (Only used if spectator port is nonzero.) + /// + /// @see k_cbMaxGameServerMapName + virtual void SetSpectatorServerName( const char *pszSpectatorServerName ) = 0; + + /// Call this to clear the whole list of key/values that are sent in rules queries. + virtual void ClearAllKeyValues() = 0; + + /// Call this to add/update a key/value pair. + virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0; + + /// Sets a string defining the "gametags" for this server, this is optional, but if it is set + /// it allows users to filter in the matchmaking/server-browser interfaces based on the value + /// + /// @see k_cbMaxGameServerTags + virtual void SetGameTags( const char *pchGameTags ) = 0; + + /// Sets a string defining the "gamedata" for this server, this is optional, but if it is set + /// it allows users to filter in the matchmaking/server-browser interfaces based on the value + /// don't set this unless it actually changes, its only uploaded to the master once (when + /// acknowledged) + /// + /// @see k_cbMaxGameServerGameData + virtual void SetGameData( const char *pchGameData) = 0; + + /// Region identifier. This is an optional field, the default value is empty, meaning the "world" region + virtual void SetRegion( const char *pszRegion ) = 0; + + // + // Player list management / authentication + // + + // Handles receiving a new connection from a Steam user. This call will ask the Steam + // servers to validate the users identity, app ownership, and VAC status. If the Steam servers + // are off-line, then it will validate the cached ticket itself which will validate app ownership + // and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection() + // and must then be sent up to the game server for authentication. + // + // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL + // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication + // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) + virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0; + + // Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation. + // + // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() + // when this user leaves the server just like you would for a real user. + virtual CSteamID CreateUnauthenticatedUserConnection() = 0; + + // Should be called whenever a user leaves our game server, this lets Steam internally + // track which users are currently on which servers for the purposes of preventing a single + // account being logged into multiple servers, showing who is currently on a server, etc. + virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0; + + // Update the data to be displayed in the server browser and matchmaking interfaces for a user + // currently connected to the server. For regular users you must call this after you receive a + // GSUserValidationSuccess callback. + // + // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) + virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0; + + // New auth system APIs - do not mix with the old auth system APIs. + // ---------------------------------------------------------------- + + // Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ). + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual uint32_t BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual uint32_t UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t + // returns false if we're not connected to the steam servers and thus cannot ask + virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0; + + // + // Query steam for server data + // + + // Beginning 1.28, this two function will be deprecated. + // Ask for the gameplay stats for the server. Results returned in a callback + virtual void GetGameplayStats( ) = 0; + + // Gets the reputation score for the game server. This API also checks if the server or some + // other server on the same IP is banned from the Steam master servers. + virtual SteamAPICall_t GetServerReputation( ) = 0; + + // Returns the public IP of the server according to Steam, useful when the server is + // behind NAT and you want to advertise its IP in a lobby for other clients to directly + // connect to + virtual uint32 GetPublicIP() = 0; + + // These are in GameSocketShare mode, where instead of ISteamGameServer creating its own + // socket to talk to the master server on, it lets the game use its socket to forward messages + // back and forth. This prevents us from requiring server ops to open up yet another port + // in their firewalls. + // + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + + // These are used when you've elected to multiplex the game server's UDP socket + // rather than having the master server updater use its own sockets. + // + // Source games use this to simplify the job of the server admins, so they + // don't have to open up more ports on their firewalls. + + // Call this when a packet that starts with 0xFFFFFFFF comes in. That means + // it's for us. + virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0; + + // AFTER calling HandleIncomingPacket for any packets that came in that frame, call this. + // This gets a packet that the master server updater needs to send out on UDP. + // It returns the length of the packet it wants to send, or 0 if there are no more packets to send. + // Call this each frame until it returns 0. + virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0; + + // + // Control heartbeats / advertisement with master server + // + + // Call this as often as you like to tell the master server updater whether or not + // you want it to be active (default: off). + virtual void EnableHeartbeats( bool bActive ) = 0; + + // You usually don't need to modify this. + // Pass -1 to use the default value for iHeartbeatInterval. + // Some mods change this. + virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0; + + // Force a heartbeat to steam at the next opportunity + virtual void ForceHeartbeat() = 0; + + // associate this game server with this clan for the purposes of computing player compat + virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0; + + // ask if any of the current players dont want to play with this new player - or vice versa + virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0; +}; + +#endif // ISTEAMGAMESERVER012_H diff --git a/src/public SDK/ISteamGameServerStats001.h b/src/public SDK/ISteamGameServerStats001.h new file mode 100644 index 0000000..a63d53e --- /dev/null +++ b/src/public SDK/ISteamGameServerStats001.h @@ -0,0 +1,66 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESERVERSTATS001_H +#define ISTEAMGAMESERVERSTATS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameServerStatsCommon.h" + + + +//----------------------------------------------------------------------------- +// Purpose: Functions for authenticating users via Steam to play on a game server +//----------------------------------------------------------------------------- +abstract_class ISteamGameServerStats001 +{ +public: + // downloads stats for the user + // returns a GSStatsReceived_t callback when completed + // if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats will only be auto-updated for clients playing on the server. For other + // users you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + + // Set / update stats and achievements. + // Note: These updates will work only on stats game servers are allowed to edit and only for + // game servers that have been declared as officially controlled by the game creators. + // Set the IP range of your official servers on the Steamworks page + virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, int32 nData ) = 0; + virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, float fData ) = 0; + virtual bool UpdateUserAvgRateStat( CSteamID steamIDUser, const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + virtual bool SetUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0; + virtual bool ClearUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0; + + // Store the current data on the server, will get a GSStatsStored_t callback when set. + // + // If the callback has a result of k_EResultInvalidParam, one or more stats + // uploaded has been rejected, either because they broke constraints + // or were out of date. In this case the server sends back updated values. + // The stats should be re-iterated to keep in sync. + virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0; +}; + +#endif // ISTEAMGAMESERVERSTATS001_H diff --git a/src/public SDK/ISteamGameStats001.h b/src/public SDK/ISteamGameStats001.h new file mode 100644 index 0000000..efdeb2f --- /dev/null +++ b/src/public SDK/ISteamGameStats001.h @@ -0,0 +1,50 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMGAMESTATS001_H +#define ISTEAMGAMESTATS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "GameStatsCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for recording game play sessions and details thereof +//----------------------------------------------------------------------------- +abstract_class ISteamGameStats001 +{ +public: + virtual SteamAPICall_t GetNewSession( int8 nAccountType, uint64 ulAccountID, int32 nAppID, RTime32 rtTimeStarted ) = 0; + virtual SteamAPICall_t EndSession( uint64 ulSessionID, RTime32 rtTimeEnded, int nReasonCode ) = 0; + virtual EResult AddSessionAttributeInt( uint64 ulSessionID, const char* pstrName, int32 nData ) = 0; + virtual EResult AddSessionAttributeString( uint64 ulSessionID, const char* pstrName, const char *pstrData ) = 0; + virtual EResult AddSessionAttributeFloat( uint64 ulSessionID, const char* pstrName, float fData ) = 0; + + virtual EResult AddNewRow( uint64 *pulRowID, uint64 ulSessionID, const char *pstrTableName ) = 0; + virtual EResult CommitRow( uint64 ulRowID ) = 0; + virtual EResult CommitOutstandingRows( uint64 ulSessionID ) = 0; + virtual EResult AddRowAttributeInt( uint64 ulRowID, const char *pstrName, int32 nData ) = 0; + virtual EResult AddRowAtributeString( uint64 ulRowID, const char *pstrName, const char *pstrData ) = 0; + virtual EResult AddRowAttributeFloat( uint64 ulRowID, const char *pstrName, float fData ) = 0; + + virtual EResult AddSessionAttributeInt64( uint64 ulSessionID, const char *pstrName, int64 llData ) = 0; + virtual EResult AddRowAttributeInt64( uint64 ulRowID, const char *pstrName, int64 llData ) = 0; +}; + +#endif // ISTEAMGAMESERVERSTATS001_H diff --git a/src/public SDK/ISteamHTMLSurface002.h b/src/public SDK/ISteamHTMLSurface002.h new file mode 100644 index 0000000..1879c16 --- /dev/null +++ b/src/public SDK/ISteamHTMLSurface002.h @@ -0,0 +1,136 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMHTMLSURFACE002_H +#define ISTEAMHTMLSURFACE002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "HTMLSurfaceCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamHTMLSurface002 +{ +public: + virtual ~ISteamHTMLSurface002() {} + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Create a browser object for display of a html page, when creation is complete the call handle + // will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser. + // The user agent string is a substring to be added to the general user agent string so you can + // identify your client on web servers. + // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if + // you do not require this functionality. + virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0; + + // Call this when you are done with a html surface, this lets us free the resources being used by it + virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0; + + // Navigate to this URL, results in a HTML_StartRequest_t as the request commences + virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0; + + // Tells the surface the size in pixels to display the surface + virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0; + + // Stop the load of the current html page + virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0; + // Reload (most likely from local cache) the current page + virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0; + // navigate back in the page history + virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0; + // navigate forward in the page history + virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0; + + // add this header to any url requests from this browser + virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0; + // run this javascript script in the currently loaded page + virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0; + + + // Mouse click and mouse movement commands + virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + // x and y are relative to the HTML bounds + virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + // nDelta is pixels of scroll + virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0; + + + // keyboard interactions, native keycode is the virtual key code value from your OS + virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) + virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + + // programmatically scroll this many pixels on the page + virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + + // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things + virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0; + + // open the current pages html code in the local editor of choice, used for debugging + virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0; + // copy the currently selected text on the html page to the local clipboard + virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0; + // paste from the local clipboard to the current html page + virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0; + + // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element + virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0; + // cancel a currently running find + virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0; + + // return details about the link at position x,y on the current page + virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + + // set a webcookie for the hostname in question + virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0; + + // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care) + virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0; + + // CALLBACKS + // + // These set of functions are used as responses to callback requests + // + + // You MUST call this in response to a HTML_StartRequest_t callback + // Set bAllowed to true to allow this navigation, false to cancel it and stay + // on the current page. You can use this feature to limit the valid pages + // allowed in your HTML surface. + virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0; + + // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback + // Set bResult to true for the OK option of a confirm, use false otherwise + virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0; + + // You MUST call this in response to a HTML_FileOpenDialog_t callback + virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0; +}; + + + +#endif // ISTEAMHTMLSURFACE002_H diff --git a/src/public SDK/ISteamHTMLSurface003.h b/src/public SDK/ISteamHTMLSurface003.h new file mode 100644 index 0000000..02cc2cf --- /dev/null +++ b/src/public SDK/ISteamHTMLSurface003.h @@ -0,0 +1,138 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMHTMLSURFACE003_H +#define ISTEAMHTMLSURFACE003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "HTMLSurfaceCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamHTMLSurface003 +{ +public: + virtual ~ISteamHTMLSurface003() {} + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Create a browser object for display of a html page, when creation is complete the call handle + // will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser. + // The user agent string is a substring to be added to the general user agent string so you can + // identify your client on web servers. + // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if + // you do not require this functionality. + virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0; + + // Call this when you are done with a html surface, this lets us free the resources being used by it + virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0; + + // Navigate to this URL, results in a HTML_StartRequest_t as the request commences + virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0; + + // Tells the surface the size in pixels to display the surface + virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0; + + // Stop the load of the current html page + virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0; + // Reload (most likely from local cache) the current page + virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0; + // navigate back in the page history + virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0; + // navigate forward in the page history + virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0; + + // add this header to any url requests from this browser + virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0; + // run this javascript script in the currently loaded page + virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0; + + + // Mouse click and mouse movement commands + virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + // x and y are relative to the HTML bounds + virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + // nDelta is pixels of scroll + virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0; + + + // keyboard interactions, native keycode is the virtual key code value from your OS + virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) + virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + + // programmatically scroll this many pixels on the page + virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + + // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things + virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0; + + // open the current pages html code in the local editor of choice, used for debugging + virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0; + // copy the currently selected text on the html page to the local clipboard + virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0; + // paste from the local clipboard to the current html page + virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0; + + // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element + virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0; + // cancel a currently running find + virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0; + + // return details about the link at position x,y on the current page + virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + + // set a webcookie for the hostname in question + virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0; + + // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care) + virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0; + + virtual void SetBackgroundMode( uint32, bool ) = 0; + + // CALLBACKS + // + // These set of functions are used as responses to callback requests + // + + // You MUST call this in response to a HTML_StartRequest_t callback + // Set bAllowed to true to allow this navigation, false to cancel it and stay + // on the current page. You can use this feature to limit the valid pages + // allowed in your HTML surface. + virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0; + + // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback + // Set bResult to true for the OK option of a confirm, use false otherwise + virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0; + + // You MUST call this in response to a HTML_FileOpenDialog_t callback + virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0; +}; + + + +#endif // ISTEAMHTMLSURFACE003_H diff --git a/src/public SDK/ISteamHTMLSurface004.h b/src/public SDK/ISteamHTMLSurface004.h new file mode 100644 index 0000000..2486718 --- /dev/null +++ b/src/public SDK/ISteamHTMLSurface004.h @@ -0,0 +1,121 @@ +#include "SteamTypes.h" +#include "HTMLSurfaceCommon.h" + +class ISteamHTMLSurface004 +{ +public: + virtual ~ISteamHTMLSurface004() {} + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Create a browser object for display of a html page, when creation is complete the call handle + // will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser. + // The user agent string is a substring to be added to the general user agent string so you can + // identify your client on web servers. + // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if + // you do not require this functionality. + // + // YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t, + // HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS + // section of this interface (AllowStartRequest, etc) for more details. If you do + // not implement these callback handlers, the browser may appear to hang instead of + // navigating to new pages or triggering javascript popups. + // + virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0; + + // Call this when you are done with a html surface, this lets us free the resources being used by it + virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0; + + // Navigate to this URL, results in a HTML_StartRequest_t as the request commences + virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0; + + // Tells the surface the size in pixels to display the surface + virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0; + + // Stop the load of the current html page + virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0; + // Reload (most likely from local cache) the current page + virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0; + // navigate back in the page history + virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0; + // navigate forward in the page history + virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0; + + // add this header to any url requests from this browser + virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0; + // run this javascript script in the currently loaded page + virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0; + + // Mouse click and mouse movement commands + virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + // x and y are relative to the HTML bounds + virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + // nDelta is pixels of scroll + virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0; + + // keyboard interactions, native keycode is the virtual key code value from your OS + virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) + virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + + // programmatically scroll this many pixels on the page + virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + + // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things + virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0; + + // open the current pages html code in the local editor of choice, used for debugging + virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0; + // copy the currently selected text on the html page to the local clipboard + virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0; + // paste from the local clipboard to the current html page + virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0; + + // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element + virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0; + // cancel a currently running find + virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0; + + // return details about the link at position x,y on the current page + virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + + // set a webcookie for the hostname in question + virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0; + + // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care) + virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0; + + // Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are + // more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled, + // all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1". + // When background mode is disabled, any video or audio objects with that property will resume with ".play()". + virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0; + + // Scale the output display space by this factor, this is useful when displaying content on high dpi devices. + // Specifies the ratio between physical and logical pixels. + virtual void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) = 0; + + // CALLBACKS + // + // These set of functions are used as responses to callback requests + // + + // You MUST call this in response to a HTML_StartRequest_t callback + // Set bAllowed to true to allow this navigation, false to cancel it and stay + // on the current page. You can use this feature to limit the valid pages + // allowed in your HTML surface. + virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0; + + // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback + // Set bResult to true for the OK option of a confirm, use false otherwise + virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0; + + // You MUST call this in response to a HTML_FileOpenDialog_t callback + virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0; +}; diff --git a/src/public SDK/ISteamHTMLSurface005.h b/src/public SDK/ISteamHTMLSurface005.h new file mode 100644 index 0000000..0d31bd4 --- /dev/null +++ b/src/public SDK/ISteamHTMLSurface005.h @@ -0,0 +1,187 @@ +#include "SteamTypes.h" +#include "HTMLSurfaceCommon.h" + +class ISteamHTMLSurface005 +{ +public: + virtual ~ISteamHTMLSurface005() {} + + // Must call init and shutdown when starting/ending use of the interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Create a browser object for display of a html page, when creation is complete the call handle + // will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser. + // The user agent string is a substring to be added to the general user agent string so you can + // identify your client on web servers. + // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if + // you do not require this functionality. + // + // YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t, + // HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS + // section of this interface (AllowStartRequest, etc) for more details. If you do + // not implement these callback handlers, the browser may appear to hang instead of + // navigating to new pages or triggering javascript popups. + // + virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0; + + // Call this when you are done with a html surface, this lets us free the resources being used by it + virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0; + + // Navigate to this URL, results in a HTML_StartRequest_t as the request commences + virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0; + + // Tells the surface the size in pixels to display the surface + virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0; + + // Stop the load of the current html page + virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0; + // Reload (most likely from local cache) the current page + virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0; + // navigate back in the page history + virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0; + // navigate forward in the page history + virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0; + + // add this header to any url requests from this browser + virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0; + // run this javascript script in the currently loaded page + virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0; + + enum EHTMLMouseButton + { + eHTMLMouseButton_Left = 0, + eHTMLMouseButton_Right = 1, + eHTMLMouseButton_Middle = 2, + }; + + // Mouse click and mouse movement commands + virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0; + // x and y are relative to the HTML bounds + virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + // nDelta is pixels of scroll + virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0; + + //enum EMouseCursor + //{ + // dc_user = 0, + // dc_none, + // dc_arrow, + // dc_ibeam, + // dc_hourglass, + // dc_waitarrow, + // dc_crosshair, + // dc_up, + // dc_sizenw, + // dc_sizese, + // dc_sizene, + // dc_sizesw, + // dc_sizew, + // dc_sizee, + // dc_sizen, + // dc_sizes, + // dc_sizewe, + // dc_sizens, + // dc_sizeall, + // dc_no, + // dc_hand, + // dc_blank, // don't show any custom cursor, just use your default + // dc_middle_pan, + // dc_north_pan, + // dc_north_east_pan, + // dc_east_pan, + // dc_south_east_pan, + // dc_south_pan, + // dc_south_west_pan, + // dc_west_pan, + // dc_north_west_pan, + // dc_alias, + // dc_cell, + // dc_colresize, + // dc_copycur, + // dc_verticaltext, + // dc_rowresize, + // dc_zoomin, + // dc_zoomout, + // dc_help, + // dc_custom, + + // dc_last, // custom cursors start from this value and up + //}; + + /*enum EHTMLKeyModifiers + { + k_eHTMLKeyModifier_None = 0, + k_eHTMLKeyModifier_AltDown = 1 << 0, + k_eHTMLKeyModifier_CtrlDown = 1 << 1, + k_eHTMLKeyModifier_ShiftDown = 1 << 2, + };*/ + + // keyboard interactions, native keycode is the virtual key code value from your OS, system key flags the key to not + // be sent as a typed character as well as a key down + virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey = false ) = 0; + virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) + virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + + // programmatically scroll this many pixels on the page + virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0; + + // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things + virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0; + + // open the current pages html code in the local editor of choice, used for debugging + virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0; + // copy the currently selected text on the html page to the local clipboard + virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0; + // paste from the local clipboard to the current html page + virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0; + + // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element + virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0; + // cancel a currently running find + virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0; + + // return details about the link at position x,y on the current page + virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0; + + // set a webcookie for the hostname in question + virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0; + + // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care) + virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0; + + // Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are + // more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled, + // all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1". + // When background mode is disabled, any video or audio objects with that property will resume with ".play()". + virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0; + + // Scale the output display space by this factor, this is useful when displaying content on high dpi devices. + // Specifies the ratio between physical and logical pixels. + virtual void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) = 0; + + // Open HTML/JS developer tools + virtual void OpenDeveloperTools( HHTMLBrowser unBrowserHandle ) = 0; + + // CALLBACKS + // + // These set of functions are used as responses to callback requests + // + + // You MUST call this in response to a HTML_StartRequest_t callback + // Set bAllowed to true to allow this navigation, false to cancel it and stay + // on the current page. You can use this feature to limit the valid pages + // allowed in your HTML surface. + virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0; + + // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback + // Set bResult to true for the OK option of a confirm, use false otherwise + virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0; + + // You MUST call this in response to a HTML_FileOpenDialog_t callback + virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0; +}; \ No newline at end of file diff --git a/src/public SDK/ISteamHTTP001.h b/src/public SDK/ISteamHTTP001.h new file mode 100644 index 0000000..4fff247 --- /dev/null +++ b/src/public SDK/ISteamHTTP001.h @@ -0,0 +1,103 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMHTTP001_H +#define ISTEAMHTTP001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "HTTPCommon.h" + +abstract_class ISteamHTTP001 +{ +public: + + // Initializes a new HTTP request, returning a handle to use in further operations on it. Requires + // the method (GET or POST) and the absolute URL for the request. Only http requests (ie, not https) are + // currently supported, so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/ + // or such. + virtual HTTPRequestHandle CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) = 0; + + // Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after + // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. + virtual bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) = 0; + + // Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default + // timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request + // has already been sent. + virtual bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) = 0; + + // Set a request header value for the request, must be called prior to sending the request. Will + // return false if the handle is invalid or the request is already sent. + virtual bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) = 0; + + // Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified + // when creating the request. Must be called prior to sending the request. Will return false if the + // handle is invalid or the request is already sent. + virtual bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asyncronous response via callback. + // + // Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control + // header and only do a local cache lookup rather than sending any actual remote request. + virtual bool SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool DeferHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also + // returns the size of the header value if present so the caller and allocate a correctly sized buffer for + // GetHTTPResponseHeaderValue. + virtual bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) = 0; + + // Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // header is not present or if your buffer is too small to contain it's value. You should first call + // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. + virtual bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) = 0; + + // Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid. + virtual bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) = 0; + + // Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out + // the correct buffer size to use. + virtual bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t + // callback and finishing using the response. + virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Gets progress on downloading the body for the request. This will be zero unless a response header has already been + // received which included a content-length field. For responses that contain no content-length it will report + // zero for the duration of the request as the size is unknown until the connection closes. + virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0; + + // Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params + // have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType + // parameter will set the content-type header for the request so the server may know how to interpret the body. + virtual bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) = 0; +}; + +#endif // ISTEAMHTTP001_H diff --git a/src/public SDK/ISteamHTTP002.h b/src/public SDK/ISteamHTTP002.h new file mode 100644 index 0000000..c04b4fb --- /dev/null +++ b/src/public SDK/ISteamHTTP002.h @@ -0,0 +1,143 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMHTTP002_H +#define ISTEAMHTTP002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "HTTPCommon.h" + +abstract_class ISteamHTTP002 +{ +public: + + // Initializes a new HTTP request, returning a handle to use in further operations on it. Requires + // the method (GET or POST) and the absolute URL for the request. Both http and https are supported, + // so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/ + // or such. + virtual HTTPRequestHandle CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) = 0; + + // Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after + // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. + virtual bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) = 0; + + // Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default + // timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request + // has already been sent. + virtual bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) = 0; + + // Set a request header value for the request, must be called prior to sending the request. Will + // return false if the handle is invalid or the request is already sent. + virtual bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) = 0; + + // Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified + // when creating the request. Must be called prior to sending the request. Will return false if the + // handle is invalid or the request is already sent. + virtual bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asynchronous response via callback. + // + // Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control + // header and only do a local cache lookup rather than sending any actual remote request. + virtual bool SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and + // HTTPRequestDataReceived_t callbacks while streaming. + virtual bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool DeferHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also + // returns the size of the header value if present so the caller and allocate a correctly sized buffer for + // GetHTTPResponseHeaderValue. + virtual bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) = 0; + + // Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // header is not present or if your buffer is too small to contain it's value. You should first call + // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. + virtual bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) = 0; + + // Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid. + virtual bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) = 0; + + // Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid or is to a streaming response, or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out + // the correct buffer size to use. + virtual bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Gets the body data from a streaming HTTP response given a handle from HTTPRequestCompleted_t. Will return false if the <- 123a + // Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the <- 124 + // handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset + // do not match the size and offset sent in HTTPRequestDataReceived_t. + virtual bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t + // callback and finishing using the response. + virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Gets progress on downloading the body for the request. This will be zero unless a response header has already been + // received which included a content-length field. For responses that contain no content-length it will report + // zero for the duration of the request as the size is unknown until the connection closes. + virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0; + + // Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params + // have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType + // parameter will set the content-type header for the request so the server may know how to interpret the body. + virtual bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) = 0; + + // Creates a cookie container handle which you must later free with ReleaseCookieContainer(). If bAllowResponsesToModify=true + // than any response to your requests using this cookie container may add new cookies which may be transmitted with + // future requests. If bAllowResponsesToModify=false than only cookies you explicitly set will be sent. This API is just for + // during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across + // repeat executions of your process. + virtual HTTPCookieContainerHandle CreateCookieContainer( bool bAllowResponsesToModify ) = 0; + + // Release a cookie container you are finished using, freeing it's memory + virtual bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer ) = 0; + + // Adds a cookie to the specified cookie container that will be used with future requests. + virtual bool SetCookie( HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie ) = 0; + + // Set the cookie container to use for a HTTP request + virtual bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ) = 0; + + // Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end + virtual bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const char *pchUserAgentInfo ) = 0; + + // Set that https request should require verified SSL certificate via machines certificate trust store + virtual bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate ) = 0; + + // Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout + // which can bump everytime we get more data + virtual bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint32 unMilliseconds ) = 0; + + // Check if the reason the request failed was because we timed it out (rather than some harder failure) + virtual bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) = 0; +}; + +#endif // ISTEAMHTTP002_H diff --git a/src/public SDK/ISteamHTTP003.h b/src/public SDK/ISteamHTTP003.h new file mode 100644 index 0000000..f064d99 --- /dev/null +++ b/src/public SDK/ISteamHTTP003.h @@ -0,0 +1,138 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + + +#include "SteamTypes.h" +#include "HTTPCommon.h" + + +class ISteamHTTP003 +{ +public: + + // Initializes a new HTTP request, returning a handle to use in further operations on it. Requires + // the method (GET or POST) and the absolute URL for the request. Both http and https are supported, + // so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/ + // or such. + virtual HTTPRequestHandle CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) = 0; + + // Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after + // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. + virtual bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) = 0; + + // Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default + // timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request + // has already been sent. + virtual bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) = 0; + + // Set a request header value for the request, must be called prior to sending the request. Will + // return false if the handle is invalid or the request is already sent. + virtual bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) = 0; + + // Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified + // when creating the request. Must be called prior to sending the request. Will return false if the + // handle is invalid or the request is already sent. + virtual bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asynchronous response via callback. + // + // Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control + // header and only do a local cache lookup rather than sending any actual remote request. + virtual bool SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on + // asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and + // HTTPRequestDataReceived_t callbacks while streaming. + virtual bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0; + + // Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool DeferHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move + // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. + virtual bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also + // returns the size of the header value if present so the caller and allocate a correctly sized buffer for + // GetHTTPResponseHeaderValue. + virtual bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) = 0; + + // Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // header is not present or if your buffer is too small to contain it's value. You should first call + // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. + virtual bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) = 0; + + // Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid. + virtual bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) = 0; + + // Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the + // handle is invalid or is to a streaming response, or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out + // the correct buffer size to use. + virtual bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the + // handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset + // do not match the size and offset sent in HTTPRequestDataReceived_t. + virtual bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0; + + // Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t + // callback and finishing using the response. + virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0; + + // Gets progress on downloading the body for the request. This will be zero unless a response header has already been + // received which included a content-length field. For responses that contain no content-length it will report + // zero for the duration of the request as the size is unknown until the connection closes. + virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0; + + // Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params + // have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType + // parameter will set the content-type header for the request so the server may know how to interpret the body. + virtual bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) = 0; + + // Creates a cookie container handle which you must later free with ReleaseCookieContainer(). If bAllowResponsesToModify=true + // than any response to your requests using this cookie container may add new cookies which may be transmitted with + // future requests. If bAllowResponsesToModify=false than only cookies you explicitly set will be sent. This API is just for + // during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across + // repeat executions of your process. + virtual HTTPCookieContainerHandle CreateCookieContainer( bool bAllowResponsesToModify ) = 0; + + // Release a cookie container you are finished using, freeing it's memory + virtual bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer ) = 0; + + // Adds a cookie to the specified cookie container that will be used with future requests. + virtual bool SetCookie( HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie ) = 0; + + // Set the cookie container to use for a HTTP request + virtual bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ) = 0; + + // Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end + virtual bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const char *pchUserAgentInfo ) = 0; + + // Disable or re-enable verification of SSL/TLS certificates. + // By default, certificates are checked for all HTTPS requests. + virtual bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate ) = 0; + + // Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout + // which can bump everytime we get more data + virtual bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint32 unMilliseconds ) = 0; + + // Check if the reason the request failed was because we timed it out (rather than some harder failure) + virtual bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) = 0; +}; diff --git a/src/public SDK/ISteamImput001.h b/src/public SDK/ISteamImput001.h new file mode 100644 index 0000000..85bfca4 --- /dev/null +++ b/src/public SDK/ISteamImput001.h @@ -0,0 +1,618 @@ +//====== Copyright 1996-2018, Valve Corporation, All rights reserved. ======= +// +// Purpose: Steam Input is a flexible input API that supports over three hundred devices including all +// common variants of Xbox, Playstation, Nintendo Switch Pro, and Steam Controllers. +// For more info including a getting started guide for developers +// please visit: https://partner.steamgames.com/doc/features/steam_controller +// +//============================================================================= + +#ifndef ISTEAMINPUT_H +#define ISTEAMINPUT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#define STEAM_INPUT_MAX_COUNT 16 + +#define STEAM_INPUT_MAX_ANALOG_ACTIONS 16 + +#define STEAM_INPUT_MAX_DIGITAL_ACTIONS 128 + +#define STEAM_INPUT_MAX_ORIGINS 8 + +// When sending an option to a specific controller handle, you can send to all devices via this command +#define STEAM_INPUT_HANDLE_ALL_CONTROLLERS UINT64_MAX + +#define STEAM_INPUT_MIN_ANALOG_ACTION_DATA -1.0f +#define STEAM_INPUT_MAX_ANALOG_ACTION_DATA 1.0f + +enum EInputSource +{ + k_EInputSource_None, + k_EInputSource_LeftTrackpad, + k_EInputSource_RightTrackpad, + k_EInputSource_Joystick, + k_EInputSource_ABXY, + k_EInputSource_Switch, + k_EInputSource_LeftTrigger, + k_EInputSource_RightTrigger, + k_EInputSource_LeftBumper, + k_EInputSource_RightBumper, + k_EInputSource_Gyro, + k_EInputSource_CenterTrackpad, // PS4 + k_EInputSource_RightJoystick, // Traditional Controllers + k_EInputSource_DPad, // Traditional Controllers + k_EInputSource_Key, // Keyboards with scan codes - Unused + k_EInputSource_Mouse, // Traditional mouse - Unused + k_EInputSource_LeftGyro, // Secondary Gyro - Switch - Unused + k_EInputSource_Count +}; + +enum EInputSourceMode +{ + k_EInputSourceMode_None, + k_EInputSourceMode_Dpad, + k_EInputSourceMode_Buttons, + k_EInputSourceMode_FourButtons, + k_EInputSourceMode_AbsoluteMouse, + k_EInputSourceMode_RelativeMouse, + k_EInputSourceMode_JoystickMove, + k_EInputSourceMode_JoystickMouse, + k_EInputSourceMode_JoystickCamera, + k_EInputSourceMode_ScrollWheel, + k_EInputSourceMode_Trigger, + k_EInputSourceMode_TouchMenu, + k_EInputSourceMode_MouseJoystick, + k_EInputSourceMode_MouseRegion, + k_EInputSourceMode_RadialMenu, + k_EInputSourceMode_SingleButton, + k_EInputSourceMode_Switches +}; + +// Note: Please do not use action origins as a way to identify controller types. There is no +// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead. +// Versions of Steam that add new controller types in the future will extend this enum so if you're +// using a lookup table please check the bounds of any origins returned by Steam. +enum EInputActionOrigin +{ + // Steam Controller + k_EInputActionOrigin_None, + k_EInputActionOrigin_SteamController_A, + k_EInputActionOrigin_SteamController_B, + k_EInputActionOrigin_SteamController_X, + k_EInputActionOrigin_SteamController_Y, + k_EInputActionOrigin_SteamController_LeftBumper, + k_EInputActionOrigin_SteamController_RightBumper, + k_EInputActionOrigin_SteamController_LeftGrip, + k_EInputActionOrigin_SteamController_RightGrip, + k_EInputActionOrigin_SteamController_Start, + k_EInputActionOrigin_SteamController_Back, + k_EInputActionOrigin_SteamController_LeftPad_Touch, + k_EInputActionOrigin_SteamController_LeftPad_Swipe, + k_EInputActionOrigin_SteamController_LeftPad_Click, + k_EInputActionOrigin_SteamController_LeftPad_DPadNorth, + k_EInputActionOrigin_SteamController_LeftPad_DPadSouth, + k_EInputActionOrigin_SteamController_LeftPad_DPadWest, + k_EInputActionOrigin_SteamController_LeftPad_DPadEast, + k_EInputActionOrigin_SteamController_RightPad_Touch, + k_EInputActionOrigin_SteamController_RightPad_Swipe, + k_EInputActionOrigin_SteamController_RightPad_Click, + k_EInputActionOrigin_SteamController_RightPad_DPadNorth, + k_EInputActionOrigin_SteamController_RightPad_DPadSouth, + k_EInputActionOrigin_SteamController_RightPad_DPadWest, + k_EInputActionOrigin_SteamController_RightPad_DPadEast, + k_EInputActionOrigin_SteamController_LeftTrigger_Pull, + k_EInputActionOrigin_SteamController_LeftTrigger_Click, + k_EInputActionOrigin_SteamController_RightTrigger_Pull, + k_EInputActionOrigin_SteamController_RightTrigger_Click, + k_EInputActionOrigin_SteamController_LeftStick_Move, + k_EInputActionOrigin_SteamController_LeftStick_Click, + k_EInputActionOrigin_SteamController_LeftStick_DPadNorth, + k_EInputActionOrigin_SteamController_LeftStick_DPadSouth, + k_EInputActionOrigin_SteamController_LeftStick_DPadWest, + k_EInputActionOrigin_SteamController_LeftStick_DPadEast, + k_EInputActionOrigin_SteamController_Gyro_Move, + k_EInputActionOrigin_SteamController_Gyro_Pitch, + k_EInputActionOrigin_SteamController_Gyro_Yaw, + k_EInputActionOrigin_SteamController_Gyro_Roll, + k_EInputActionOrigin_SteamController_Reserved0, + k_EInputActionOrigin_SteamController_Reserved1, + k_EInputActionOrigin_SteamController_Reserved2, + k_EInputActionOrigin_SteamController_Reserved3, + k_EInputActionOrigin_SteamController_Reserved4, + k_EInputActionOrigin_SteamController_Reserved5, + k_EInputActionOrigin_SteamController_Reserved6, + k_EInputActionOrigin_SteamController_Reserved7, + k_EInputActionOrigin_SteamController_Reserved8, + k_EInputActionOrigin_SteamController_Reserved9, + k_EInputActionOrigin_SteamController_Reserved10, + + // PS4 Dual Shock + k_EInputActionOrigin_PS4_X, + k_EInputActionOrigin_PS4_Circle, + k_EInputActionOrigin_PS4_Triangle, + k_EInputActionOrigin_PS4_Square, + k_EInputActionOrigin_PS4_LeftBumper, + k_EInputActionOrigin_PS4_RightBumper, + k_EInputActionOrigin_PS4_Options, //Start + k_EInputActionOrigin_PS4_Share, //Back + k_EInputActionOrigin_PS4_LeftPad_Touch, + k_EInputActionOrigin_PS4_LeftPad_Swipe, + k_EInputActionOrigin_PS4_LeftPad_Click, + k_EInputActionOrigin_PS4_LeftPad_DPadNorth, + k_EInputActionOrigin_PS4_LeftPad_DPadSouth, + k_EInputActionOrigin_PS4_LeftPad_DPadWest, + k_EInputActionOrigin_PS4_LeftPad_DPadEast, + k_EInputActionOrigin_PS4_RightPad_Touch, + k_EInputActionOrigin_PS4_RightPad_Swipe, + k_EInputActionOrigin_PS4_RightPad_Click, + k_EInputActionOrigin_PS4_RightPad_DPadNorth, + k_EInputActionOrigin_PS4_RightPad_DPadSouth, + k_EInputActionOrigin_PS4_RightPad_DPadWest, + k_EInputActionOrigin_PS4_RightPad_DPadEast, + k_EInputActionOrigin_PS4_CenterPad_Touch, + k_EInputActionOrigin_PS4_CenterPad_Swipe, + k_EInputActionOrigin_PS4_CenterPad_Click, + k_EInputActionOrigin_PS4_CenterPad_DPadNorth, + k_EInputActionOrigin_PS4_CenterPad_DPadSouth, + k_EInputActionOrigin_PS4_CenterPad_DPadWest, + k_EInputActionOrigin_PS4_CenterPad_DPadEast, + k_EInputActionOrigin_PS4_LeftTrigger_Pull, + k_EInputActionOrigin_PS4_LeftTrigger_Click, + k_EInputActionOrigin_PS4_RightTrigger_Pull, + k_EInputActionOrigin_PS4_RightTrigger_Click, + k_EInputActionOrigin_PS4_LeftStick_Move, + k_EInputActionOrigin_PS4_LeftStick_Click, + k_EInputActionOrigin_PS4_LeftStick_DPadNorth, + k_EInputActionOrigin_PS4_LeftStick_DPadSouth, + k_EInputActionOrigin_PS4_LeftStick_DPadWest, + k_EInputActionOrigin_PS4_LeftStick_DPadEast, + k_EInputActionOrigin_PS4_RightStick_Move, + k_EInputActionOrigin_PS4_RightStick_Click, + k_EInputActionOrigin_PS4_RightStick_DPadNorth, + k_EInputActionOrigin_PS4_RightStick_DPadSouth, + k_EInputActionOrigin_PS4_RightStick_DPadWest, + k_EInputActionOrigin_PS4_RightStick_DPadEast, + k_EInputActionOrigin_PS4_DPad_North, + k_EInputActionOrigin_PS4_DPad_South, + k_EInputActionOrigin_PS4_DPad_West, + k_EInputActionOrigin_PS4_DPad_East, + k_EInputActionOrigin_PS4_Gyro_Move, + k_EInputActionOrigin_PS4_Gyro_Pitch, + k_EInputActionOrigin_PS4_Gyro_Yaw, + k_EInputActionOrigin_PS4_Gyro_Roll, + k_EInputActionOrigin_PS4_Reserved0, + k_EInputActionOrigin_PS4_Reserved1, + k_EInputActionOrigin_PS4_Reserved2, + k_EInputActionOrigin_PS4_Reserved3, + k_EInputActionOrigin_PS4_Reserved4, + k_EInputActionOrigin_PS4_Reserved5, + k_EInputActionOrigin_PS4_Reserved6, + k_EInputActionOrigin_PS4_Reserved7, + k_EInputActionOrigin_PS4_Reserved8, + k_EInputActionOrigin_PS4_Reserved9, + k_EInputActionOrigin_PS4_Reserved10, + + // XBox One + k_EInputActionOrigin_XBoxOne_A, + k_EInputActionOrigin_XBoxOne_B, + k_EInputActionOrigin_XBoxOne_X, + k_EInputActionOrigin_XBoxOne_Y, + k_EInputActionOrigin_XBoxOne_LeftBumper, + k_EInputActionOrigin_XBoxOne_RightBumper, + k_EInputActionOrigin_XBoxOne_Menu, //Start + k_EInputActionOrigin_XBoxOne_View, //Back + k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Click, + k_EInputActionOrigin_XBoxOne_RightTrigger_Pull, + k_EInputActionOrigin_XBoxOne_RightTrigger_Click, + k_EInputActionOrigin_XBoxOne_LeftStick_Move, + k_EInputActionOrigin_XBoxOne_LeftStick_Click, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast, + k_EInputActionOrigin_XBoxOne_RightStick_Move, + k_EInputActionOrigin_XBoxOne_RightStick_Click, + k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth, + k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth, + k_EInputActionOrigin_XBoxOne_RightStick_DPadWest, + k_EInputActionOrigin_XBoxOne_RightStick_DPadEast, + k_EInputActionOrigin_XBoxOne_DPad_North, + k_EInputActionOrigin_XBoxOne_DPad_South, + k_EInputActionOrigin_XBoxOne_DPad_West, + k_EInputActionOrigin_XBoxOne_DPad_East, + k_EInputActionOrigin_XBoxOne_Reserved0, + k_EInputActionOrigin_XBoxOne_Reserved1, + k_EInputActionOrigin_XBoxOne_Reserved2, + k_EInputActionOrigin_XBoxOne_Reserved3, + k_EInputActionOrigin_XBoxOne_Reserved4, + k_EInputActionOrigin_XBoxOne_Reserved5, + k_EInputActionOrigin_XBoxOne_Reserved6, + k_EInputActionOrigin_XBoxOne_Reserved7, + k_EInputActionOrigin_XBoxOne_Reserved8, + k_EInputActionOrigin_XBoxOne_Reserved9, + k_EInputActionOrigin_XBoxOne_Reserved10, + + // XBox 360 + k_EInputActionOrigin_XBox360_A, + k_EInputActionOrigin_XBox360_B, + k_EInputActionOrigin_XBox360_X, + k_EInputActionOrigin_XBox360_Y, + k_EInputActionOrigin_XBox360_LeftBumper, + k_EInputActionOrigin_XBox360_RightBumper, + k_EInputActionOrigin_XBox360_Start, //Start + k_EInputActionOrigin_XBox360_Back, //Back + k_EInputActionOrigin_XBox360_LeftTrigger_Pull, + k_EInputActionOrigin_XBox360_LeftTrigger_Click, + k_EInputActionOrigin_XBox360_RightTrigger_Pull, + k_EInputActionOrigin_XBox360_RightTrigger_Click, + k_EInputActionOrigin_XBox360_LeftStick_Move, + k_EInputActionOrigin_XBox360_LeftStick_Click, + k_EInputActionOrigin_XBox360_LeftStick_DPadNorth, + k_EInputActionOrigin_XBox360_LeftStick_DPadSouth, + k_EInputActionOrigin_XBox360_LeftStick_DPadWest, + k_EInputActionOrigin_XBox360_LeftStick_DPadEast, + k_EInputActionOrigin_XBox360_RightStick_Move, + k_EInputActionOrigin_XBox360_RightStick_Click, + k_EInputActionOrigin_XBox360_RightStick_DPadNorth, + k_EInputActionOrigin_XBox360_RightStick_DPadSouth, + k_EInputActionOrigin_XBox360_RightStick_DPadWest, + k_EInputActionOrigin_XBox360_RightStick_DPadEast, + k_EInputActionOrigin_XBox360_DPad_North, + k_EInputActionOrigin_XBox360_DPad_South, + k_EInputActionOrigin_XBox360_DPad_West, + k_EInputActionOrigin_XBox360_DPad_East, + k_EInputActionOrigin_XBox360_Reserved0, + k_EInputActionOrigin_XBox360_Reserved1, + k_EInputActionOrigin_XBox360_Reserved2, + k_EInputActionOrigin_XBox360_Reserved3, + k_EInputActionOrigin_XBox360_Reserved4, + k_EInputActionOrigin_XBox360_Reserved5, + k_EInputActionOrigin_XBox360_Reserved6, + k_EInputActionOrigin_XBox360_Reserved7, + k_EInputActionOrigin_XBox360_Reserved8, + k_EInputActionOrigin_XBox360_Reserved9, + k_EInputActionOrigin_XBox360_Reserved10, + + + // Switch - Pro or Joycons used as a single input device. + // This does not apply to a single joycon + k_EInputActionOrigin_Switch_A, + k_EInputActionOrigin_Switch_B, + k_EInputActionOrigin_Switch_X, + k_EInputActionOrigin_Switch_Y, + k_EInputActionOrigin_Switch_LeftBumper, + k_EInputActionOrigin_Switch_RightBumper, + k_EInputActionOrigin_Switch_Plus, //Start + k_EInputActionOrigin_Switch_Minus, //Back + k_EInputActionOrigin_Switch_Capture, + k_EInputActionOrigin_Switch_LeftTrigger_Pull, + k_EInputActionOrigin_Switch_LeftTrigger_Click, + k_EInputActionOrigin_Switch_RightTrigger_Pull, + k_EInputActionOrigin_Switch_RightTrigger_Click, + k_EInputActionOrigin_Switch_LeftStick_Move, + k_EInputActionOrigin_Switch_LeftStick_Click, + k_EInputActionOrigin_Switch_LeftStick_DPadNorth, + k_EInputActionOrigin_Switch_LeftStick_DPadSouth, + k_EInputActionOrigin_Switch_LeftStick_DPadWest, + k_EInputActionOrigin_Switch_LeftStick_DPadEast, + k_EInputActionOrigin_Switch_RightStick_Move, + k_EInputActionOrigin_Switch_RightStick_Click, + k_EInputActionOrigin_Switch_RightStick_DPadNorth, + k_EInputActionOrigin_Switch_RightStick_DPadSouth, + k_EInputActionOrigin_Switch_RightStick_DPadWest, + k_EInputActionOrigin_Switch_RightStick_DPadEast, + k_EInputActionOrigin_Switch_DPad_North, + k_EInputActionOrigin_Switch_DPad_South, + k_EInputActionOrigin_Switch_DPad_West, + k_EInputActionOrigin_Switch_DPad_East, + k_EInputActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_Reserved0, + k_EInputActionOrigin_Switch_Reserved1, + k_EInputActionOrigin_Switch_Reserved2, + k_EInputActionOrigin_Switch_Reserved3, + k_EInputActionOrigin_Switch_Reserved4, + k_EInputActionOrigin_Switch_Reserved5, + k_EInputActionOrigin_Switch_Reserved6, + k_EInputActionOrigin_Switch_Reserved7, + k_EInputActionOrigin_Switch_Reserved8, + k_EInputActionOrigin_Switch_Reserved9, + k_EInputActionOrigin_Switch_Reserved10, + + // Switch JoyCon Specific + k_EInputActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_LeftGyro_Move, + k_EInputActionOrigin_Switch_LeftGyro_Pitch, + k_EInputActionOrigin_Switch_LeftGyro_Yaw, + k_EInputActionOrigin_Switch_LeftGyro_Roll, + k_EInputActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button + k_EInputActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button + k_EInputActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button + k_EInputActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button + k_EInputActionOrigin_Switch_Reserved11, + k_EInputActionOrigin_Switch_Reserved12, + k_EInputActionOrigin_Switch_Reserved13, + k_EInputActionOrigin_Switch_Reserved14, + k_EInputActionOrigin_Switch_Reserved15, + k_EInputActionOrigin_Switch_Reserved16, + k_EInputActionOrigin_Switch_Reserved17, + k_EInputActionOrigin_Switch_Reserved18, + k_EInputActionOrigin_Switch_Reserved19, + k_EInputActionOrigin_Switch_Reserved20, + + k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here. + k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. +}; + +//enum EXboxOrigin +//{ +// k_EXboxOrigin_A, +// k_EXboxOrigin_B, +// k_EXboxOrigin_X, +// k_EXboxOrigin_Y, +// k_EXboxOrigin_LeftBumper, +// k_EXboxOrigin_RightBumper, +// k_EXboxOrigin_Menu, //Start +// k_EXboxOrigin_View, //Back +// k_EXboxOrigin_LeftTrigger_Pull, +// k_EXboxOrigin_LeftTrigger_Click, +// k_EXboxOrigin_RightTrigger_Pull, +// k_EXboxOrigin_RightTrigger_Click, +// k_EXboxOrigin_LeftStick_Move, +// k_EXboxOrigin_LeftStick_Click, +// k_EXboxOrigin_LeftStick_DPadNorth, +// k_EXboxOrigin_LeftStick_DPadSouth, +// k_EXboxOrigin_LeftStick_DPadWest, +// k_EXboxOrigin_LeftStick_DPadEast, +// k_EXboxOrigin_RightStick_Move, +// k_EXboxOrigin_RightStick_Click, +// k_EXboxOrigin_RightStick_DPadNorth, +// k_EXboxOrigin_RightStick_DPadSouth, +// k_EXboxOrigin_RightStick_DPadWest, +// k_EXboxOrigin_RightStick_DPadEast, +// k_EXboxOrigin_DPad_North, +// k_EXboxOrigin_DPad_South, +// k_EXboxOrigin_DPad_West, +// k_EXboxOrigin_DPad_East, +// k_EXboxOrigin_Count, +//}; + +//enum ESteamControllerPad +//{ +// k_ESteamControllerPad_Left, +// k_ESteamControllerPad_Right +//}; + +//enum ESteamInputType +//{ +// k_ESteamInputType_Unknown, +// k_ESteamInputType_SteamController, +// k_ESteamInputType_XBox360Controller, +// k_ESteamInputType_XBoxOneController, +// k_ESteamInputType_GenericGamepad, // DirectInput controllers +// k_ESteamInputType_PS4Controller, +// k_ESteamInputType_AppleMFiController, // Unused +// k_ESteamInputType_AndroidController, // Unused +// k_ESteamInputType_SwitchJoyConPair, // Unused +// k_ESteamInputType_SwitchJoyConSingle, // Unused +// k_ESteamInputType_SwitchProController, +// k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller +// k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins +// k_ESteamInputType_Count, +// k_ESteamInputType_MaximumPossibleValue = 255, +//}; + +// These values are passed into SetLEDColor +enum ESteamInputLEDFlag +{ + k_ESteamInputLEDFlag_SetColor, + // Restore the LED color to the user's preference setting as set in the controller personalization menu. + // This also happens automatically on exit of your game. + k_ESteamInputLEDFlag_RestoreUserDefault +}; + +// InputHandle_t is used to refer to a specific controller. +// This handle will consistently identify a controller, even if it is disconnected and re-connected +typedef uint64 InputHandle_t; + + +// These handles are used to refer to a specific in-game action or action set +// All action handles should be queried during initialization for performance reasons +typedef uint64 InputActionSetHandle_t; +typedef uint64 InputDigitalActionHandle_t; +typedef uint64 InputAnalogActionHandle_t; + +#pragma pack( push, 1 ) + +struct InputAnalogActionData_t +{ + // Type of data coming from this action, this will match what got specified in the action set + EInputSourceMode eMode; + + // The current state of this action; will be delta updates for mouse actions + float x, y; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; + +struct InputDigitalActionData_t +{ + // The current state of this action; will be true if currently pressed + bool bState; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; + +struct InputMotionData_t +{ + // Sensor-fused absolute rotation; will drift in heading + float rotQuatX; + float rotQuatY; + float rotQuatZ; + float rotQuatW; + + // Positional acceleration + float posAccelX; + float posAccelY; + float posAccelZ; + + // Angular velocity + float rotVelX; + float rotVelY; + float rotVelZ; +}; + +#pragma pack( pop ) + + +//----------------------------------------------------------------------------- +// Purpose: Steam Input API +//----------------------------------------------------------------------------- +class ISteamInput001 +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. This must + // be called from somewhere before GetConnectedControllers will return any handles + virtual void RunFrame() = 0; + + // Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via + // the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam. + // handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( InputHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTION SETS + //----------------------------------------------------------------------------- + + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) = 0; + virtual InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) = 0; + + // ACTION SET LAYERS + virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0; + virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, InputActionSetHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTIONS + //----------------------------------------------------------------------------- + + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin *originsOut ) = 0; + + // Get a local path to art for on-screen glyph for a particular origin - this call is cheap + virtual const char *GetGlyphForActionOrigin( EInputActionOrigin eOrigin ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized + virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0; + + // Stop analog momentum for the action if it is a mouse action in trackball mode + virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0; + + // Returns raw motion data from the specified device + virtual InputMotionData_t GetMotionData( InputHandle_t inputHandle ) = 0; + + //----------------------------------------------------------------------------- + // OUTPUTS + //----------------------------------------------------------------------------- + + // Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers + virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; + + // Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle + // the behavior on exit of your program so you don't need to try restore the default as you are shutting down + virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; + + // Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead. + // Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc). + virtual void TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + //----------------------------------------------------------------------------- + // Utility functions availible without using the rest of Steam Input API + //----------------------------------------------------------------------------- + + // Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode + // If the user is not in Big Picture Mode it will open up the binding in a new window + virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0; + + // Returns the input type for a particular handle + virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions + // to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input + virtual InputHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index + virtual int GetGamepadIndexForController( InputHandle_t ulinputHandle ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified Xbox controller origin. This function is cheap. + virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular Xbox controller origin. This function is serialized. + virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for + // non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration + virtual EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin ) = 0; + + // Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EInputActionOrigin_None + // When a new input type is added you will be able to pass in k_ESteamInputType_Unknown amd the closest origin that your version of the SDK regonized will be returned + // ex: if a Playstation 5 controller was released this function would return Playstation 4 origins. + virtual EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin ) = 0; +}; + +#define STEAMINPUT_INTERFACE_VERSION001 "SteamInput001" + +// Global interface accessor + + +#endif // ISTEAMINPUT_H diff --git a/src/public SDK/ISteamInventory001.h b/src/public SDK/ISteamInventory001.h new file mode 100644 index 0000000..839b535 --- /dev/null +++ b/src/public SDK/ISteamInventory001.h @@ -0,0 +1,276 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMINVENTORY001_H +#define ISTEAMINVENTORY001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "InventoryCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam Inventory query and manipulation API +//----------------------------------------------------------------------------- +class ISteamInventory001 +{ +public: + + // INVENTORY ASYNC RESULT MANAGEMENT + // + // Asynchronous inventory queries always output a result handle which can be used with + // GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will + // be triggered when the asynchronous result becomes ready (or fails). + // + + // Find out the status of an asynchronous inventory result handle. Possible values: + // k_EResultPending - still in progress + // k_EResultOK - done, result ready + // k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult) + // k_EResultInvalidParam - ERROR: invalid API call parameters + // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later + // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits + // k_EResultFail - ERROR: unknown / generic error + METHOD_DESC(Find out the status of an asynchronous inventory result handle.) + virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0; + + // Copies the contents of a result set into a flat array. The specific + // contents of the result set depend on which query which was used. + METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.) + virtual bool GetResultItems( SteamInventoryResult_t resultHandle, + OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray, + uint32 *punOutItemsArraySize ) = 0; + + // Returns the server time at which the result was generated. Compare against + // the value of IClientUtils::GetServerRealTime() to determine age. + METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) + virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0; + + // Returns true if the result belongs to the target steam ID, false if the + // result does not. This is important when using DeserializeResult, to verify + // that a remote player is not pretending to have a different user's inventory. + METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) + virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0; + + // Destroys a result handle and frees all associated memory. + METHOD_DESC(Destroys a result handle and frees all associated memory.) + virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0; + + + // INVENTORY ASYNC QUERY + // + + // Captures the entire state of the current user's Steam inventory. + // You must call DestroyResult on this handle when you are done with it. + // Returns false and sets *pResultHandle to zero if inventory is unavailable. + // Note: calls to this function are subject to rate limits and may return + // cached results if called too frequently. It is suggested that you call + // this function only when you are about to display the user's full inventory, + // or if you expect that the inventory may have changed. + METHOD_DESC(Captures the entire state of the current users Steam inventory.) + virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0; + + + // Captures the state of a subset of the current user's Steam inventory, + // identified by an array of item instance IDs. The results from this call + // can be serialized and passed to other players to "prove" that the current + // user owns specific items, without exposing the user's entire inventory. + // For example, you could call GetItemsByID with the IDs of the user's + // currently equipped cosmetic items and serialize this to a buffer, and + // then transmit this buffer to other players upon joining a game. + METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) + virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0; + + + // RESULT SERIALIZATION AND AUTHENTICATION + // + // Serialized result sets contain a short signature which can't be forged + // or replayed across different game sessions. A result set can be serialized + // on the local client, transmitted to other players via your game networking, + // and deserialized by the remote players. This is a secure way of preventing + // hackers from lying about posessing rare/high-value items. + + // Serializes a result set with signature bytes to an output buffer. Pass + // NULL as an output buffer to get the required size via punOutBufferSize. + // The size of a serialized result depends on the number items which are being + // serialized. When securely transmitting items to other players, it is + // recommended to use "GetItemsByID" first to create a minimal result set. + // Results have a built-in timestamp which will be considered "expired" after + // an hour has elapsed. See DeserializeResult for expiration handling. + virtual bool SerializeResult( SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0; + + // Deserializes a result set and verifies the signature bytes. Returns false + // if bRequireFullOnlineVerify is set but Steam is running in Offline mode. + // Otherwise returns true and then delivers error codes via GetResultStatus. + // + // The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not + // be set to true by your game at this time. + // + // DeserializeResult has a potential soft-failure mode where the handle status + // is set to k_EResultExpired. GetResultItems() still succeeds in this mode. + // The "expired" result could indicate that the data may be out of date - not + // just due to timed expiration (one hour), but also because one of the items + // in the result set may have been traded or consumed since the result set was + // generated. You could compare the timestamp from GetResultTimestamp() to + // ISteamUtils::GetServerRealTime() to determine how old the data is. You could + // simply ignore the "expired" result code and continue as normal, or you + // could challenge the player with expired data to send an updated result set. + virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0; + + + // INVENTORY ASYNC MODIFICATION + // + + // GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t + // notification with a matching nCallbackContext parameter. This API is insecure, and could + // be abused by hacked clients. It is, however, very useful as a development cheat or as + // a means of prototyping item-related features for your game. The use of GenerateItems can + // be restricted to certain item definitions or fully blocked via the Steamworks website. + // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should + // describe the quantity of each item to generate. + virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // GrantPromoItems() checks the list of promotional items for which the user may be eligible + // and grants the items (one time only). On success, the result set will include items which + // were granted, if any. If no items were granted because the user isn't eligible for any + // promotions, this is still considered a success. + METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) + virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0; + + // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of + // scanning for all eligible promotional items, the check is restricted to a single item + // definition or set of item definitions. This can be useful if your game has custom UI for + // showing a specific promo item to the user. + virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0; + virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0; + + // ConsumeItem() removes items from the inventory, permanently. They cannot be recovered. + // Not for the faint of heart - if your game implements item removal at all, a high-friction + // UI confirmation process is highly recommended. Similar to GenerateItems, punArrayQuantity + // can be NULL or else an array of the same length as pArrayItems which describe the quantity + // of each item to destroy. ConsumeItem can be restricted to certain item definitions or + // fully blocked via the Steamworks website to minimize support/abuse issues such as the + // clasic "my brother borrowed my laptop and deleted all of my rare items". + METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0; + + // ExchangeItems() is an atomic combination of GenerateItems and DestroyItems. It can be + // used to implement crafting recipes or transmutations, or items which unpack themselves + // into other items. Like GenerateItems, this is a flexible and dangerous API which is + // meant for rapid prototyping. You can configure restrictions on ExchangeItems via the + // Steamworks website, such as limiting it to a whitelist of input/output combinations + // corresponding to recipes. + // (Note: although GenerateItems may be hard or impossible to use securely in your game, + // ExchangeItems is perfectly reasonable to use once the whitelists are set accordingly.) + virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0; + + + // TransferItemQuantity() is intended for use with items which are "stackable" (can have + // quantity greater than one). It can be used to split a stack into two, or to transfer + // quantity from one stack into another stack of identical items. To split one stack into + // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. + virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0; + + + // TIMED DROPS AND PLAYTIME CREDIT + // + + // Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when + // active gameplay begins, and at least once every two minutes afterwards. The backend + // performs its own time calculations, so the precise timing of the heartbeat is not + // critical as long as you send at least one heartbeat every two minutes. Calling the + // function more often than that is not harmful, it will simply have no effect. Note: + // players may be able to spoof this message by hacking their client, so you should not + // attempt to use this as a mechanism to restrict playtime credits. It is simply meant + // to distinguish between being in any kind of gameplay situation vs the main menu or + // a pre-game launcher window. (If you are stingy with handing out playtime credit, it + // will only encourage players to run bots or use mouse/kb event simulators.) + // + // Playtime credit accumulation can be capped on a daily or weekly basis through your + // Steamworks configuration. + // + METHOD_DESC(Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when active gameplay begins and at least once every two minutes afterwards.) + virtual void SendItemDropHeartbeat() = 0; + + // Playtime credit must be consumed and turned into item drops by your game. Only item + // definitions which are marked as "playtime item generators" can be spawned. The call + // will return an empty result set if there is not enough playtime credit for a drop. + // Your game should call TriggerItemDrop at an appropriate time for the user to receive + // new items, such as between rounds or while the player is dead. Note that players who + // hack their clients could modify the value of "dropListDefinition", so do not use it + // to directly control rarity. It is primarily useful during testing and development, + // where you may wish to perform experiments with different types of drops. + METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) + virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0; + + + // IN-GAME TRADING + // + // TradeItems() implements limited in-game trading of items, if you prefer not to use + // the overlay or an in-game web browser to perform Steam Trading through the website. + // You should implement a UI where both players can see and agree to a trade, and then + // each client should call TradeItems simultaneously (+/- 5 seconds) with matching + // (but reversed) parameters. The result is the same as if both players performed a + // Steam Trading transaction through the web. Each player will get an inventory result + // confirming the removal or quantity changes of the items given away, and the new + // item instance id numbers and quantities of the received items. + // (Note: new item instance IDs are generated whenever an item changes ownership.) + virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0; + + + // ITEM DEFINITIONS + // + // Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000) + // to a set of string properties. Some of these properties are required to display items + // on the Steam community web site. Other properties can be defined by applications. + // Use of these functions is optional; there is no reason to call LoadItemDefinitions + // if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue + // weapon mod = 55) and does not allow for adding new item types without a client patch. + // + + // LoadItemDefinitions triggers the automatic load and refresh of item definitions. + // Every time new item definitions are available (eg, from the dynamic addition of new + // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t + // callback will be fired. + METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) + virtual bool LoadItemDefinitions() = 0; + + // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are + // defined via Steamworks configuration, and not necessarily contiguous integers). + // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will + // contain the total size necessary for a subsequent call. Otherwise, the call will + // return false if and only if there is not enough space in the output array. + virtual bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // GetItemDefinitionProperty returns a string property from a given item definition. + // Note that some properties (for example, "name") may be localized and will depend + // on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage). + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. + virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName, + OUT_STRING_COUNT(punValueBufferSize) char *pchValueBuffer, uint32 *punValueBufferSize ) = 0; +}; + +#endif // ISTEAMINVENTORY001_H diff --git a/src/public SDK/ISteamInventory002.h b/src/public SDK/ISteamInventory002.h new file mode 100644 index 0000000..8b888c5 --- /dev/null +++ b/src/public SDK/ISteamInventory002.h @@ -0,0 +1,312 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + + +#include "SteamTypes.h" +#include "InventoryCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam Inventory query and manipulation API +//----------------------------------------------------------------------------- +class ISteamInventory002 +{ +public: + // INVENTORY ASYNC RESULT MANAGEMENT + // + // Asynchronous inventory queries always output a result handle which can be used with + // GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will + // be triggered when the asynchronous result becomes ready (or fails). + // + + // Find out the status of an asynchronous inventory result handle. Possible values: + // k_EResultPending - still in progress + // k_EResultOK - done, result ready + // k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult) + // k_EResultInvalidParam - ERROR: invalid API call parameters + // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later + // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits + // k_EResultFail - ERROR: unknown / generic error + + virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0; + + // Copies the contents of a result set into a flat array. The specific + // contents of the result set depend on which query which was used. + + virtual bool GetResultItems( SteamInventoryResult_t resultHandle, + SteamItemDetails_t *pOutItemsArray, + uint32 *punOutItemsArraySize ) = 0; + + // In combination with GetResultItems, you can use GetResultItemProperty to retrieve + // dynamic string properties for a given item returned in the result set. + // + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. + // + // If pchValueBuffer is NULL, *punValueBufferSize will contain the + // suggested buffer size. Otherwise it will be the number of bytes actually copied + // to pchValueBuffer. If the results do not fit in the given buffer, partial + // results may be copied. + virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle, + uint32 unItemIndex, + const char *pchPropertyName, + char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + + // Returns the server time at which the result was generated. Compare against + // the value of IClientUtils::GetServerRealTime() to determine age. + ////STEAM_METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) + virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0; + + // Returns true if the result belongs to the target steam ID, false if the + // result does not. This is important when using DeserializeResult, to verify + // that a remote player is not pretending to have a different user's inventory. + ////STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) + virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0; + + // Destroys a result handle and frees all associated memory. +/// STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.) + virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0; + + + // INVENTORY ASYNC QUERY + // + + // Captures the entire state of the current user's Steam inventory. + // You must call DestroyResult on this handle when you are done with it. + // Returns false and sets *pResultHandle to zero if inventory is unavailable. + // Note: calls to this function are subject to rate limits and may return + // cached results if called too frequently. It is suggested that you call + // this function only when you are about to display the user's full inventory, + // or if you expect that the inventory may have changed. +// STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.) + virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0; + + + // Captures the state of a subset of the current user's Steam inventory, + // identified by an array of item instance IDs. The results from this call + // can be serialized and passed to other players to "prove" that the current + // user owns specific items, without exposing the user's entire inventory. + // For example, you could call GetItemsByID with the IDs of the user's + // currently equipped cosmetic items and serialize this to a buffer, and + // then transmit this buffer to other players upon joining a game. + ///STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) + virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0; + + + // RESULT SERIALIZATION AND AUTHENTICATION + // + // Serialized result sets contain a short signature which can't be forged + // or replayed across different game sessions. A result set can be serialized + // on the local client, transmitted to other players via your game networking, + // and deserialized by the remote players. This is a secure way of preventing + // hackers from lying about posessing rare/high-value items. + + // Serializes a result set with signature bytes to an output buffer. Pass + // NULL as an output buffer to get the required size via punOutBufferSize. + // The size of a serialized result depends on the number items which are being + // serialized. When securely transmitting items to other players, it is + // recommended to use "GetItemsByID" first to create a minimal result set. + // Results have a built-in timestamp which will be considered "expired" after + // an hour has elapsed. See DeserializeResult for expiration handling. + virtual bool SerializeResult( SteamInventoryResult_t resultHandle, void *pOutBuffer, uint32 *punOutBufferSize ) = 0; + + // Deserializes a result set and verifies the signature bytes. Returns false + // if bRequireFullOnlineVerify is set but Steam is running in Offline mode. + // Otherwise returns true and then delivers error codes via GetResultStatus. + // + // The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not + // be set to true by your game at this time. + // + // DeserializeResult has a potential soft-failure mode where the handle status + // is set to k_EResultExpired. GetResultItems() still succeeds in this mode. + // The "expired" result could indicate that the data may be out of date - not + // just due to timed expiration (one hour), but also because one of the items + // in the result set may have been traded or consumed since the result set was + // generated. You could compare the timestamp from GetResultTimestamp() to + // ISteamUtils::GetServerRealTime() to determine how old the data is. You could + // simply ignore the "expired" result code and continue as normal, or you + // could challenge the player with expired data to send an updated result set. + virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0; + + + // INVENTORY ASYNC MODIFICATION + // + + // GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t + // notification with a matching nCallbackContext parameter. This API is only intended + // for prototyping - it is only usable by Steam accounts that belong to the publisher group + // for your game. + // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should + // describe the quantity of each item to generate. + virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // GrantPromoItems() checks the list of promotional items for which the user may be eligible + // and grants the items (one time only). On success, the result set will include items which + // were granted, if any. If no items were granted because the user isn't eligible for any + // promotions, this is still considered a success. + METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) + virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0; + + // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of + // scanning for all eligible promotional items, the check is restricted to a single item + // definition or set of item definitions. This can be useful if your game has custom UI for + // showing a specific promo item to the user. + virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0; + virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0; + + // ConsumeItem() removes items from the inventory, permanently. They cannot be recovered. + // Not for the faint of heart - if your game implements item removal at all, a high-friction + // UI confirmation process is highly recommended. + METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0; + + // ExchangeItems() is an atomic combination of item generation and consumption. + // It can be used to implement crafting recipes or transmutations, or items which unpack + // themselves into other items (e.g., a chest). + // Exchange recipes are defined in the ItemDef, and explicitly list the required item + // types and resulting generated type. + // Exchange recipes are evaluated atomically by the Inventory Service; if the supplied + // components do not match the recipe, or do not contain sufficient quantity, the + // exchange will fail. + virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0; + + + // TransferItemQuantity() is intended for use with items which are "stackable" (can have + // quantity greater than one). It can be used to split a stack into two, or to transfer + // quantity from one stack into another stack of identical items. To split one stack into + // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. + virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0; + + + // TIMED DROPS AND PLAYTIME CREDIT + // + + // Deprecated. Calling this method is not required for proper playtime accounting. + METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. ) + virtual void SendItemDropHeartbeat() = 0; + + // Playtime credit must be consumed and turned into item drops by your game. Only item + // definitions which are marked as "playtime item generators" can be spawned. The call + // will return an empty result set if there is not enough playtime credit for a drop. + // Your game should call TriggerItemDrop at an appropriate time for the user to receive + // new items, such as between rounds or while the player is dead. Note that players who + // hack their clients could modify the value of "dropListDefinition", so do not use it + // to directly control rarity. + // See your Steamworks configuration to set playtime drop rates for individual itemdefs. + // The client library will suppress too-frequent calls to this method. + METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) + virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0; + + + // Deprecated. This method is not supported. + virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0; + + + // ITEM DEFINITIONS + // + // Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000) + // to a set of string properties. Some of these properties are required to display items + // on the Steam community web site. Other properties can be defined by applications. + // Use of these functions is optional; there is no reason to call LoadItemDefinitions + // if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue + // weapon mod = 55) and does not allow for adding new item types without a client patch. + // + + // LoadItemDefinitions triggers the automatic load and refresh of item definitions. + // Every time new item definitions are available (eg, from the dynamic addition of new + // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t + // callback will be fired. + METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) + virtual bool LoadItemDefinitions() = 0; + + // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are + // defined via Steamworks configuration, and not necessarily contiguous integers). + // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will + // contain the total size necessary for a subsequent call. Otherwise, the call will + // return false if and only if there is not enough space in the output array. + virtual bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // GetItemDefinitionProperty returns a string property from a given item definition. + // Note that some properties (for example, "name") may be localized and will depend + // on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage). + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the + // suggested buffer size. Otherwise it will be the number of bytes actually copied + // to pchValueBuffer. If the results do not fit in the given buffer, partial + // results may be copied. + virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName, + OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + + // Request the list of "eligible" promo items that can be manually granted to the given + // user. These are promo items of type "manual" that won't be granted automatically. + // An example usage of this is an item that becomes available every week. + virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0; + + // After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this + // function to pull out the list of item definition ids that the user can be + // manually granted via the AddPromoItems() call. + virtual bool GetEligiblePromoItemDefinitionIDs( + CSteamID steamID, + OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t + // will be posted if Steam was able to initialize the transaction. + // + // Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t + // will be posted. + + virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // Request current prices for all applicable item definitions + virtual SteamAPICall_t RequestPrices() = 0; + + // Returns the number of items with prices. Need to call RequestPrices() first. + virtual uint32 GetNumItemsWithPrices() = 0; + + // Returns item definition ids and their prices in the user's local currency. + // Need to call RequestPrices() first. + virtual bool GetItemsWithPrices( ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pPrices, + uint32 unArrayLength ) = 0; + + // Retrieves the price for the item definition id + // Returns false if there is no price stored for the item definition. + virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) = 0; + + // Create a request to update properties on items + virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0; + // Remove the property on the item + virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0; + // Accessor methods to set properties on items + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0; + // Submit the update request by handle + virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0; + +}; \ No newline at end of file diff --git a/src/public SDK/ISteamInventory003.h b/src/public SDK/ISteamInventory003.h new file mode 100644 index 0000000..fce1559 --- /dev/null +++ b/src/public SDK/ISteamInventory003.h @@ -0,0 +1,315 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + + +#include "SteamTypes.h" +#include "InventoryCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam Inventory query and manipulation API +//----------------------------------------------------------------------------- +class ISteamInventory003 +{ +public: + // INVENTORY ASYNC RESULT MANAGEMENT + // + // Asynchronous inventory queries always output a result handle which can be used with + // GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will + // be triggered when the asynchronous result becomes ready (or fails). + // + + // Find out the status of an asynchronous inventory result handle. Possible values: + // k_EResultPending - still in progress + // k_EResultOK - done, result ready + // k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult) + // k_EResultInvalidParam - ERROR: invalid API call parameters + // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later + // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits + // k_EResultFail - ERROR: unknown / generic error + METHOD_DESC(Find out the status of an asynchronous inventory result handle.) + virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0; + + // Copies the contents of a result set into a flat array. The specific + // contents of the result set depend on which query which was used. + METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.) + virtual bool GetResultItems( SteamInventoryResult_t resultHandle, + OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray, + uint32 *punOutItemsArraySize ) = 0; + + // In combination with GetResultItems, you can use GetResultItemProperty to retrieve + // dynamic string properties for a given item returned in the result set. + // + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. + // + // If pchValueBuffer is NULL, *punValueBufferSize will contain the + // suggested buffer size. Otherwise it will be the number of bytes actually copied + // to pchValueBuffer. If the results do not fit in the given buffer, partial + // results may be copied. + virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle, + uint32 unItemIndex, + const char *pchPropertyName, + OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + + // Returns the server time at which the result was generated. Compare against + // the value of IClientUtils::GetServerRealTime() to determine age. + METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) + virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0; + + // Returns true if the result belongs to the target steam ID, false if the + // result does not. This is important when using DeserializeResult, to verify + // that a remote player is not pretending to have a different user's inventory. + METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) + virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0; + + // Destroys a result handle and frees all associated memory. + METHOD_DESC(Destroys a result handle and frees all associated memory.) + virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0; + + + // INVENTORY ASYNC QUERY + // + + // Captures the entire state of the current user's Steam inventory. + // You must call DestroyResult on this handle when you are done with it. + // Returns false and sets *pResultHandle to zero if inventory is unavailable. + // Note: calls to this function are subject to rate limits and may return + // cached results if called too frequently. It is suggested that you call + // this function only when you are about to display the user's full inventory, + // or if you expect that the inventory may have changed. + METHOD_DESC(Captures the entire state of the current users Steam inventory.) + virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0; + + + // Captures the state of a subset of the current user's Steam inventory, + // identified by an array of item instance IDs. The results from this call + // can be serialized and passed to other players to "prove" that the current + // user owns specific items, without exposing the user's entire inventory. + // For example, you could call GetItemsByID with the IDs of the user's + // currently equipped cosmetic items and serialize this to a buffer, and + // then transmit this buffer to other players upon joining a game. + METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) + virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0; + + + // RESULT SERIALIZATION AND AUTHENTICATION + // + // Serialized result sets contain a short signature which can't be forged + // or replayed across different game sessions. A result set can be serialized + // on the local client, transmitted to other players via your game networking, + // and deserialized by the remote players. This is a secure way of preventing + // hackers from lying about posessing rare/high-value items. + + // Serializes a result set with signature bytes to an output buffer. Pass + // NULL as an output buffer to get the required size via punOutBufferSize. + // The size of a serialized result depends on the number items which are being + // serialized. When securely transmitting items to other players, it is + // recommended to use "GetItemsByID" first to create a minimal result set. + // Results have a built-in timestamp which will be considered "expired" after + // an hour has elapsed. See DeserializeResult for expiration handling. + virtual bool SerializeResult( SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0; + + // Deserializes a result set and verifies the signature bytes. Returns false + // if bRequireFullOnlineVerify is set but Steam is running in Offline mode. + // Otherwise returns true and then delivers error codes via GetResultStatus. + // + // The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not + // be set to true by your game at this time. + // + // DeserializeResult has a potential soft-failure mode where the handle status + // is set to k_EResultExpired. GetResultItems() still succeeds in this mode. + // The "expired" result could indicate that the data may be out of date - not + // just due to timed expiration (one hour), but also because one of the items + // in the result set may have been traded or consumed since the result set was + // generated. You could compare the timestamp from GetResultTimestamp() to + // ISteamUtils::GetServerRealTime() to determine how old the data is. You could + // simply ignore the "expired" result code and continue as normal, or you + // could challenge the player with expired data to send an updated result set. + virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0; + + + // INVENTORY ASYNC MODIFICATION + // + + // GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t + // notification with a matching nCallbackContext parameter. This API is only intended + // for prototyping - it is only usable by Steam accounts that belong to the publisher group + // for your game. + // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should + // describe the quantity of each item to generate. + virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // GrantPromoItems() checks the list of promotional items for which the user may be eligible + // and grants the items (one time only). On success, the result set will include items which + // were granted, if any. If no items were granted because the user isn't eligible for any + // promotions, this is still considered a success. + METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) + virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0; + + // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of + // scanning for all eligible promotional items, the check is restricted to a single item + // definition or set of item definitions. This can be useful if your game has custom UI for + // showing a specific promo item to the user. + virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0; + virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0; + + // ConsumeItem() removes items from the inventory, permanently. They cannot be recovered. + // Not for the faint of heart - if your game implements item removal at all, a high-friction + // UI confirmation process is highly recommended. + METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0; + + // ExchangeItems() is an atomic combination of item generation and consumption. + // It can be used to implement crafting recipes or transmutations, or items which unpack + // themselves into other items (e.g., a chest). + // Exchange recipes are defined in the ItemDef, and explicitly list the required item + // types and resulting generated type. + // Exchange recipes are evaluated atomically by the Inventory Service; if the supplied + // components do not match the recipe, or do not contain sufficient quantity, the + // exchange will fail. + virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle, + ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, + ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0; + + + // TransferItemQuantity() is intended for use with items which are "stackable" (can have + // quantity greater than one). It can be used to split a stack into two, or to transfer + // quantity from one stack into another stack of identical items. To split one stack into + // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. + virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0; + + + // TIMED DROPS AND PLAYTIME CREDIT + // + + // Deprecated. Calling this method is not required for proper playtime accounting. + METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. ) + virtual void SendItemDropHeartbeat() = 0; + + // Playtime credit must be consumed and turned into item drops by your game. Only item + // definitions which are marked as "playtime item generators" can be spawned. The call + // will return an empty result set if there is not enough playtime credit for a drop. + // Your game should call TriggerItemDrop at an appropriate time for the user to receive + // new items, such as between rounds or while the player is dead. Note that players who + // hack their clients could modify the value of "dropListDefinition", so do not use it + // to directly control rarity. + // See your Steamworks configuration to set playtime drop rates for individual itemdefs. + // The client library will suppress too-frequent calls to this method. + METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) + virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0; + + + // Deprecated. This method is not supported. + virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, + ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, + ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0; + + + // ITEM DEFINITIONS + // + // Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000) + // to a set of string properties. Some of these properties are required to display items + // on the Steam community web site. Other properties can be defined by applications. + // Use of these functions is optional; there is no reason to call LoadItemDefinitions + // if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue + // weapon mod = 55) and does not allow for adding new item types without a client patch. + // + + // LoadItemDefinitions triggers the automatic load and refresh of item definitions. + // Every time new item definitions are available (eg, from the dynamic addition of new + // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t + // callback will be fired. + METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) + virtual bool LoadItemDefinitions() = 0; + + // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are + // defined via Steamworks configuration, and not necessarily contiguous integers). + // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will + // contain the total size necessary for a subsequent call. Otherwise, the call will + // return false if and only if there is not enough space in the output array. + virtual bool GetItemDefinitionIDs( + OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // GetItemDefinitionProperty returns a string property from a given item definition. + // Note that some properties (for example, "name") may be localized and will depend + // on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage). + // Property names are always composed of ASCII letters, numbers, and/or underscores. + // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available + // property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the + // suggested buffer size. Otherwise it will be the number of bytes actually copied + // to pchValueBuffer. If the results do not fit in the given buffer, partial + // results may be copied. + virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName, + OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + + // Request the list of "eligible" promo items that can be manually granted to the given + // user. These are promo items of type "manual" that won't be granted automatically. + // An example usage of this is an item that becomes available every week. + + virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0; + + // After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this + // function to pull out the list of item definition ids that the user can be + // manually granted via the AddPromoItems() call. + virtual bool GetEligiblePromoItemDefinitionIDs( + CSteamID steamID, + OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t + // will be posted if Steam was able to initialize the transaction. + // + // Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t + // will be posted. + + virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // Request current prices for all applicable item definitions + + virtual SteamAPICall_t RequestPrices() = 0; + + // Returns the number of items with prices. Need to call RequestPrices() first. + virtual uint32 GetNumItemsWithPrices() = 0; + + // Returns item definition ids and their prices in the user's local currency. + // Need to call RequestPrices() first. + virtual bool GetItemsWithPrices( ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices, + uint32 unArrayLength ) = 0; + + // Retrieves the price for the item definition id + // Returns false if there is no price stored for the item definition. + virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) = 0; + + // Create a request to update properties on items + virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0; + // Remove the property on the item + virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0; + // Accessor methods to set properties on items + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0; + // Submit the update request by handle + virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0; + +}; \ No newline at end of file diff --git a/src/public SDK/ISteamMasterServerUpdater001.h b/src/public SDK/ISteamMasterServerUpdater001.h new file mode 100644 index 0000000..9bdfa7c --- /dev/null +++ b/src/public SDK/ISteamMasterServerUpdater001.h @@ -0,0 +1,109 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMASTERSERVERUPDATER_H +#define ISTEAMMASTERSERVERUPDATER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MasterServerUpdaterCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Game engines use this to tell the Steam master servers +// about their games so their games can show up in the server browser. +//----------------------------------------------------------------------------- +abstract_class ISteamMasterServerUpdater001 +{ +public: + + // Call this as often as you like to tell the master server updater whether or not + // you want it to be active (default: off). + virtual void SetActive( bool bActive ) = 0; + + // You usually don't need to modify this. + // Pass -1 to use the default value for iHeartbeatInterval. + // Some mods change this. + virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0; + + + // These are in GameSocketShare mode, where instead of ISteamMasterServerUpdater creating its own + // socket to talk to the master server on, it lets the game use its socket to forward messages + // back and forth. This prevents us from requiring server ops to open up yet another port + // in their firewalls. + // + // the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001 + + // These are used when you've elected to multiplex the game server's UDP socket + // rather than having the master server updater use its own sockets. + // + // Source games use this to simplify the job of the server admins, so they + // don't have to open up more ports on their firewalls. + + // Call this when a packet that starts with 0xFFFFFFFF comes in. That means + // it's for us. + virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0; + + // AFTER calling HandleIncomingPacket for any packets that came in that frame, call this. + // This gets a packet that the master server updater needs to send out on UDP. + // It returns the length of the packet it wants to send, or 0 if there are no more packets to send. + // Call this each frame until it returns 0. + virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0; + + + // Functions to set various fields that are used to respond to queries. + + // Call this to set basic data that is passed to the server browser. + virtual void SetBasicServerData( + unsigned short nProtocolVersion, + bool bDedicatedServer, + const char *pRegionName, + const char *pProductName, + unsigned short nMaxReportedClients, + bool bPasswordProtected, + const char *pGameDescription ) = 0; + + // Call this to clear the whole list of key/values that are sent in rules queries. + virtual void ClearAllKeyValues() = 0; + + // Call this to add/update a key/value pair. + virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0; + + + // You can call this upon shutdown to clear out data stored for this game server and + // to tell the master servers that this server is going away. + virtual void NotifyShutdown() = 0; + + // Returns true if the master server has requested a restart. + // Only returns true once per request. + virtual bool WasRestartRequested() = 0; + + // Force it to request a heartbeat from the master servers. + virtual void ForceHeartbeat() = 0; + + // Manually edit and query the master server list. + // It will provide name resolution and use the default master server port if none is provided. + virtual bool AddMasterServer( const char *pServerAddress ) = 0; + virtual bool RemoveMasterServer( const char *pServerAddress ) = 0; + + virtual int GetNumMasterServers() = 0; + + // Returns the # of bytes written to pOut. + virtual int GetMasterServerAddress( int iServer, char *pOut, int outBufferSize ) = 0; +}; + +#endif // ISTEAMMASTERSERVERUPDATER_H diff --git a/src/public SDK/ISteamMatchmaking001.h b/src/public SDK/ISteamMatchmaking001.h new file mode 100644 index 0000000..be83c38 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking001.h @@ -0,0 +1,97 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING001_H +#define ISTEAMMATCHMAKING001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking001 +{ +public: + virtual int GetFavoriteGameCount() = 0; + + // Obsolete. Use the ...2 versions of these functions, which take separate connection and query ports. + virtual bool GetFavoriteGame( int iGame, uint32 *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + virtual int AddFavoriteGame( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + virtual bool RemoveFavoriteGame( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags ) = 0; + + + // returns the details of the game server + // iGame is of range [0,iGame) + virtual bool GetFavoriteGame2( int iGame, uint32 *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // returns the new index of the game + virtual int AddFavoriteGame2( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game; returns true if one was removed + virtual bool RemoveFavoriteGame2( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + virtual void RequestLobbyList( uint64 ulGameID, MatchMakingKeyValuePair_t *pFilters, uint32 nFilters ) = 0; + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyByIndex, int, iLobby) /*virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;*/ + // Create a lobby - you'll get the SteamID of it on success + virtual void CreateLobby( uint64 ulGameID, bool bPrivate ) = 0; + // Join a lobby + virtual void JoinLobby( CSteamID steamIDLobby ) = 0; + // Leave a lobby + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + // Invite someone to the lobby + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + // List users in this lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetLobbyMemberByIndex, CSteamID, steamIDLobby, int, iMember) /*virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;*/ + // Get data associated with this lobby + virtual const char *GetLobbyData( CSteamID SteamIDLobby, const char *pchKey ) = 0; + // Update lobby data (Admin only) + virtual void SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + // Get per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Update user data (for you only) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + // change the lobby Admin (Admin only) + virtual void ChangeLobbyAdmin( CSteamID steamIDLobby, CSteamID steamIDNewAdmin ) = 0; + // Send a chat message to the lobby + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message entry + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // this was added in an updated version apparently + // + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // restart are returned by a LobbyDataUpdate_t callback + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; +}; + + + +#endif // ISTEAMMATCHMAKING001_H diff --git a/src/public SDK/ISteamMatchmaking002.h b/src/public SDK/ISteamMatchmaking002.h new file mode 100644 index 0000000..74f7afc --- /dev/null +++ b/src/public SDK/ISteamMatchmaking002.h @@ -0,0 +1,144 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING002_H +#define ISTEAMMATCHMAKING002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking002 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback, with the number of servers requested + // if the user is not currently connected to Steam (i.e. SteamUser()->BLoggedOn() returns false) then + // a LobbyMatchList_t callback will be posted immediately with no servers + virtual void RequestLobbyList() = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If bPrivate is true, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback when the lobby has been created; + // local user will the join the lobby, resulting in an additional LobbyEnter_t callback being sent + // operations on the chat room can only proceed once the LobbyEnter_t has been received + virtual void CreateLobby( bool bPrivate ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback when the lobby has been joined + virtual void JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // As above, but gets per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Fetch metadata for a lobby you're not necessarily in right now + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will leave the lobby and join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; +}; + + + +#endif // ISTEAMMATCHMAKING002_H diff --git a/src/public SDK/ISteamMatchmaking003.h b/src/public SDK/ISteamMatchmaking003.h new file mode 100644 index 0000000..6aefea0 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking003.h @@ -0,0 +1,174 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING003_H +#define ISTEAMMATCHMAKING003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking003 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, RTime32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer ) =0; + + // removes the game; returns true if one was removed + virtual bool RemoveFavoriteGame( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType ) = 0; + // slots available filter + virtual OBSOLETE_FUNCTION void AddRequestLobbyListSlotsAvailableFilter() = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyByIndex, int, iLobby) /*virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;*/ + + // Create a lobby - you'll get the SteamID of it on success + virtual void CreateLobby( bool bPrivate ) = 0; + + // Join a lobby + virtual void JoinLobby( CSteamID steamIDLobby ) = 0; + // Leave a lobby + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetLobbyMemberByIndex, CSteamID, steamIDLobby, int, iMember) /*virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;*/ + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // As above, but gets per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // restart are returned by a LobbyDataUpdate_t callback + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + virtual OBSOLETE_FUNCTION void SetLobbyVoiceEnabled( CSteamID steamIDLobby, bool bEnabled ) = 0; + + virtual bool RequestFriendsLobbies() = 0; +}; + +#endif // ISTEAMMATCHMAKING003_H diff --git a/src/public SDK/ISteamMatchmaking004.h b/src/public SDK/ISteamMatchmaking004.h new file mode 100644 index 0000000..d1670bc --- /dev/null +++ b/src/public SDK/ISteamMatchmaking004.h @@ -0,0 +1,167 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING004_H +#define ISTEAMMATCHMAKING004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking004 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback, with the number of servers requested + // if the user is not currently connected to Steam (i.e. SteamUser()->BLoggedOn() returns false) then + // a LobbyMatchList_t callback will be posted immediately with no servers + virtual void RequestLobbyList() = 0; + + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0; + // numerical comparison - 0 is equal, -1 is the lobby value is less than nValueToMatch, 1 is the lobby value is greater than nValueToMatch + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType /* 0 is equal, -1 is less than, 1 is greater than */ ) = 0; + // sets RequestLobbyList() to only returns lobbies which aren't yet full - needs SetLobbyMemberLimit() called on the lobby to set an initial limit + virtual void AddRequestLobbyListSlotsAvailableFilter() = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If bPrivate is true, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback when the lobby has been created; + // local user will the join the lobby, resulting in an additional LobbyEnter_t callback being sent + // operations on the chat room can only proceed once the LobbyEnter_t has been received + virtual void CreateLobby( bool bPrivate ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback when the lobby has been joined + // users already in the lobby will receive LobbyChatUpdate_t callback after this user has successfully joined + virtual void JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // As above, but gets per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Fetch metadata for a lobby you're not necessarily in right now + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will leave the lobby and join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + // asks the Steam servers for a list of lobbies that friends are in + // returns results by posting one RequestFriendsLobbiesResponse_t callback per friend/lobby pair + // if no friends are in lobbies, RequestFriendsLobbiesResponse_t will be posted but with 0 results + // filters don't apply to lobbies (currently) + virtual bool RequestFriendsLobbies() = 0; +}; + +#endif // ISTEAMMATCHMAKING004_H diff --git a/src/public SDK/ISteamMatchmaking005.h b/src/public SDK/ISteamMatchmaking005.h new file mode 100644 index 0000000..388bdd0 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking005.h @@ -0,0 +1,196 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING005_H +#define ISTEAMMATCHMAKING005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking005 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, RTime32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, RTime32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType ) = 0; + // slots available filter + virtual OBSOLETE_FUNCTION void AddRequestLobbyListSlotsAvailableFilter() = 0; + // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyByIndex, int, iLobby) /*virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;*/ + + // Create a lobby on the Steam servers. + // If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this pointer + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful + // lobby metadata is available to use immediately on this call completing + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + STEAMWORKS_STRUCT_RETURN_2(CSteamID, GetLobbyMemberByIndex, CSteamID, steamIDLobby, int, iMember) /*virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;*/ + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // As above, but gets per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // restart are returned by a LobbyDataUpdate_t callback + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + virtual bool RequestFriendsLobbies() = 0; + + // updates which type of lobby it is + // only lobbies that are k_ELobbyTypePublic will be returned by RequestLobbyList() calls + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + + // returns the current lobby owner + // you must be a member of the lobby to access this + // there always one lobby owner - if the current owner leaves, another user will become the owner + // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner + STEAMWORKS_STRUCT_RETURN_1(CSteamID, GetLobbyOwner, CSteamID, steamIDLobby) /*virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0;*/ + + virtual OBSOLETE_FUNCTION double GetLobbyDistance( CSteamID steamIDLobby ) = 0; +}; + +#endif // ISTEAMMATCHMAKING005_H diff --git a/src/public SDK/ISteamMatchmaking006.h b/src/public SDK/ISteamMatchmaking006.h new file mode 100644 index 0000000..8264593 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking006.h @@ -0,0 +1,190 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING006_H +#define ISTEAMMATCHMAKING006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking006 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListFilter( const char *pchKeyToMatch, const char *pchValueToMatch ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, int nComparisonType ) = 0; + // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this pointer + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful + // lobby metadata is available to use immediately on this call completing + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // As above, but gets per-user data for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // restart are returned by a LobbyDataUpdate_t callback + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + // updates which type of lobby it is + // only lobbies that are k_ELobbyTypePublic will be returned by RequestLobbyList() calls + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + + // returns the current lobby owner + // you must be a member of the lobby to access this + // there always one lobby owner - if the current owner leaves, another user will become the owner + // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner + virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0; +}; + +#endif // ISTEAMMATCHMAKING006_H diff --git a/src/public SDK/ISteamMatchmaking007.h b/src/public SDK/ISteamMatchmaking007.h new file mode 100644 index 0000000..5c61593 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking007.h @@ -0,0 +1,212 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING007_H +#define ISTEAMMATCHMAKING007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking007 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) = 0; + // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0; + // returns only lobbies with the specified number of slots available + virtual void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this pointer + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful + // lobby metadata is available to use immediately on this call completing + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + // if the other user clicks the join link, a GameLobbyJoinRequested_t will be posted if the user is in-game, + // or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id> + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // returns the number of metadata keys set on the specified lobby + virtual int GetLobbyDataCount( CSteamID steamIDLobby ) = 0; + + // returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount()) + virtual bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize ) = 0; + + // removes a metadata key from the lobby + virtual bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + + // Gets per-user metadata for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // restart are returned by a LobbyDataUpdate_t callback + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + // updates which type of lobby it is + // only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + + // sets whether or not a lobby is joinable - defaults to true for a new lobby + // if set to false, no user can join, even if they are a friend or have been invited + virtual bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) = 0; + + // returns the current lobby owner + // you must be a member of the lobby to access this + // there always one lobby owner - if the current owner leaves, another user will become the owner + // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner + virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0; + + // changes who the lobby owner is + // you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby + // after completion, the local user will no longer be the owner + virtual bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) = 0; +}; + +#endif // ISTEAMMATCHMAKING007_H diff --git a/src/public SDK/ISteamMatchmaking008.h b/src/public SDK/ISteamMatchmaking008.h new file mode 100644 index 0000000..1c2989e --- /dev/null +++ b/src/public SDK/ISteamMatchmaking008.h @@ -0,0 +1,225 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING008_H +#define ISTEAMMATCHMAKING008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking008 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) = 0; + // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0; + // returns only lobbies with the specified number of slots available + virtual void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) = 0; + // sets the distance for which we should search for lobbies (based on users IP address to location map on the Steam backed) + virtual void AddRequestLobbyListDistanceFilter( ELobbyDistanceFilter eLobbyDistanceFilter ) = 0; + // sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client + virtual void AddRequestLobbyListResultCountFilter( int cMaxResults ) = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this pointer + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful + // lobby metadata is available to use immediately on this call completing + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + // if the other user clicks the join link, a GameLobbyJoinRequested_t will be posted if the user is in-game, + // or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id> + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // returns the number of metadata keys set on the specified lobby + virtual int GetLobbyDataCount( CSteamID steamIDLobby ) = 0; + + // returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount()) + virtual bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize ) = 0; + + // removes a metadata key from the lobby + virtual bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + + // Gets per-user metadata for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // results will be returned by a LobbyDataUpdate_t callback + // if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + // updates which type of lobby it is + // only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + + // sets whether or not a lobby is joinable - defaults to true for a new lobby + // if set to false, no user can join, even if they are a friend or have been invited + virtual bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) = 0; + + // returns the current lobby owner + // you must be a member of the lobby to access this + // there always one lobby owner - if the current owner leaves, another user will become the owner + // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner + virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0; + + // changes who the lobby owner is + // you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby + // after completion, the local user will no longer be the owner + virtual bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) = 0; + +#ifdef _PS3 + // changes who the lobby owner is + // you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby + // after completion, the local user will no longer be the owner + virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0; +#endif +}; + +#endif // ISTEAMMATCHMAKING008_H diff --git a/src/public SDK/ISteamMatchmaking009.h b/src/public SDK/ISteamMatchmaking009.h new file mode 100644 index 0000000..a4639a3 --- /dev/null +++ b/src/public SDK/ISteamMatchmaking009.h @@ -0,0 +1,231 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKING009_H +#define ISTEAMMATCHMAKING009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmaking009 +{ +public: + // game server favorites storage + // saves basic details about a multiplayer game server locally + + // returns the number of favorites servers the user has stored + virtual int GetFavoriteGameCount() = 0; + + // returns the details of the game server + // iGame is of range [0,GetFavoriteGameCount()) + // *pnIP, *pnConnPort are filled in the with IP:port of the game server + // *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections + // *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added + virtual bool GetFavoriteGame( int iGame, AppId_t *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0; + + // adds the game server to the local list; updates the time played of the server if it already exists in the list + virtual int AddFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) =0; + + // removes the game server from the local storage; returns true if one was removed + virtual bool RemoveFavoriteGame( AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0; + + /////// + // Game lobby functions + + // Get a list of relevant lobbies + // this is an asynchronous request + // results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found + // this will never return lobbies that are full + // to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call + // use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g. + /* + class CMyLobbyListManager + { + CCallResult m_CallResultLobbyMatchList; + void FindLobbies() + { + // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList() + SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList(); + m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList ); + } + + void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure ) + { + // lobby list has be retrieved from Steam back-end, use results + } + } + */ + // + virtual SteamAPICall_t RequestLobbyList() = 0; + // filters for lobbies + // this needs to be called before RequestLobbyList() to take effect + // these are cleared on each call to RequestLobbyList() + virtual void AddRequestLobbyListStringFilter( const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType ) = 0; + // numerical comparison + virtual void AddRequestLobbyListNumericalFilter( const char *pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType ) = 0; + // returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence + virtual void AddRequestLobbyListNearValueFilter( const char *pchKeyToMatch, int nValueToBeCloseTo ) = 0; + // returns only lobbies with the specified number of slots available + virtual void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) = 0; + // sets the distance for which we should search for lobbies (based on users IP address to location map on the Steam backed) + virtual void AddRequestLobbyListDistanceFilter( ELobbyDistanceFilter eLobbyDistanceFilter ) = 0; + // sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client + virtual void AddRequestLobbyListResultCountFilter( int cMaxResults ) = 0; + + virtual void AddRequestLobbyListCompatibleMembersFilter( CSteamID steamIDLobby ) = 0; + + // returns the CSteamID of a lobby, as retrieved by a RequestLobbyList call + // should only be called after a LobbyMatchList_t callback is received + // iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching) + // the returned CSteamID::IsValid() will be false if iLobby is out of range + virtual CSteamID GetLobbyByIndex( int iLobby ) = 0; + + // Create a lobby on the Steam servers. + // If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID + // of the lobby will need to be communicated via game channels or via InviteUserToLobby() + // this is an asynchronous request + // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this point + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0; + + // Joins an existing lobby + // this is an asynchronous request + // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful + // lobby metadata is available to use immediately on this call completing + virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; + + // Leave a lobby; this will take effect immediately on the client side + // other users in the lobby will be notified by a LobbyChatUpdate_t callback + virtual void LeaveLobby( CSteamID steamIDLobby ) = 0; + + // Invite another user to the lobby + // the target user will receive a LobbyInvite_t callback + // will return true if the invite is successfully sent, whether or not the target responds + // returns false if the local user is not connected to the Steam servers + // if the other user clicks the join link, a GameLobbyJoinRequested_t will be posted if the user is in-game, + // or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id> + virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0; + + // Lobby iteration, for viewing details of users in a lobby + // only accessible if the lobby user is a member of the specified lobby + // persona information for other lobby members (name, avatar, etc.) will be asynchronously received + // and accessible via ISteamFriends interface + + // returns the number of users in the specified lobby + virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0; + // returns the CSteamID of a user in the lobby + // iMember is of range [0,GetNumLobbyMembers()) + // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby + virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0; + + // Get data associated with this lobby + // takes a simple key, and returns the string associated with it + // "" will be returned if no value is set, or if steamIDLobby is invalid + virtual const char *GetLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + // Sets a key/value pair in the lobby metadata + // each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data + // this can be used to set lobby names, map, etc. + // to reset a key, just set it to "" + // other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback + virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // returns the number of metadata keys set on the specified lobby + virtual int GetLobbyDataCount( CSteamID steamIDLobby ) = 0; + + // returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount()) + virtual bool GetLobbyDataByIndex( CSteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize ) = 0; + + // removes a metadata key from the lobby + virtual bool DeleteLobbyData( CSteamID steamIDLobby, const char *pchKey ) = 0; + + // Gets per-user metadata for someone in this lobby + virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0; + // Sets per-user metadata (for the local user implicitly) + virtual void SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0; + + // Broadcasts a chat message to the all the users in the lobby + // users in the lobby (including the local user) will receive a LobbyChatMsg_t callback + // returns true if the message is successfully sent + // pvMsgBody can be binary or text data, up to 4k + // if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator + virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0; + // Get a chat message as specified in a LobbyChatMsg_t callback + // iChatID is the LobbyChatMsg_t::m_iChatID value in the callback + // *pSteamIDUser is filled in with the CSteamID of the member + // *pvData is filled in with the message itself + // return value is the number of bytes written into the buffer + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + + // Refreshes metadata for a lobby you're not necessarily in right now + // you never do this for lobbies you're a member of, only if your + // this will send down all the metadata associated with a lobby + // this is an asynchronous call + // returns false if the local user is not connected to the Steam servers + // results will be returned by a LobbyDataUpdate_t callback + // if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false + virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0; + + // sets the game server associated with the lobby + // usually at this point, the users will join the specified game server + // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect + virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; + // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, CSteamID *psteamIDGameServer ) = 0; + + // set the limit on the # of users who can join the lobby + virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; + // returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined + virtual int GetLobbyMemberLimit( CSteamID steamIDLobby ) = 0; + + // updates which type of lobby it is + // only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls + virtual bool SetLobbyType( CSteamID steamIDLobby, ELobbyType eLobbyType ) = 0; + + // sets whether or not a lobby is joinable - defaults to true for a new lobby + // if set to false, no user can join, even if they are a friend or have been invited + virtual bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) = 0; + + // returns the current lobby owner + // you must be a member of the lobby to access this + // there always one lobby owner - if the current owner leaves, another user will become the owner + // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner + virtual CSteamID GetLobbyOwner( CSteamID steamIDLobby ) = 0; + + // changes who the lobby owner is + // you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby + // after completion, the local user will no longer be the owner + virtual bool SetLobbyOwner( CSteamID steamIDLobby, CSteamID steamIDNewOwner ) = 0; + + // link two lobbies for the purposes of checking player compatibility + // you must be the lobby owner of both lobbies + virtual bool SetLinkedLobby( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) = 0; + +#ifdef _PS3 + // changes who the lobby owner is + // you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby + // after completion, the local user will no longer be the owner + virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0; +#endif +}; + +#endif // ISTEAMMATCHMAKING009_H diff --git a/src/public SDK/ISteamMatchmakingServers001.h b/src/public SDK/ISteamMatchmakingServers001.h new file mode 100644 index 0000000..e0cd1ea --- /dev/null +++ b/src/public SDK/ISteamMatchmakingServers001.h @@ -0,0 +1,97 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKINGSERVERS001_H +#define ISTEAMMATCHMAKINGSERVERS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingServersCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to game lists and details +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingServers001 +{ +public: + // Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values. + virtual void RequestInternetServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual void RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual void RequestFriendsServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual void RequestFavoritesServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual void RequestHistoryServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + virtual void RequestSpectatorServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse001 *pRequestServersResponse ) = 0; + + /* the filters that are available in the ppchFilters params are: + + "map" - map the server is running, as set in the dedicated server api + "dedicated" - reports bDedicated from the API + "secure" - VAC-enabled + "full" - not full + "empty" - not empty + "noplayers" - is empty + "proxy" - a relay server + + */ + + // Get details on a given server in the list, you can get the valid range of index + // values by calling GetServerCount(). You will also receive index values in + // ISteamMatchmakingServerListResponse::ServerResponded() callbacks + virtual gameserveritem_t *GetServerDetails( EMatchMakingType eType, int iServer ) = 0; + + // Cancel an request which is operation on the given list type. You should call this to cancel + // any in-progress requests before destructing a callback object that may have been passed + // to one of the above list request calls. Not doing so may result in a crash when a callback + // occurs on the destructed object. + virtual void CancelQuery( EMatchMakingType eType ) = 0; + + // Ping every server in your list again but don't update the list of servers + virtual void RefreshQuery( EMatchMakingType eType ) = 0; + + // Returns true if the list is currently refreshing its server list + virtual bool IsRefreshing( EMatchMakingType eType ) = 0; + + // How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1 + virtual int GetServerCount( EMatchMakingType eType ) = 0; + + // Refresh a single server inside of a query (rather than all the servers ) + virtual void RefreshServer( EMatchMakingType eType, int iServer ) = 0; + + + //----------------------------------------------------------------------------- + // Queries to individual servers directly via IP/Port + //----------------------------------------------------------------------------- + + // Request updated ping time and other details from a single server + virtual int32_t PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) = 0; + + // Request the list of players currently playing on a server + virtual int32_t PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0; + + // Request the list of rules that the server is running (See ISteamMasterServerUpdater->SetKeyValue() to set the rules server side) + virtual int32_t ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0; + + // Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel + // any in-progress requests before destructing a callback object that may have been passed + // to one of the above calls to avoid crashing when callbacks occur. + virtual void CancelServerQuery(int32_t hServerQuery ) = 0; +}; + + +#endif // ISTEAMMATCHMAKINGSERVERS001_H diff --git a/src/public SDK/ISteamMatchmakingServers002.h b/src/public SDK/ISteamMatchmakingServers002.h new file mode 100644 index 0000000..bd90669 --- /dev/null +++ b/src/public SDK/ISteamMatchmakingServers002.h @@ -0,0 +1,168 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMATCHMAKINGSERVERS002_H +#define ISTEAMMATCHMAKINGSERVERS002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MatchmakingServersCommon.h" + + + +//----------------------------------------------------------------------------- +// Purpose: Functions for match making services for clients to get to game lists and details +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingServers002 +{ +public: + // Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values. + // Each call allocates a new asynchronous request object. + // Request object must be released by calling ReleaseRequest( hServerListRequest ) + virtual HServerListRequest RequestInternetServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + + // Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress. + // RefreshComplete callback is not posted when request is released. + virtual void ReleaseRequest( HServerListRequest hServerListRequest ) = 0; + + /* the filter operation codes that go in the key part of MatchMakingKeyValuePair_t should be one of these: + + "map" + - Server passes the filter if the server is playing the specified map. + "gamedataand" + - Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains all of the + specified strings. The value field is a comma-delimited list of strings to match. + "gamedataor" + - Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains at least one of the + specified strings. The value field is a comma-delimited list of strings to match. + "gamedatanor" + - Server passes the filter if the server's game data (ISteamGameServer::SetGameData) does not contain any + of the specified strings. The value field is a comma-delimited list of strings to check. + "gametagsand" + - Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) contains all + of the specified strings. The value field is a comma-delimited list of strings to check. + "gametagsnor" + - Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) does not contain any + of the specified strings. The value field is a comma-delimited list of strings to check. + "and" (x1 && x2 && ... && xn) + "or" (x1 || x2 || ... || xn) + "nand" !(x1 && x2 && ... && xn) + "nor" !(x1 || x2 || ... || xn) + - Performs Boolean operation on the following filters. The operand to this filter specifies + the "size" of the Boolean inputs to the operation, in Key/value pairs. (The keyvalue + pairs must immediately follow, i.e. this is a prefix logical operator notation.) + In the simplest case where Boolean expressions are not nested, this is simply + the number of operands. + + For example, to match servers on a particular map or with a particular tag, would would + use these filters. + + ( server.map == "cp_dustbowl" || server.gametags.contains("payload") ) + "or", "2" + "map", "cp_dustbowl" + "gametagsand", "payload" + + If logical inputs are nested, then the operand specifies the size of the entire + "length" of its operands, not the number of immediate children. + + ( server.map == "cp_dustbowl" || ( server.gametags.contains("payload") && !server.gametags.contains("payloadrace") ) ) + "or", "4" + "map", "cp_dustbowl" + "and", "2" + "gametagsand", "payload" + "gametagsnor", "payloadrace" + + Unary NOT can be achieved using either "nand" or "nor" with a single operand. + + "addr" + - Server passes the filter if the server's query address matches the specified IP or IP:port. + "gameaddr" + - Server passes the filter if the server's game address matches the specified IP or IP:port. + + The following filter operations ignore the "value" part of MatchMakingKeyValuePair_t + + "dedicated" + - Server passes the filter if it passed true to SetDedicatedServer. + "secure" + - Server passes the filter if the server is VAC-enabled. + "notfull" + - Server passes the filter if the player count is less than the reported max player count. + "hasplayers" + - Server passes the filter if the player count is greater than zero. + "noplayers" + - Server passes the filter if it doesn't have any players. + "linux" + - Server passes the filter if it's a linux server + */ + + // Get details on a given server in the list, you can get the valid range of index + // values by calling GetServerCount(). You will also receive index values in + // ISteamMatchmakingServerListResponse::ServerResponded() callbacks + virtual gameserveritem_t *GetServerDetails( HServerListRequest hRequest, int iServer ) = 0; + + // Cancel an request which is operation on the given list type. You should call this to cancel + // any in-progress requests before destructing a callback object that may have been passed + // to one of the above list request calls. Not doing so may result in a crash when a callback + // occurs on the destructed object. + // Canceling a query does not release the allocated request handle. + // The request handle must be released using ReleaseRequest( hRequest ) + virtual void CancelQuery( HServerListRequest hRequest ) = 0; + + // Ping every server in your list again but don't update the list of servers + // Query callback installed when the server list was requested will be used + // again to post notifications and RefreshComplete, so the callback must remain + // valid until another RefreshComplete is called on it or the request + // is released with ReleaseRequest( hRequest ) + virtual void RefreshQuery( HServerListRequest hRequest ) = 0; + + // Returns true if the list is currently refreshing its server list + virtual bool IsRefreshing( HServerListRequest hRequest ) = 0; + + // How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1 + virtual int GetServerCount( HServerListRequest hRequest ) = 0; + + // Refresh a single server inside of a query (rather than all the servers ) + virtual void RefreshServer( HServerListRequest hRequest, int iServer ) = 0; + + + //----------------------------------------------------------------------------- + // Queries to individual servers directly via IP/Port + //----------------------------------------------------------------------------- + + // Request updated ping time and other details from a single server + virtual HServerQuery PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) = 0; + + // Request the list of players currently playing on a server + virtual HServerQuery PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0; + + // Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side) + virtual HServerQuery ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0; + + // Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel + // any in-progress requests before destructing a callback object that may have been passed + // to one of the above calls to avoid crashing when callbacks occur. + virtual void CancelServerQuery( HServerQuery hServerQuery ) = 0; +}; + + +#endif // ISTEAMMATCHMAKINGSERVERS002_H diff --git a/src/public SDK/ISteamMusic001.h b/src/public SDK/ISteamMusic001.h new file mode 100644 index 0000000..dbe2953 --- /dev/null +++ b/src/public SDK/ISteamMusic001.h @@ -0,0 +1,48 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMUSIC001_H +#define ISTEAMMUSIC001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MusicCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamMusic001 +{ +public: + virtual bool BIsEnabled() = 0; + virtual bool BIsPlaying() = 0; + + virtual AudioPlayback_Status GetPlaybackStatus() = 0; + + virtual void Play() = 0; + virtual void Pause() = 0; + virtual void PlayPrevious() = 0; + virtual void PlayNext() = 0; + + // volume is between 0.0 and 1.0 + virtual void SetVolume( float flVolume ) = 0; + virtual float GetVolume() = 0; +}; + +#endif // ISTEAMMUSIC001_H + diff --git a/src/public SDK/ISteamMusicRemote001.h b/src/public SDK/ISteamMusicRemote001.h new file mode 100644 index 0000000..0ab9f6e --- /dev/null +++ b/src/public SDK/ISteamMusicRemote001.h @@ -0,0 +1,80 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMMUSICREMOTE001_H +#define ISTEAMMUSICREMOTE001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "MusicCommon.h" +#include "MusicRemoteCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamMusicRemote001 +{ +public: + // Service Definition + virtual bool RegisterSteamMusicRemote( const char *pchName ) = 0; + virtual bool DeregisterSteamMusicRemote() = 0; + virtual bool BIsCurrentMusicRemote() = 0; + virtual bool BActivationSuccess( bool bValue ) = 0; + + virtual bool SetDisplayName( const char *pchDisplayName ) = 0; + virtual bool SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength ) = 0; + + // Abilities for the user interface + virtual bool EnablePlayPrevious(bool bValue) = 0; + virtual bool EnablePlayNext( bool bValue ) = 0; + virtual bool EnableShuffled( bool bValue ) = 0; + virtual bool EnableLooped( bool bValue ) = 0; + virtual bool EnableQueue( bool bValue ) = 0; + virtual bool EnablePlaylists( bool bValue ) = 0; + + // Status + virtual bool UpdatePlaybackStatus( AudioPlayback_Status nStatus ) = 0; + virtual bool UpdateShuffled( bool bValue ) = 0; + virtual bool UpdateLooped( bool bValue ) = 0; + virtual bool UpdateVolume( float flValue ) = 0; // volume is between 0.0 and 1.0 + + // Current Entry + virtual bool CurrentEntryWillChange() = 0; + virtual bool CurrentEntryIsAvailable( bool bAvailable ) = 0; + virtual bool UpdateCurrentEntryText( const char *pchText ) = 0; + virtual bool UpdateCurrentEntryElapsedSeconds( int nValue ) = 0; + virtual bool UpdateCurrentEntryCoverArt( void *pvBuffer, uint32 cbBufferLength ) = 0; + virtual bool CurrentEntryDidChange() = 0; + + // Queue + virtual bool QueueWillChange() = 0; + virtual bool ResetQueueEntries() = 0; + virtual bool SetQueueEntry( int nID, int nPosition, const char *pchEntryText ) = 0; + virtual bool SetCurrentQueueEntry( int nID ) = 0; + virtual bool QueueDidChange() = 0; + + // Playlist + virtual bool PlaylistWillChange() = 0; + virtual bool ResetPlaylistEntries() = 0; + virtual bool SetPlaylistEntry( int nID, int nPosition, const char *pchEntryText ) = 0; + virtual bool SetCurrentPlaylistEntry( int nID ) = 0; + virtual bool PlaylistDidChange() = 0; +}; + +#endif // ISTEAMMUSICREMOTE001_H + diff --git a/src/public SDK/ISteamNetworking001.h b/src/public SDK/ISteamNetworking001.h new file mode 100644 index 0000000..ea41cdf --- /dev/null +++ b/src/public SDK/ISteamNetworking001.h @@ -0,0 +1,96 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMNETWORKING001_H +#define ISTEAMNETWORKING001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + +abstract_class ISteamNetworking001 +{ +public: + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketConnectCallback_t callback + // on failure or timeout will trigger a SocketConnectionFailureCallback_t callback + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data size cannot be more than 8k, although in UDP mode (default), + // it's recommended packets be no larger than 1300 bytes + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + +}; + + +#endif // ISTEAMNETWORKING001_H diff --git a/src/public SDK/ISteamNetworking002.h b/src/public SDK/ISteamNetworking002.h new file mode 100644 index 0000000..cdcc28a --- /dev/null +++ b/src/public SDK/ISteamNetworking002.h @@ -0,0 +1,106 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMNETWORKING +#define ISTEAMNETWORKING +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for making connections and sending data between clients, +// traversing NAT's where possible +//----------------------------------------------------------------------------- +abstract_class ISteamNetworking002 +{ +public: + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketStatusCallback_t callback + // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + + // returns true to describe how the socket ended up connecting + virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; + + // max packet size, in bytes + virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0; +}; + + + +#endif // ISTEAMNETWORKING diff --git a/src/public SDK/ISteamNetworking003.h b/src/public SDK/ISteamNetworking003.h new file mode 100644 index 0000000..0ae4117 --- /dev/null +++ b/src/public SDK/ISteamNetworking003.h @@ -0,0 +1,152 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef ISTEAMNETWORKING003_H +#define ISTEAMNETWORKING003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for making connections and sending data between clients, +// traversing NAT's where possible +//----------------------------------------------------------------------------- +abstract_class ISteamNetworking003 +{ +public: + //////////////////////////////////////////////////////////////////////////////////////////// + // Session-less connection functions + // automatically establishes NAT-traversing or Relay server connections + + // Sends a P2P packet to the specified user + // UDP-like, unreliable and a max packet size of 1200 bytes + // the first packet send may be delayed as the NAT-traversal code runs + // if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t + // see EP2PSend enum above for the descriptions of the different ways of sending packets + virtual bool SendP2PPacket( CSteamID steamIDRemote, const void *pubData, uint32 cubData, EP2PSend eP2PSendType ) = 0; + + // returns true if any data is available for read, and the amount of data that will need to be read + virtual bool IsP2PPacketAvailable( uint32 *pcubMsgSize ) = 0; + + // reads in a packet that has been sent from another user via SendP2PPacket() + // returns the size of the message and the steamID of the user who sent it in the last two parameters + // if the buffer passed in is too small, the message will be truncated + // this call is not blocking, and will return false if no data is available + virtual bool ReadP2PPacket( void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, CSteamID *psteamIDRemote ) = 0; + + // AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback + // P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet + // if you don't want to talk to the user, just ignore the request + // if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically + // this may be called multiple times for a single user + // (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request) + virtual bool AcceptP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood + // if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted + virtual bool CloseP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // fills out P2PSessionState_t structure with details about the underlying connection to the user + // should only needed for debugging purposes + // returns false if no connection exists to the specified user + virtual bool GetP2PSessionState( CSteamID steamIDRemote, P2PSessionState_t *pConnectionState ) = 0; + + + //////////////////////////////////////////////////////////////////////////////////////////// + // LISTEN / CONNECT style interface functions + // + // This is an older set of functions designed around the Berkeley TCP sockets model + // it's preferential that you use the above P2P functions, they're more robust + // and these older functions will be removed eventually + // + //////////////////////////////////////////////////////////////////////////////////////////// + + + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketStatusCallback_t callback + // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + + // returns true to describe how the socket ended up connecting + virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; + + // max packet size, in bytes + virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0; +}; + +#endif // ISTEAMNETWORKING003_H diff --git a/src/public SDK/ISteamNetworking004.h b/src/public SDK/ISteamNetworking004.h new file mode 100644 index 0000000..958d331 --- /dev/null +++ b/src/public SDK/ISteamNetworking004.h @@ -0,0 +1,155 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef ISTEAMNETWORKING004_H +#define ISTEAMNETWORKING004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for making connections and sending data between clients, +// traversing NAT's where possible +//----------------------------------------------------------------------------- +abstract_class ISteamNetworking004 +{ +public: + //////////////////////////////////////////////////////////////////////////////////////////// + // Session-less connection functions + // automatically establishes NAT-traversing or Relay server connections + + // Sends a P2P packet to the specified user + // UDP-like, unreliable and a max packet size of 1200 bytes + // the first packet send may be delayed as the NAT-traversal code runs + // if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t + // see EP2PSend enum above for the descriptions of the different ways of sending packets + // nVirtualPort is a routing number you can use to help route message to different systems - you'll have to call ReadP2PPacket() + // with the same nVirtualPort number in order to retrieve the data on the other end + // using different virtual ports to talk to the same user will still use the same underlying p2p connection, saving on resources + virtual bool SendP2PPacket( CSteamID steamIDRemote, const void *pubData, uint32 cubData, EP2PSend eP2PSendType, int nVirtualPort = 0 ) = 0; + + // returns true if any data is available for read, and the amount of data that will need to be read + virtual bool IsP2PPacketAvailable( uint32 *pcubMsgSize, int nVirtualPort = 0 ) = 0; + + // reads in a packet that has been sent from another user via SendP2PPacket() + // returns the size of the message and the steamID of the user who sent it in the last two parameters + // if the buffer passed in is too small, the message will be truncated + // this call is not blocking, and will return false if no data is available + virtual bool ReadP2PPacket( void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, CSteamID *psteamIDRemote, int nVirtualPort = 0 ) = 0; + + // AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback + // P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet + // if you don't want to talk to the user, just ignore the request + // if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically + // this may be called multiple times for a single user + // (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request) + virtual bool AcceptP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood + // if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted + virtual bool CloseP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // fills out P2PSessionState_t structure with details about the underlying connection to the user + // should only needed for debugging purposes + // returns false if no connection exists to the specified user + virtual bool GetP2PSessionState( CSteamID steamIDRemote, P2PSessionState_t *pConnectionState ) = 0; + + + //////////////////////////////////////////////////////////////////////////////////////////// + // LISTEN / CONNECT style interface functions + // + // This is an older set of functions designed around the Berkeley TCP sockets model + // it's preferential that you use the above P2P functions, they're more robust + // and these older functions will be removed eventually + // + //////////////////////////////////////////////////////////////////////////////////////////// + + + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketStatusCallback_t callback + // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + + // returns true to describe how the socket ended up connecting + virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; + + // max packet size, in bytes + virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0; +}; + +#endif // ISTEAMNETWORKING004_H diff --git a/src/public SDK/ISteamNetworking005.h b/src/public SDK/ISteamNetworking005.h new file mode 100644 index 0000000..f04e6e4 --- /dev/null +++ b/src/public SDK/ISteamNetworking005.h @@ -0,0 +1,168 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef ISTEAMNETWORKING005_H +#define ISTEAMNETWORKING005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "NetworkingCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for making connections and sending data between clients, +// traversing NAT's where possible +//----------------------------------------------------------------------------- +abstract_class ISteamNetworking005 +{ +public: + //////////////////////////////////////////////////////////////////////////////////////////// + // Session-less connection functions + // automatically establishes NAT-traversing or Relay server connections + + // Sends a P2P packet to the specified user + // UDP-like, unreliable and a max packet size of 1200 bytes + // the first packet send may be delayed as the NAT-traversal code runs + // if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t + // see EP2PSend enum above for the descriptions of the different ways of sending packets + // + // nChannel is a routing number you can use to help route message to different systems - you'll have to call ReadP2PPacket() + // with the same channel number in order to retrieve the data on the other end + // using different channels to talk to the same user will still use the same underlying p2p connection, saving on resources + virtual bool SendP2PPacket( CSteamID steamIDRemote, const void *pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel = 0 ) = 0; + + // returns true if any data is available for read, and the amount of data that will need to be read + virtual bool IsP2PPacketAvailable( uint32 *pcubMsgSize, int nChannel = 0 ) = 0; + + // reads in a packet that has been sent from another user via SendP2PPacket() + // returns the size of the message and the steamID of the user who sent it in the last two parameters + // if the buffer passed in is too small, the message will be truncated + // this call is not blocking, and will return false if no data is available + virtual bool ReadP2PPacket( void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, CSteamID *psteamIDRemote, int nChannel = 0 ) = 0; + + // AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback + // P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet + // if you don't want to talk to the user, just ignore the request + // if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically + // this may be called multiple times for a single user + // (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request) + virtual bool AcceptP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood + // if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted + virtual bool CloseP2PSessionWithUser( CSteamID steamIDRemote ) = 0; + + // call CloseP2PChannelWithUser() when you're done talking to a user on a specific channel. Once all channels + // open channels to a user have been closed, the open session to the user will be closed and new data from this + // user will trigger a P2PSessionRequest_t callback + virtual bool CloseP2PChannelWithUser( CSteamID steamIDRemote, int nChannel ) = 0; + + // fills out P2PSessionState_t structure with details about the underlying connection to the user + // should only needed for debugging purposes + // returns false if no connection exists to the specified user + virtual bool GetP2PSessionState( CSteamID steamIDRemote, P2PSessionState_t *pConnectionState ) = 0; + + // Allow P2P connections to fall back to being relayed through the Steam servers if a direct connection + // or NAT-traversal cannot be established. Only applies to connections created after setting this value, + // or to existing connections that need to automatically reconnect after this value is set. + // + // P2P packet relay is allowed by default + virtual bool AllowP2PPacketRelay( bool bAllow ) = 0; + + + //////////////////////////////////////////////////////////////////////////////////////////// + // LISTEN / CONNECT style interface functions + // + // This is an older set of functions designed around the Berkeley TCP sockets model + // it's preferential that you use the above P2P functions, they're more robust + // and these older functions will be removed eventually + // + //////////////////////////////////////////////////////////////////////////////////////////// + + + // creates a socket and listens others to connect + // will trigger a SocketStatusCallback_t callback on another client connecting + // nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports + // this can usually just be 0 unless you want multiple sets of connections + // unIP is the local IP address to bind to + // pass in 0 if you just want the default local IP + // unPort is the port to use + // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only + virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; + + // creates a socket and begin connection to a remote destination + // can connect via a known steamID (client or game server), or directly to an IP + // on success will trigger a SocketStatusCallback_t callback + // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState + virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; + virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; + + // disconnects the connection to the socket, if any, and invalidates the handle + // any unread data on the socket will be thrown away + // if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect + virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + // destroying a listen socket will automatically kill all the regular sockets generated from it + virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0; + + // sending data + // must be a handle to a connected socket + // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets + // use the reliable flag with caution; although the resend rate is pretty aggressive, + // it can still cause stalls in receiving data (like TCP) + virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0; + + // receiving data + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0; + + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0; + + // checks for data from any socket that has been connected off this listen socket + // returns false if there is no data remaining + // fills out *pcubMsgSize with the size of the next message, in bytes + // fills out *phSocket with the socket that data is available on + virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // retrieves data from any socket that has been connected off this listen socket + // fills in pubDest with the contents of the message + // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) + // if *pcubMsgSize < cubDest, only partial data is written + // returns false if no data is available + // fills out *phSocket with the socket that data is available on + virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; + + // returns information about the specified socket, filling out the contents of the pointers + virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; + + // returns which local port the listen socket is bound to + // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only + virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; + + // returns true to describe how the socket ended up connecting + virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; + + // max packet size, in bytes + virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0; +}; + +#endif // ISTEAMNETWORKING005_H diff --git a/src/public SDK/ISteamOAuth001.h b/src/public SDK/ISteamOAuth001.h new file mode 100644 index 0000000..445d450 --- /dev/null +++ b/src/public SDK/ISteamOAuth001.h @@ -0,0 +1,37 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMOAUTH001_H +#define ISTEAMOAUTH001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "OAuthCommon.h" + + +abstract_class OBSOLETE_INTERFACE ISteamOAuth001 +{ +public: + virtual SteamAPICall_t RequestOAuthTokenForApp( const char *cszOAuthScope ) = 0; + virtual bool GetOAuthTokenForApp( void *pubBuffer, int32 cubBuffer, uint32 *puTokenSize ) = 0; + virtual void InvalidateOAuthTokenForApp() = 0; +}; + + +#endif // ISTEAMOAUTH001_H + diff --git a/src/public SDK/ISteamParties002.h b/src/public SDK/ISteamParties002.h new file mode 100644 index 0000000..5d3394d --- /dev/null +++ b/src/public SDK/ISteamParties002.h @@ -0,0 +1,97 @@ +#include "SteamTypes.h" + +typedef uint64 PartyBeaconID_t; +enum { k_iSteamPartiesCallbacks = 5300 }; +struct JoinPartyCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 1 }; + + EResult m_eResult; + PartyBeaconID_t m_ulBeaconID; + CSteamID m_SteamIDBeaconOwner; + char m_rgchConnectString[256]; +}; +enum ESteamPartyBeaconLocationType +{ + k_ESteamPartyBeaconLocationType_Invalid = 0, + k_ESteamPartyBeaconLocationType_ChatGroup = 1, + + k_ESteamPartyBeaconLocationType_Max, +}; +struct SteamPartyBeaconLocation_t +{ + ESteamPartyBeaconLocationType m_eType; + uint64 m_ulLocationID; +}; +struct CreateBeaconCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 2 }; + + EResult m_eResult; + PartyBeaconID_t m_ulBeaconID; +}; +struct ChangeNumOpenSlotsCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 4 }; + + EResult m_eResult; +}; +enum ESteamPartyBeaconLocationData +{ + k_ESteamPartyBeaconLocationDataInvalid = 0, + k_ESteamPartyBeaconLocationDataName = 1, + k_ESteamPartyBeaconLocationDataIconURLSmall = 2, + k_ESteamPartyBeaconLocationDataIconURLMedium = 3, + k_ESteamPartyBeaconLocationDataIconURLLarge = 4, +}; +class ISteamParties002 +{ +public: + + // ============================================================================================= + // Party Client APIs + + // Enumerate any active beacons for parties you may wish to join + virtual uint32 GetNumActiveBeacons() = 0; + virtual PartyBeaconID_t GetBeaconByIndex(uint32 unIndex) = 0; + virtual bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, CSteamID* pSteamIDBeaconOwner, SteamPartyBeaconLocation_t* pLocation, char* pchMetadata, int cchMetadata) = 0; + + // Join an open party. Steam will reserve one beacon slot for your SteamID, + // and return the necessary JoinGame string for you to use to connect + virtual SteamAPICall_t JoinParty(PartyBeaconID_t ulBeaconID) = 0; + + // ============================================================================================= + // Party Host APIs + + // Get a list of possible beacon locations + virtual bool GetNumAvailableBeaconLocations(uint32* puNumLocations) = 0; + virtual bool GetAvailableBeaconLocations(SteamPartyBeaconLocation_t* pLocationList, uint32 uMaxNumLocations) = 0; + + // Create a new party beacon and activate it in the selected location. + // unOpenSlots is the maximum number of users that Steam will send to you. + // When people begin responding to your beacon, Steam will send you + // PartyReservationCallback_t callbacks to let you know who is on the way. + virtual SteamAPICall_t CreateBeacon(uint32 unOpenSlots, SteamPartyBeaconLocation_t* pBeaconLocation, const char* pchConnectString, const char* pchMetadata) = 0; + + // Call this function when a user that had a reservation (see callback below) + // has successfully joined your party. + // Steam will manage the remaining open slots automatically. + virtual void OnReservationCompleted(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) = 0; + + // To cancel a reservation (due to timeout or user input), call this. + // Steam will open a new reservation slot. + // Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party. + virtual void CancelReservation(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) = 0; + + // Change the number of open beacon reservation slots. + // Call this if, for example, someone without a reservation joins your party (eg a friend, or via your own matchmaking system). + virtual SteamAPICall_t ChangeNumOpenSlots(PartyBeaconID_t ulBeacon, uint32 unOpenSlots) = 0; + + // Turn off the beacon. + virtual bool DestroyBeacon(PartyBeaconID_t ulBeacon) = 0; + + // Utils + virtual bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char* pchDataStringOut, int cchDataStringOut) = 0; + +}; +#define STEAMPARTIES_INTERFACE_VERSION002 "SteamParties002" \ No newline at end of file diff --git a/src/public SDK/ISteamRemotePlay001.h b/src/public SDK/ISteamRemotePlay001.h new file mode 100644 index 0000000..f804404 --- /dev/null +++ b/src/public SDK/ISteamRemotePlay001.h @@ -0,0 +1,40 @@ +#include "SteamTypes.h" + +enum ESteamDeviceFormFactor +{ + k_ESteamDeviceFormFactorUnknown, + k_ESteamDeviceFormFactorPhone, + k_ESteamDeviceFormFactorTablet, + k_ESteamDeviceFormFactorComputer, + k_ESteamDeviceFormFactorTV, +}; + + +//----------------------------------------------------------------------------- +// Purpose: Functions to provide information about Steam Remote Play sessions +//----------------------------------------------------------------------------- +class ISteamRemotePlay001 +{ +public: + // Get the number of currently connected Steam Remote Play sessions + virtual uint32 GetSessionCount() = 0; + + // Get the currently connected Steam Remote Play session ID at the specified index. Returns zero if index is out of bounds. + virtual uint32 GetSessionID(int iSessionIndex) = 0; + + // Get the SteamID of the connected user + virtual CSteamID GetSessionSteamID(uint32 unSessionID) = 0; + + // Get the name of the session client device + // This returns NULL if the sessionID is not valid + virtual const char* GetSessionClientName(uint32 unSessionID) = 0; + + // Get the form factor of the session client device + virtual ESteamDeviceFormFactor GetSessionClientFormFactor(uint32 unSessionID) = 0; + + // Get the resolution, in pixels, of the session client device + // This is set to 0x0 if the resolution is not available + virtual bool BGetSessionClientResolution(uint32 unSessionID, int* pnResolutionX, int* pnResolutionY) = 0; +}; + +#define STEAMREMOTEPLAY_INTERFACE_VERSION001 "STEAMREMOTEPLAY_INTERFACE_VERSION001" \ No newline at end of file diff --git a/src/public SDK/ISteamRemoteStorage001.h b/src/public SDK/ISteamRemoteStorage001.h new file mode 100644 index 0000000..1afbd2d --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage001.h @@ -0,0 +1,45 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE001_H +#define ISTEAMREMOTESTORAGE001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +abstract_class ISteamRemoteStorage001 +{ +public: + virtual bool FileWrite( const char *filename, void const *data, int ) = 0; + + virtual uint32 GetFileSize( const char *filename ) = 0; + + virtual bool FileRead( const char *filename, void *buffer, int size ) = 0; + + virtual bool FileExists( const char *filename ) = 0; + virtual OBSOLETE_FUNCTION bool FileDelete( const char *filename ) = 0; + + virtual uint32 GetFileCount() = 0; + + virtual const char *GetFileNameAndSize( int index, int *size ) = 0; + + virtual bool GetQuota( int *current, int *maximum ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE001_H diff --git a/src/public SDK/ISteamRemoteStorage002.h b/src/public SDK/ISteamRemoteStorage002.h new file mode 100644 index 0000000..ddd6f58 --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage002.h @@ -0,0 +1,54 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE002_H +#define ISTEAMREMOTESTORAGE002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage002 +{ + public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileExists( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // quota management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE_H diff --git a/src/public SDK/ISteamRemoteStorage003.h b/src/public SDK/ISteamRemoteStorage003.h new file mode 100644 index 0000000..58f50ec --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage003.h @@ -0,0 +1,67 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE003_H +#define ISTEAMREMOTESTORAGE003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage003 +{ +public: + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledThisApp() = 0; + virtual bool SetCloudEnabledThisApp( bool bEnable ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; // Returns a Deprecated_RemoteStorageDownloadUGCResult_t callback + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE003_H diff --git a/src/public SDK/ISteamRemoteStorage004.h b/src/public SDK/ISteamRemoteStorage004.h new file mode 100644 index 0000000..6c4dd49 --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage004.h @@ -0,0 +1,94 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE004_H +#define ISTEAMREMOTESTORAGE004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage004 +{ +public: +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif +}; + +#endif // ISTEAMREMOTESTORAGE004_H diff --git a/src/public SDK/ISteamRemoteStorage005.h b/src/public SDK/ISteamRemoteStorage005.h new file mode 100644 index 0000000..6fc466c --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage005.h @@ -0,0 +1,105 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE005_H +#define ISTEAMREMOTESTORAGE005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage005 +{ +public: +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + virtual SteamAPICall_t PublishFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t UpdatePublishedFile( RemoteStorageUpdatePublishedFileRequest_t updatePublishedFileRequest ) = 0; + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE005_H diff --git a/src/public SDK/ISteamRemoteStorage006.h b/src/public SDK/ISteamRemoteStorage006.h new file mode 100644 index 0000000..48dac4e --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage006.h @@ -0,0 +1,131 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE006_H +#define ISTEAMREMOTESTORAGE006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage006 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + + // Downloads a UGC file + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; + + // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false + // or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; + + // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + + // After download, gets the content of the file + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead() + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + // enumerate the files that the current user published with this app + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( const char *pchVideoURL, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; + // this method enumerates the public view of workshop files + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE006_H diff --git a/src/public SDK/ISteamRemoteStorage007.h b/src/public SDK/ISteamRemoteStorage007.h new file mode 100644 index 0000000..81f97dc --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage007.h @@ -0,0 +1,104 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE007_H +#define ISTEAMREMOTESTORAGE007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage007 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; // Returns a RemoteStorageDownloadUGCResult_t callback + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, uint32 *puDownloadedBytes, uint32 *puTotalBytes ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual JobID_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( JobID_t hUpdateRequest, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( JobID_t hUpdateRequest, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( JobID_t hUpdateRequest, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( JobID_t hUpdateRequest, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( JobID_t hUpdateRequest, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( JobID_t hUpdateRequest ) = 0; + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + + virtual bool UpdatePublishedFileSetChangeDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t * pRequiredTags, SteamParamStringArray_t * pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *cszVideoAccountName, const char *cszVideoIdentifier, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 uStartIndex ) = 0; + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE007_H diff --git a/src/public SDK/ISteamRemoteStorage008.h b/src/public SDK/ISteamRemoteStorage008.h new file mode 100644 index 0000000..08b7aa8 --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage008.h @@ -0,0 +1,138 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE008_H +#define ISTEAMREMOTESTORAGE008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage008 +{ +public: +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file operations that cause network IO + virtual UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData ) = 0; + virtual bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) = 0; + virtual bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + + // Downloads a UGC file + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; + + // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false + // or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; + + // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + + // After download, gets the content of the file + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead ) = 0; + + // Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead() + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + // enumerate the files that the current user published with this app + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; + // this method enumerates the public view of workshop files + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE008_H diff --git a/src/public SDK/ISteamRemoteStorage009.h b/src/public SDK/ISteamRemoteStorage009.h new file mode 100644 index 0000000..9defbdd --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage009.h @@ -0,0 +1,109 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE009_H +#define ISTEAMREMOTESTORAGE009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage009 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + virtual GID_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual EResult FileWriteStreamWriteChunk( GID_t hStream, const void *pvData, int32 cubData ) = 0; + virtual EResult FileWriteStreamClose( GID_t hStream ) = 0; + virtual EResult FileWriteStreamCancel( GID_t hStream ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent ) = 0; // Returns a RemoteStorageDownloadUGCResult_t callback + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, uint32 *puDownloadedBytes, uint32 *puTotalBytes ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 uOffset ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual JobID_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( JobID_t hUpdateRequest, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( JobID_t hUpdateRequest, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( JobID_t hUpdateRequest, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( JobID_t hUpdateRequest, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( JobID_t hUpdateRequest, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( JobID_t hUpdateRequest ) = 0; + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + + virtual bool UpdatePublishedFileSetChangeDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t * pRequiredTags, SteamParamStringArray_t * pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *cszVideoAccountName, const char *cszVideoIdentifier, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 uStartIndex ) = 0; + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE009_H diff --git a/src/public SDK/ISteamRemoteStorage010.h b/src/public SDK/ISteamRemoteStorage010.h new file mode 100644 index 0000000..4556da3 --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage010.h @@ -0,0 +1,141 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE010_H +#define ISTEAMREMOTESTORAGE010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage010 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file operations that cause network IO + virtual UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData ) = 0; + virtual bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) = 0; + virtual bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + + // Downloads a UGC file. A priority value of 0 will download the file immediately, + // otherwise it will wait to download the file until all downloads with a lower priority + // value are completed. Downloads with equal priority will occur simultaneously. + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority ) = 0; + + // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false + // or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; + + // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + + // After download, gets the content of the file + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset ) = 0; + + // Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead() + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + // enumerate the files that the current user published with this app + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; + // this method enumerates the public view of workshop files + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE010_H diff --git a/src/public SDK/ISteamRemoteStorage011.h b/src/public SDK/ISteamRemoteStorage011.h new file mode 100644 index 0000000..85276ea --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage011.h @@ -0,0 +1,149 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE011_H +#define ISTEAMREMOTESTORAGE011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage011 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file operations that cause network IO + virtual UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData ) = 0; + virtual bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) = 0; + virtual bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + + // Downloads a UGC file. A priority value of 0 will download the file immediately, + // otherwise it will wait to download the file until all downloads with a lower priority + // value are completed. Downloads with equal priority will occur simultaneously. + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority ) = 0; + + // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false + // or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; + + // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + + // After download, gets the content of the file. + // Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file. + // Larger files can be read in chunks to reduce memory usage (since both sides of the IPC client and the game itself must allocate + // enough memory for each chunk). Once the last byte is read, the file is implicitly closed and further calls to UGCRead will fail + // unless UGCDownload is called again. + // For especially large files (anything over 100MB) it is a requirement that the file is read in chunks. + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset ) = 0; + + // Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead() + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; + // Gets published file details for the given publishedfileid. If unMaxSecondsOld is greater than 0, + // cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh. + // A value of k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is. + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + // enumerate the files that the current user published with this app + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; + // this method enumerates the public view of workshop files + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE011_H diff --git a/src/public SDK/ISteamRemoteStorage012.h b/src/public SDK/ISteamRemoteStorage012.h new file mode 100644 index 0000000..2006a5a --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage012.h @@ -0,0 +1,111 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE012_H +#define ISTEAMREMOTESTORAGE012_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage012 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + virtual GID_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual EResult FileWriteStreamWriteChunk( GID_t hStream, const void *pvData, int32 cubData ) = 0; + virtual EResult FileWriteStreamClose( GID_t hStream ) = 0; + virtual EResult FileWriteStreamCancel( GID_t hStream ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 uUnk ) = 0; // Returns a RemoteStorageDownloadUGCResult_t callback + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, uint32 *puDownloadedBytes, uint32 *puTotalBytes ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 uOffset, EUGCReadAction eAction ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual JobID_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( JobID_t hUpdateRequest, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( JobID_t hUpdateRequest, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( JobID_t hUpdateRequest, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( JobID_t hUpdateRequest, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( JobID_t hUpdateRequest, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( JobID_t hUpdateRequest ) = 0; + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + + virtual bool UpdatePublishedFileSetChangeDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t * pRequiredTags, SteamParamStringArray_t * pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *cszVideoAccountName, const char *cszVideoIdentifier, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 uStartIndex ) = 0; + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *cszLocation, uint32 uUnk ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE012_H diff --git a/src/public SDK/ISteamRemoteStorage013.h b/src/public SDK/ISteamRemoteStorage013.h new file mode 100644 index 0000000..bd0a00a --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage013.h @@ -0,0 +1,117 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMREMOTESTORAGE013_H +#define ISTEAMREMOTESTORAGE013_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +abstract_class ISteamRemoteStorage013 +{ +public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + + virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0; + + virtual SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead ) = 0; + virtual bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead ) = 0; + + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + virtual GID_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual EResult FileWriteStreamWriteChunk( GID_t hStream, const void *pvData, int32 cubData ) = 0; + virtual EResult FileWriteStreamClose( GID_t hStream ) = 0; + virtual EResult FileWriteStreamCancel( GID_t hStream ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 uUnk ) = 0; // Returns a RemoteStorageDownloadUGCResult_t callback + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, uint32 *puDownloadedBytes, uint32 *puTotalBytes ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 uOffset, EUGCReadAction eAction ) = 0; + + // user generated content iteration + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // publishing UGC + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual JobID_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( JobID_t hUpdateRequest, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( JobID_t hUpdateRequest, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( JobID_t hUpdateRequest, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( JobID_t hUpdateRequest, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( JobID_t hUpdateRequest, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( JobID_t hUpdateRequest, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t CommitPublishedFileUpdate( JobID_t hUpdateRequest ) = 0; + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 ) = 0; + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 uStartIndex ) = 0; + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + + virtual bool UpdatePublishedFileSetChangeDescription( JobID_t hUpdateRequest, const char *cszDescription ) = 0; + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( AppId_t nAppId, CSteamID creatorSteamID, uint32 uStartIndex, SteamParamStringArray_t * pRequiredTags, SteamParamStringArray_t * pExcludedTags ) = 0; + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *cszVideoAccountName, const char *cszVideoIdentifier, const char *cszFileName, AppId_t nConsumerAppId, const char *cszTitle, const char *cszDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 uStartIndex ) = 0; + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eType, uint32 uStartIndex, uint32 cDays, uint32 cCount, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *cszLocation, uint32 uUnk ) = 0; +}; + +#endif // ISTEAMREMOTESTORAGE013_H diff --git a/src/public SDK/ISteamRemoteStorage014.h b/src/public SDK/ISteamRemoteStorage014.h new file mode 100644 index 0000000..1888d0a --- /dev/null +++ b/src/public SDK/ISteamRemoteStorage014.h @@ -0,0 +1,160 @@ +//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. ======= +// +// Purpose: public interface to user remote file storage in Steam +// +//============================================================================= + + +#include "SteamTypes.h" +#include "RemoteStorageCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing, reading and writing files stored remotely +// and cached locally +//----------------------------------------------------------------------------- +class ISteamRemoteStorage014 +{ + public: + // NOTE + // + // Filenames are case-insensitive, and will be converted to lowercase automatically. + // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then + // iterate the files, the filename returned will be "foo.bar". + // + + // file operations + virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; + virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; + + + virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0; + + + virtual SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead ) = 0; + virtual bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead ) = 0; + + virtual bool FileForget( const char *pchFile ) = 0; + virtual bool FileDelete( const char *pchFile ) = 0; + + virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; + virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; + + // file operations that cause network IO + virtual UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile ) = 0; + virtual bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData ) = 0; + virtual bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) = 0; + virtual bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) = 0; + + // file information + virtual bool FileExists( const char *pchFile ) = 0; + virtual bool FilePersisted( const char *pchFile ) = 0; + virtual int32 GetFileSize( const char *pchFile ) = 0; + virtual int64 GetFileTimestamp( const char *pchFile ) = 0; + virtual ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile ) = 0; + + // iteration + virtual int32 GetFileCount() = 0; + virtual const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes ) = 0; + + // configuration management + virtual bool GetQuota( uint64 *pnTotalBytes, uint64 *puAvailableBytes ) = 0; + virtual bool IsCloudEnabledForAccount() = 0; + virtual bool IsCloudEnabledForApp() = 0; + virtual void SetCloudEnabledForApp( bool bEnabled ) = 0; + + // user generated content + + // Downloads a UGC file. A priority value of 0 will download the file immediately, + // otherwise it will wait to download the file until all downloads with a lower priority + // value are completed. Downloads with equal priority will occur simultaneously. + + virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority ) = 0; + + // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false + // or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage + virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; + + // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner ) = 0; + + // After download, gets the content of the file. + // Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file. + // Larger files can be read in chunks to reduce memory usage (since both sides of the IPC client and the game itself must allocate + // enough memory for each chunk). Once the last byte is read, the file is implicitly closed and further calls to UGCRead will fail + // unless UGCDownload is called again. + // For especially large files (anything over 100MB) it is a requirement that the file is read in chunks. + virtual int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction ) = 0; + + // Functions to iterate through UGC that has finished downloading but has not yet been read via UGCRead() + virtual int32 GetCachedUGCCount() = 0; + virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0; + + // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you + // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. + +#if defined(_PS3) || defined(_SERVER) + // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback + virtual void GetFileListFromServer() = 0; + // Indicate this file should be downloaded in the next sync + virtual bool FileFetch( const char *pchFile ) = 0; + // Indicate this file should be persisted in the next sync + virtual bool FilePersist( const char *pchFile ) = 0; + // Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback + virtual bool SynchronizeToClient() = 0; + // Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback + virtual bool SynchronizeToServer() = 0; + // Reset any fetch/persist/etc requests + virtual bool ResetFileRequestState() = 0; +#endif + + // publishing UGC + + virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; + virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; + virtual bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile ) = 0; + virtual bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle ) = 0; + virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; + virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; + virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; + + virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; + // Gets published file details for the given publishedfileid. If unMaxSecondsOld is greater than 0, + // cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh. + // A value of k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is. + + virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0; + + virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + // enumerate the files that the current user published with this app + + virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; + + virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + + virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; + + virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; + virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; + + virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + + virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; + + virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; + + virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; + + virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; + + virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; + + virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; + // this method enumerates the public view of workshop files + + virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; + + + virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0; +}; + diff --git a/src/public SDK/ISteamScreenshots001.h b/src/public SDK/ISteamScreenshots001.h new file mode 100644 index 0000000..a112437 --- /dev/null +++ b/src/public SDK/ISteamScreenshots001.h @@ -0,0 +1,60 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMSCREENSHOTS001_H +#define ISTEAMSCREENSHOTS001_H +#ifdef _WIN32 +#pragma once +#endif + + +#include "SteamTypes.h" +#include "ScreenshotsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for adding screenshots to the user's screenshot library +//----------------------------------------------------------------------------- +abstract_class ISteamScreenshots001 +{ + +public: + // Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + virtual ScreenshotHandle WriteScreenshot( void *pubRGB, uint32 cubRGB, int nWidth, int nHeight ) = 0; + + // Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio + // as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + // JPEG, TGA, and PNG formats are supported. + virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) = 0; + + // Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead. + virtual void TriggerScreenshot() = 0; + + // Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or the game handles them. If the game is hooking screenshots, + // then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary + // in response. + virtual void HookScreenshots( bool bHook ) = 0; + + // Sets metadata about a screenshot's location (for example, the name of the map) + virtual bool SetLocation( ScreenshotHandle hScreenshot, const char *pchLocation ) = 0; + + // Tags a user as being visible in the screenshot + virtual bool TagUser( ScreenshotHandle hScreenshot, CSteamID steamID ) = 0; +}; + + +#endif // ISTEAMSCREENSHOTS001_H diff --git a/src/public SDK/ISteamScreenshots002.h b/src/public SDK/ISteamScreenshots002.h new file mode 100644 index 0000000..9b39ae7 --- /dev/null +++ b/src/public SDK/ISteamScreenshots002.h @@ -0,0 +1,63 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMSCREENSHOTS002_H +#define ISTEAMSCREENSHOTS002_H +#ifdef _WIN32 +#pragma once +#endif + + +#include "SteamTypes.h" +#include "ScreenshotsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for adding screenshots to the user's screenshot library +//----------------------------------------------------------------------------- +abstract_class ISteamScreenshots002 +{ + +public: + // Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + virtual ScreenshotHandle WriteScreenshot( void *pubRGB, uint32 cubRGB, int nWidth, int nHeight ) = 0; + + // Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio + // as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + // JPEG, TGA, and PNG formats are supported. + virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) = 0; + + // Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead. + virtual void TriggerScreenshot() = 0; + + // Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or the game handles them. If the game is hooking screenshots, + // then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary + // in response. + virtual void HookScreenshots( bool bHook ) = 0; + + // Sets metadata about a screenshot's location (for example, the name of the map) + virtual bool SetLocation( ScreenshotHandle hScreenshot, const char *pchLocation ) = 0; + + // Tags a user as being visible in the screenshot + virtual bool TagUser( ScreenshotHandle hScreenshot, CSteamID steamID ) = 0; + + // Tags a published file as being visible in the screenshot + virtual bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) = 0; +}; + + +#endif // ISTEAMSCREENSHOTS002_H diff --git a/src/public SDK/ISteamScreenshots003.h b/src/public SDK/ISteamScreenshots003.h new file mode 100644 index 0000000..fc93dfd --- /dev/null +++ b/src/public SDK/ISteamScreenshots003.h @@ -0,0 +1,53 @@ +//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. ======= +// +// Purpose: public interface to user remote file storage in Steam +// +//============================================================================= + +#include "SteamTypes.h" +#include "ScreenshotsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for adding screenshots to the user's screenshot library +//----------------------------------------------------------------------------- +class ISteamScreenshots003 +{ +public: + // Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + virtual ScreenshotHandle WriteScreenshot( void *pubRGB, uint32 cubRGB, int nWidth, int nHeight ) = 0; + + // Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio + // as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + // JPEG, TGA, and PNG formats are supported. + virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) = 0; + + // Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead. + virtual void TriggerScreenshot() = 0; + + // Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or the game handles them. If the game is hooking screenshots, + // then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary + // in response. + virtual void HookScreenshots( bool bHook ) = 0; + + // Sets metadata about a screenshot's location (for example, the name of the map) + virtual bool SetLocation( ScreenshotHandle hScreenshot, const char *pchLocation ) = 0; + + // Tags a user as being visible in the screenshot + virtual bool TagUser( ScreenshotHandle hScreenshot, CSteamID steamID ) = 0; + + // Tags a published file as being visible in the screenshot + virtual bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) = 0; + + // Returns true if the app has hooked the screenshot + virtual bool IsScreenshotsHooked() = 0; + + // Adds a VR screenshot to the user's screenshot library from disk in the supported type. + // pchFilename should be the normal 2D image used in the library view + // pchVRFilename should contain the image that matches the correct type + // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + // JPEG, TGA, and PNG formats are supported. + virtual ScreenshotHandle AddVRScreenshotToLibrary( int eType, const char *pchFilename, const char *pchVRFilename ) = 0; +}; + diff --git a/src/public SDK/ISteamStreamLauncher001.h b/src/public SDK/ISteamStreamLauncher001.h new file mode 100644 index 0000000..3584461 --- /dev/null +++ b/src/public SDK/ISteamStreamLauncher001.h @@ -0,0 +1,34 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMSTREAMLAUNCHER001_H +#define ISTEAMSTREAMLAUNCHER001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "StreamLauncherCommon.h" + +abstract_class ISteamStreamLauncher001 +{ +public: + virtual EStreamLauncherResult StartStreaming( const char *cszFilePath ) = 0; + virtual void StopStreaming() = 0; +}; + +#endif // ISTEAMSTREAMLAUNCHER001_H + diff --git a/src/public SDK/ISteamUGC001.h b/src/public SDK/ISteamUGC001.h new file mode 100644 index 0000000..20055a3 --- /dev/null +++ b/src/public SDK/ISteamUGC001.h @@ -0,0 +1,69 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC001_H +#define ISTEAMUGC001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC001 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID ) = 0; + +}; + + + +#endif // ISTEAMUGC001_H diff --git a/src/public SDK/ISteamUGC002.h b/src/public SDK/ISteamUGC002.h new file mode 100644 index 0000000..74edd54 --- /dev/null +++ b/src/public SDK/ISteamUGC002.h @@ -0,0 +1,94 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC002_H +#define ISTEAMUGC002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC002 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscript to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize ) = 0; // returns true if item is installed + virtual bool GetItemUpdateInfo( PublishedFileId_t nPublishedFileID, bool *pbNeedsUpdate, bool *pbIsDownloading, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; +}; + + + +#endif // ISTEAMUGC002_H diff --git a/src/public SDK/ISteamUGC003.h b/src/public SDK/ISteamUGC003.h new file mode 100644 index 0000000..cf83dd4 --- /dev/null +++ b/src/public SDK/ISteamUGC003.h @@ -0,0 +1,96 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC003_H +#define ISTEAMUGC003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC003 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscript to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // Get info about the item on disk. If you are supporting items published through the legacy RemoteStorage APIs then *pbLegacyItem will be set to true + // and pchFolder will contain the full path to the file rather than the containing folder. + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, bool *pbLegacyItem ) = 0; // returns true if item is installed + virtual bool GetItemUpdateInfo( PublishedFileId_t nPublishedFileID, bool *pbNeedsUpdate, bool *pbIsDownloading, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; +}; + + + +#endif // ISTEAMUGC003_H diff --git a/src/public SDK/ISteamUGC004.h b/src/public SDK/ISteamUGC004.h new file mode 100644 index 0000000..60ae245 --- /dev/null +++ b/src/public SDK/ISteamUGC004.h @@ -0,0 +1,106 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC004_H +#define ISTEAMUGC004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC004 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscript to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; +}; + + + +#endif // ISTEAMUGC004_H diff --git a/src/public SDK/ISteamUGC005.h b/src/public SDK/ISteamUGC005.h new file mode 100644 index 0000000..bf22396 --- /dev/null +++ b/src/public SDK/ISteamUGC005.h @@ -0,0 +1,121 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC005_H +#define ISTEAMUGC005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC005 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 *pStatValue ) = 0; + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, bool *pbIsImage ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax) + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; +}; + + + +#endif // ISTEAMUGC005_H diff --git a/src/public SDK/ISteamUGC007.h b/src/public SDK/ISteamUGC007.h new file mode 100644 index 0000000..5416fa9 --- /dev/null +++ b/src/public SDK/ISteamUGC007.h @@ -0,0 +1,138 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUGC007_H +#define ISTEAMUGC007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UGCCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Steam UGC support API +//----------------------------------------------------------------------------- +class ISteamUGC007 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 *pStatValue ) = 0; + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, bool *pbIsImage ) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char *pchKey, uint32 cchKeySize, char *pchValue, uint32 cchValueSize ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; + + // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax) + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key + virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag. + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; + + // game servers can set a specific workshop folder before issuing any UGC commands. + // This is helpful if you want to support multiple game servers running out of the same install folder + virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0; + + // SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends + virtual void SuspendDownloads( bool bSuspend ) = 0; +}; + + + +#endif // ISTEAMUGC007_H diff --git a/src/public SDK/ISteamUGC008.h b/src/public SDK/ISteamUGC008.h new file mode 100644 index 0000000..60f8236 --- /dev/null +++ b/src/public SDK/ISteamUGC008.h @@ -0,0 +1,110 @@ + +#include "SteamTypes.h" +#include "UGCCommon.h" + +class ISteamUGC008 +{ +public: + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t *pvecPublishedFileID, uint32 cMaxEntries )= 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint32 *pStatValue ) = 0; + + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, char *pchOriginalFileName, uint32 cchOriginalFileNameSize, int *pPreviewType ) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char *pchKey, uint32 cchKeySize, char *pchValue, uint32 cchValueSize ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchUpdateLanguage ) = 0; + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetadata ) = 0; + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file + virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; + virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; + + virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, int type ) = 0; + virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; + virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; + virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; + virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; + + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscript to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // Get info about the item on disk. If you are supporting items published through the legacy RemoteStorage APIs then *pbLegacyItem will be set to true + // and pchFolder will contain the full path to the file rather than the containing folder. + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; + virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0; + virtual void SuspendDownloads( bool bSuspend ) = 0; + + virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; +}; diff --git a/src/public SDK/ISteamUGC009.h b/src/public SDK/ISteamUGC009.h new file mode 100644 index 0000000..298269e --- /dev/null +++ b/src/public SDK/ISteamUGC009.h @@ -0,0 +1,111 @@ +#include "SteamTypes.h" +#include "UGCCommon.h" + + +class ISteamUGC009 +{ +public: + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t *pvecPublishedFileID, uint32 cMaxEntries )= 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0; + + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, char *pchOriginalFileName, uint32 cchOriginalFileNameSize, int *pPreviewType ) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char *pchKey, uint32 cchKeySize, char *pchValue, uint32 cchValueSize ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0; + virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + + virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; + + // Request full details for one piece of UGC + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchUpdateLanguage ) = 0; + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetadata ) = 0; + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file + virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; + virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; + + virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, int type ) = 0; + virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; + virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; + virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; + virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; + + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; + virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscript to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // Get info about the item on disk. If you are supporting items published through the legacy RemoteStorage APIs then *pbLegacyItem will be set to true + // and pchFolder will contain the full path to the file rather than the containing folder. + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; + virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0; + virtual void SuspendDownloads( bool bSuspend ) = 0; + + virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; +}; diff --git a/src/public SDK/ISteamUGC010.h b/src/public SDK/ISteamUGC010.h new file mode 100644 index 0000000..362a2d4 --- /dev/null +++ b/src/public SDK/ISteamUGC010.h @@ -0,0 +1,152 @@ +#include "SteamTypes.h" +#include "UGCCommon.h" + + +class ISteamUGC010 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0; + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, int *pPreviewType ) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0; + virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; + + // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax) + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key + virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag. + virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, int type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item + virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item + virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted) + + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + + virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; + + virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP + + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; + + // game servers can set a specific workshop folder before issuing any UGC commands. + // This is helpful if you want to support multiple game servers running out of the same install folder + virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0; + + // SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends + virtual void SuspendDownloads( bool bSuspend ) = 0; + + // usage tracking + + virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; + + // parent-child relationship or dependency management + + virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; + + virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; + + // add/remove app dependence/requirements (usually DLC) + + virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; + + virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; + // request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times + // until all app dependencies have been returned + + virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0; + + // delete the item without prompting the user + + virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0; +}; diff --git a/src/public SDK/ISteamUGC012.h b/src/public SDK/ISteamUGC012.h new file mode 100644 index 0000000..58a7d5e --- /dev/null +++ b/src/public SDK/ISteamUGC012.h @@ -0,0 +1,157 @@ +#include "UGCCommon.h" +#include "SteamTypes.h" + + + +class ISteamUGC012 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + + // Query for all matching UGC using the new deep paging interface. Creator app id or consumer app id must be valid and be set to the current running app. pchCursor should be set to NULL or "*" to get the first result set. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char *pchCursor = NULL ) = 0; + + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; + virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0; + virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char *pchURLOrVideoID, uint32 cchURLSize, char *pchOriginalFileName, uint32 cchOriginalFileNameSize, int *pPreviewType ) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char *pchKey, uint32 cchKeySize, char *pchValue, uint32 cchValueSize ) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; + virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0; + virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; + virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0; + virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0; + virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0; + virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0; + virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0; + virtual bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0; + virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; + virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; + virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; + virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; + + // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! + virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item + virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set + virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax) + virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item + virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item + virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder + virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size. + virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key + virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag. + virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, int type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item + virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item + virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted) + + + virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; + + // Steam Workshop Consumer API + + virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; + + virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; + + virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP + + virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0; + + // game servers can set a specific workshop folder before issuing any UGC commands. + // This is helpful if you want to support multiple game servers running out of the same install folder + virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0; + + // SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends + virtual void SuspendDownloads( bool bSuspend ) = 0; + + // usage tracking + + virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; + + virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; + + // parent-child relationship or dependency management + + virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; + + virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; + + // add/remove app dependence/requirements (usually DLC) + + virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; + + virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; + // request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times + // until all app dependencies have been returned + + virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0; + + // delete the item without prompting the user + virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0; +}; + + diff --git a/src/public SDK/ISteamUGC013.h b/src/public SDK/ISteamUGC013.h new file mode 100644 index 0000000..0f5390c --- /dev/null +++ b/src/public SDK/ISteamUGC013.h @@ -0,0 +1,142 @@ +#include "UGCCommon.h" +#include "SteamTypes.h" + +class ISteamUGC013 +{ +public: + + // Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; + + // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; + + // Query for all matching UGC using the new deep paging interface. Creator app id or consumer app id must be valid and be set to the current running app. pchCursor should be set to NULL or "*" to get the first result set. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char* pchCursor = NULL) = 0; + + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) + virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) = 0; + + // Send the query to Steam + virtual SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) = 0; + + // Retrieve an individual result after receiving the callback for querying UGC + virtual bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t* pDetails) = 0; + virtual bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint32 index, char* pchURL, uint32 cchURLSize) = 0; + virtual bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint32 index, char* pchMetadata, uint32 cchMetadatasize) = 0; + virtual bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) = 0; + virtual bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64* pStatValue) = 0; + virtual uint32 GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint32 index) = 0; + virtual bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char* pchURLOrVideoID, uint32 cchURLSize, char* pchOriginalFileName, uint32 cchOriginalFileNameSize, int* pPreviewType) = 0; + virtual uint32 GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint32 index) = 0; + virtual bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char* pchKey, uint32 cchKeySize, char* pchValue, uint32 cchValueSize) = 0; + // Return the first value matching the pchKey. Note that a key may map to multiple values. Returns false if there was an error or no matching value was found. + virtual bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint32 index, const char* pchKey, char* pchValue, uint32 cchValueSize) = 0; + + // Release the request to free up memory, after retrieving results + virtual bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) = 0; + + // Options to set for querying UGC + virtual bool AddRequiredTag(UGCQueryHandle_t handle, const char* pTagName) = 0; + virtual bool AddExcludedTag(UGCQueryHandle_t handle, const char* pTagName) = 0; + virtual bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) = 0; + virtual bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) = 0; + virtual bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) = 0; + virtual bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) = 0; + virtual bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) = 0; + virtual bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) = 0; + virtual bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) = 0; + virtual bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint32 unDays) = 0; + virtual bool SetLanguage(UGCQueryHandle_t handle, const char* pchLanguage) = 0; + virtual bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 unMaxAgeSeconds) = 0; + + // Options only for querying user UGC + virtual bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char* pMatchCloudFileName) = 0; + + // Options only for querying all UGC + virtual bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) = 0; + virtual bool SetSearchText(UGCQueryHandle_t handle, const char* pSearchText) = 0; + virtual bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) = 0; + virtual bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, const char* pKey, const char* pValue) = 0; + + // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! + virtual SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds) = 0; + + // Steam Workshop Creator API + virtual SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) = 0; // create new item for this app with no content attached yet + + virtual UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() + + virtual bool SetItemTitle(UGCUpdateHandle_t handle, const char* pchTitle) = 0; // change the title of an UGC item + virtual bool SetItemDescription(UGCUpdateHandle_t handle, const char* pchDescription) = 0; // change the description of an UGC item + virtual bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, const char* pchLanguage) = 0; // specify the language of the title or description that will be set + virtual bool SetItemMetadata(UGCUpdateHandle_t handle, const char* pchMetaData) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax) + virtual bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) = 0; // change the visibility of an UGC item + virtual bool SetItemTags(UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t* pTags) = 0; // change the tags of an UGC item + virtual bool SetItemContent(UGCUpdateHandle_t handle, const char* pszContentFolder) = 0; // update item content from this local folder + virtual bool SetItemPreview(UGCUpdateHandle_t handle, const char* pszPreviewFile) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + virtual bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size. + virtual bool RemoveAllItemKeyValueTags(UGCUpdateHandle_t handle) = 0; // remove all existing key-value tags (you can add new ones via the AddItemKeyValueTag function) + virtual bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, const char* pchKey) = 0; // remove any existing key-value tags with the specified key + virtual bool AddItemKeyValueTag(UGCUpdateHandle_t handle, const char* pchKey, const char* pchValue) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag. + virtual bool AddItemPreviewFile(UGCUpdateHandle_t handle, const char* pszPreviewFile, int type) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool AddItemPreviewVideo(UGCUpdateHandle_t handle, const char* pszVideoID) = 0; // add preview video for this item + virtual bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint32 index, const char* pszPreviewFile) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size + virtual bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint32 index, const char* pszVideoID) = 0; // updates an existing preview video for this item + virtual bool RemoveItemPreview(UGCUpdateHandle_t handle, uint32 index) = 0; // remove a preview by index starting at 0 (previews are sorted) + + virtual SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, const char* pchChangeNote) = 0; // commit update process started with StartItemUpdate() + virtual EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, uint64* punBytesProcessed, uint64* punBytesTotal) = 0; + + // Steam Workshop Consumer API + virtual SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) = 0; + virtual SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) = 0; + virtual SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) = 0; + virtual SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) = 0; + virtual SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) = 0; // subscribe to this item, will be installed ASAP + virtual SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) = 0; // unsubscribe from this item, will be uninstalled after game quits + virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items + virtual uint32 GetSubscribedItems(PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries) = 0; // all subscribed item PublishFileIDs + + // get EItemState flags about item on this client + virtual uint32 GetItemState(PublishedFileId_t nPublishedFileID) = 0; + + // get info about currently installed content on disc for items that have k_EItemStateInstalled set + // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) + virtual bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, uint64* punSizeOnDisk, char* pchFolder, uint32 cchFolderSize, uint32* punTimeStamp) = 0; + + // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once + virtual bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, uint64* punBytesDownloaded, uint64* punBytesTotal) = 0; + + // download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed, + // then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time. + // If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. + virtual bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) = 0; + + // game servers can set a specific workshop folder before issuing any UGC commands. + // This is helpful if you want to support multiple game servers running out of the same install folder + virtual bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, const char* pszFolder) = 0; + + // SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends + virtual void SuspendDownloads(bool bSuspend) = 0; + + // usage tracking + virtual SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) = 0; + virtual SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t* pvecPublishedFileID, uint32 unNumPublishedFileIDs) = 0; + virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; + + // parent-child relationship or dependency management + virtual SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) = 0; + virtual SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) = 0; + + // add/remove app dependence/requirements (usually DLC) + virtual SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) = 0; + virtual SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) = 0; + // request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times + // until all app dependencies have been returned + virtual SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) = 0; + + // delete the item without prompting the user + virtual SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) = 0; +}; + diff --git a/src/public SDK/ISteamUnifiedMessages001.h b/src/public SDK/ISteamUnifiedMessages001.h new file mode 100644 index 0000000..55ac73a --- /dev/null +++ b/src/public SDK/ISteamUnifiedMessages001.h @@ -0,0 +1,50 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUNIFIEDMESSAGES001_H +#define ISTEAMUNIFIEDMESSAGES001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UnifiedMessagesCommon.h" + +abstract_class ISteamUnifiedMessages001 +{ +public: + static const ClientUnifiedMessageHandle k_InvalidUnifiedMessageHandle = 0; + + // Sends a service method (in binary serialized form) using the Steam Client. + // Returns a unified message handle (k_InvalidUnifiedMessageHandle if could not send the message). + virtual ClientUnifiedMessageHandle SendMethod( const char *pchServiceMethod, const void *pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext ) = 0; + + // Gets the size of the response and the EResult. Returns false if the response is not ready yet. + virtual bool GetMethodResponseInfo( ClientUnifiedMessageHandle hHandle, uint32 *punResponseSize, EResult *peResult ) = 0; + + // Gets a response in binary serialized form (and optionally release the corresponding allocated memory). + virtual bool GetMethodResponseData( ClientUnifiedMessageHandle hHandle, void *pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease ) = 0; + + // Releases the message and its corresponding allocated memory. + virtual bool ReleaseMethod( ClientUnifiedMessageHandle hHandle ) = 0; + + // Sends a service notification (in binary serialized form) using the Steam Client. + // Returns true if the notification was sent successfully. + virtual bool SendNotification( const char *pchServiceNotification, const void *pNotificationBuffer, uint32 unNotificationBufferSize ) = 0; +}; + + +#endif // ISTEAMUNIFIEDMESSAGES001_H diff --git a/src/public SDK/ISteamUser004.h b/src/public SDK/ISteamUser004.h new file mode 100644 index 0000000..cd07dcd --- /dev/null +++ b/src/public SDK/ISteamUser004.h @@ -0,0 +1,116 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER004_H +#define ISTEAMUSER004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser004 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // steam account management functions + virtual void LogOn( CSteamID steamID ) = 0; + virtual void LogOff() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + virtual ELogonState GetLogonState() = 0; + virtual bool BConnected() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // account state + + // returns true if this account is VAC banned from the specified ban set + virtual bool IsVACBanned( EVACBan eVACBan ) = 0; + + // returns true if the user needs to see the newly-banned message from the specified ban set + virtual bool RequireShowVACBannedMessage( EVACBan eVACBan ) = 0; + + // tells the server that the user has seen the 'you have been banned' dialog + virtual void AcknowledgeVACBanning( EVACBan eVACBan ) = 0; + + // registering/unregistration game launches functions + // unclear as to where these should live + // These are dead. + virtual OBSOLETE_FUNCTION int NClientGameIDAdd( int nGameID ) = 0; + virtual OBSOLETE_FUNCTION void RemoveClientGame( int nClientGameID ) = 0; + virtual OBSOLETE_FUNCTION void SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer ) = 0; + + // steam2 stuff + virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0; + virtual OBSOLETE_FUNCTION void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0; + + // email address setting + virtual bool SetEmail( const char *pchEmail ) = 0; + + // logon cookie - this is obsolete + virtual OBSOLETE_FUNCTION int GetSteamGameConnectToken( void *pBlob, int cbMaxBlob ) = 0; + + // persist per user data + virtual bool SetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0; + virtual bool GetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0; + virtual bool SetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0; + virtual bool GetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0; + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // int nGameID - the ID of the current game. + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // controls where chat messages go to - puts the caller on top of the stack of chat destinations + virtual void SetSelfAsPrimaryChatDestination() = 0; + // returns true if the current caller is the one that should open new chat dialogs + virtual bool IsPrimaryChatDestination() = 0; + + virtual void RequestLegacyCDKey( AppId_t iAppID ) = 0; +}; + + +#endif // ISTEAMUSER004_H + diff --git a/src/public SDK/ISteamUser005.h b/src/public SDK/ISteamUser005.h new file mode 100644 index 0000000..85cf8fb --- /dev/null +++ b/src/public SDK/ISteamUser005.h @@ -0,0 +1,127 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER005_H +#define ISTEAMUSER005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +abstract_class ISteamUser005 +{ +public: + + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // steam account management functions + virtual void LogOn( CSteamID steamID ) = 0; + virtual void LogOff() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + virtual ELogonState GetLogonState() = 0; + virtual bool BConnected() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // returns true if this account is VAC banned from the specified ban set + virtual bool IsVACBanned( EVACBan eVACBan ) = 0; + + // returns true if the user needs to see the newly-banned message from the specified ban set + virtual bool RequireShowVACBannedMessage( EVACBan eVACBan ) = 0; + + // tells the server that the user has seen the 'you have been banned' dialog + virtual void AcknowledgeVACBanning( EVACBan eVACBan ) = 0; + + // steam2 stuff + virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0; + virtual OBSOLETE_FUNCTION void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0; + + // email address setting + virtual bool SetEmail( const char *pchEmail ) = 0; + + + // persist per user data + virtual bool SetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0; + virtual bool GetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0; + virtual bool SetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0; + virtual bool GetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0; + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // int nGameID - the ID of the current game. + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // controls where chat messages go to - puts the caller on top of the stack of chat destinations + virtual void SetSelfAsPrimaryChatDestination() = 0; + // returns true if the current caller is the one that should open new chat dialogs + virtual bool IsPrimaryChatDestination() = 0; + + virtual void RequestLegacyCDKey( AppId_t iAppID ) = 0; + + virtual bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending ) = 0; + virtual bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending ) = 0; + + virtual bool AckGuestPass( const char *pchGuestPassCode ) = 0; + virtual bool RedeemGuestPass( const char *pchGuestPassCode ) = 0; + + virtual uint32 GetGuestPassToGiveCount() = 0; + virtual uint32 GetGuestPassToRedeemCount() = 0; + virtual uint32 GetGuestPassLastUpdateTime() = 0; + + virtual bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed, char * pchRecipientAddress, int cRecipientAddressSize ) = 0; + virtual bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t* pnPackageID, RTime32* pRTime32Created, RTime32* pRTime32Expiration, RTime32* pRTime32Sent, RTime32* pRTime32Redeemed ) = 0; + virtual bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize ) = 0; + virtual bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize ) = 0; + virtual void AcknowledgeMessageByGID( const char *pchMessageGID ) = 0; + + virtual bool SetLanguage( const char *pchLanguage ) = 0; + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, EAppUsageEvent eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + virtual void SetAccountName( const char* pchAccountName ) = 0; + virtual void SetPassword( const char* pchPassword ) = 0; + + virtual void SetAccountCreationTime( RTime32 rtime32Time ) = 0; +}; + + +#endif // ISTEAMUSER005_H diff --git a/src/public SDK/ISteamUser006.h b/src/public SDK/ISteamUser006.h new file mode 100644 index 0000000..2d310ed --- /dev/null +++ b/src/public SDK/ISteamUser006.h @@ -0,0 +1,76 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER006_H +#define ISTEAMUSER006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +abstract_class ISteamUser006 +{ +public: + + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // steam account management functions + virtual void LogOn( CSteamID steamID ) = 0; + virtual void LogOff() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // persist per user data + virtual bool SetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0; + virtual bool GetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0; + virtual bool SetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0; + virtual bool GetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0; + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // int nGameID - the ID of the current game. + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, EAppUsageEvent eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; +}; + +#endif // ISTEAMUSER006_H diff --git a/src/public SDK/ISteamUser007.h b/src/public SDK/ISteamUser007.h new file mode 100644 index 0000000..d527fa6 --- /dev/null +++ b/src/public SDK/ISteamUser007.h @@ -0,0 +1,79 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER007_H +#define ISTEAMUSER007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +abstract_class ISteamUser007 +{ +public: + + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // steam account management functions + virtual void LogOn( CSteamID steamID ) = 0; + virtual void LogOff() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // persist per user data + virtual bool SetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0; + virtual bool GetRegistryString( ERegistrySubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0; + virtual bool SetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0; + virtual bool GetRegistryInt( ERegistrySubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0; + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // int nGameID - the ID of the current game. + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, EAppUsageEvent eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error + virtual void RefreshSteam2Login() = 0; +}; + +#endif // ISTEAMUSER007_H diff --git a/src/public SDK/ISteamUser008.h b/src/public SDK/ISteamUser008.h new file mode 100644 index 0000000..820c476 --- /dev/null +++ b/src/public SDK/ISteamUser008.h @@ -0,0 +1,77 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER008_H +#define ISTEAMUSER008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser008 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // void pvSteam2GetEncryptionKey - unknown + // int cbSteam2GetEncryptionKey - unknown + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, EAppUsageEvent eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error + virtual void RefreshSteam2Login() = 0; +}; + + + +#endif // ISTEAMUSER008_H diff --git a/src/public SDK/ISteamUser009.h b/src/public SDK/ISteamUser009.h new file mode 100644 index 0000000..be9a754 --- /dev/null +++ b/src/public SDK/ISteamUser009.h @@ -0,0 +1,80 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER009_H +#define ISTEAMUSER009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser009 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error + // this is only needed under very specific circumstances + virtual void RefreshSteam2Login() = 0; +}; + + + +#endif // ISTEAMUSER009_H diff --git a/src/public SDK/ISteamUser010.h b/src/public SDK/ISteamUser010.h new file mode 100644 index 0000000..e9b5998 --- /dev/null +++ b/src/public SDK/ISteamUser010.h @@ -0,0 +1,77 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER010_H +#define ISTEAMUSER010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser010 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + +}; + + + +#endif // ISTEAMUSER010_H diff --git a/src/public SDK/ISteamUser011.h b/src/public SDK/ISteamUser011.h new file mode 100644 index 0000000..a7db4bf --- /dev/null +++ b/src/public SDK/ISteamUser011.h @@ -0,0 +1,94 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER011_H +#define ISTEAMUSER011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser011 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetCompressedVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetCompressedVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Gets the latest voice data. It should be called as often as possible once recording has started. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + virtual EVoiceResult GetCompressedVoice( void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + + // Decompresses a chunk of data produced by GetCompressedVoice(). nBytesWritten is set to the + // number of bytes written to pDestBuffer. The output format of the data is 16-bit signed at + // 11025 samples per second. + virtual EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; +}; + +#endif // ISTEAMUSER011_H diff --git a/src/public SDK/ISteamUser012.h b/src/public SDK/ISteamUser012.h new file mode 100644 index 0000000..825119a --- /dev/null +++ b/src/public SDK/ISteamUser012.h @@ -0,0 +1,112 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER012_H +#define ISTEAMUSER012_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser012 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetCompressedVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetCompressedVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Gets the latest voice data. It should be called as often as possible once recording has started. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + virtual EVoiceResult GetCompressedVoice( void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + + // Decompresses a chunk of data produced by GetCompressedVoice(). nBytesWritten is set to the + // number of bytes written to pDestBuffer. The output format of the data is 16-bit signed at + // 11025 samples per second. + virtual EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; +}; + +#endif // ISTEAMUSER012_H diff --git a/src/public SDK/ISteamUser013.h b/src/public SDK/ISteamUser013.h new file mode 100644 index 0000000..79f7887 --- /dev/null +++ b/src/public SDK/ISteamUser013.h @@ -0,0 +1,132 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER013_H +#define ISTEAMUSER013_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser013 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at 11025 samples per second. + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; +}; + +#endif // ISTEAMUSER013_H diff --git a/src/public SDK/ISteamUser014.h b/src/public SDK/ISteamUser014.h new file mode 100644 index 0000000..8430650 --- /dev/null +++ b/src/public SDK/ISteamUser014.h @@ -0,0 +1,178 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER014_H +#define ISTEAMUSER014_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser014 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at 11025 samples per second. + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + +#ifdef _PS3 + // Initiates PS3 Logon request using just PSN ticket. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultPSNAccountUnlinked if the PSN account is unknown to Steam. You should + // then call LogOnAndLinkSteamAccountToPSN() after prompting the user for credentials to establish a link. + // Future calls to LogOn() after the one time link call should succeed as long as the user is connected to PSN. + virtual void LogOn( bool bInteractive ) = 0; + + // Initiates a request to logon with a specific steam username/password and create a PSN account link at + // the same time. Should call this only if LogOn() has failed and indicated the PSN account is unlinked. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. pchUserName + // should be the users Steam username, and pchPassword should be the users Steam password. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultPSNAccountAlreadyLinked if already linked to another account. + virtual void LogOnAndLinkSteamAccountToPSN( bool bInteractive, const char *pchUserName, const char *pchPassword ) = 0; + + // Final logon option for PS3, this logs into an existing account if already linked, but if not already linked + // creates a new account using the info in the PSN ticket to generate a unique account name. The new account is + // then linked to the PSN ticket. This is the faster option for new users who don't have an existing Steam account + // to get into multiplayer. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0; +#endif +}; + +#endif // ISTEAMUSER014_H diff --git a/src/public SDK/ISteamUser015.h b/src/public SDK/ISteamUser015.h new file mode 100644 index 0000000..9bbff91 --- /dev/null +++ b/src/public SDK/ISteamUser015.h @@ -0,0 +1,147 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER015_H +#define ISTEAMUSER015_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser015 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, EAppUsageEvent eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + virtual EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nSamplesPerSec ) = 0; + + // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; +}; + +#endif // ISTEAMUSER015_H diff --git a/src/public SDK/ISteamUser016.h b/src/public SDK/ISteamUser016.h new file mode 100644 index 0000000..77821b9 --- /dev/null +++ b/src/public SDK/ISteamUser016.h @@ -0,0 +1,190 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER016_H +#define ISTEAMUSER016_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser016 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + // nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case) + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at the requested samples per second. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + + // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + +#ifdef _PS3 + // Initiates PS3 Logon request using just PSN ticket. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultExternalAccountUnlinked if the PSN account is unknown to Steam. You should + // then call LogOnAndLinkSteamAccountToPSN() after prompting the user for credentials to establish a link. + // Future calls to LogOn() after the one time link call should succeed as long as the user is connected to PSN. + virtual void LogOn( bool bInteractive ) = 0; + + // Initiates a request to logon with a specific steam username/password and create a PSN account link at + // the same time. Should call this only if LogOn() has failed and indicated the PSN account is unlinked. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. pchUserName + // should be the users Steam username, and pchPassword should be the users Steam password. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultOtherAccountAlreadyLinked if already linked to another account. + virtual void LogOnAndLinkSteamAccountToPSN( bool bInteractive, const char *pchUserName, const char *pchPassword ) = 0; + + // Final logon option for PS3, this logs into an existing account if already linked, but if not already linked + // creates a new account using the info in the PSN ticket to generate a unique account name. The new account is + // then linked to the PSN ticket. This is the faster option for new users who don't have an existing Steam account + // to get into multiplayer. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0; + + // Returns a special SteamID that represents the user's PSN information. Can be used to query the user's PSN avatar, + // online name, etc. through the standard Steamworks interfaces. + virtual CSteamID GetConsoleSteamID() = 0; +#endif + +}; + +#endif // ISTEAMUSER016_H diff --git a/src/public SDK/ISteamUser017.h b/src/public SDK/ISteamUser017.h new file mode 100644 index 0000000..16a5784 --- /dev/null +++ b/src/public SDK/ISteamUser017.h @@ -0,0 +1,198 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER017_H +#define ISTEAMUSER017_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser017 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + // nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case) + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at the requested samples per second. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + + // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Trading Card badges data access + // if you only have one set of cards, the series will be 1 + // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) + virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0; + + // gets the Steam Level of the user, as shown on their profile + virtual int GetPlayerSteamLevel() = 0; + +#ifdef _PS3 + // Initiates PS3 Logon request using just PSN ticket. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultExternalAccountUnlinked if the PSN account is unknown to Steam. You should + // then call LogOnAndLinkSteamAccountToPSN() after prompting the user for credentials to establish a link. + // Future calls to LogOn() after the one time link call should succeed as long as the user is connected to PSN. + virtual void LogOn( bool bInteractive ) = 0; + + // Initiates a request to logon with a specific steam username/password and create a PSN account link at + // the same time. Should call this only if LogOn() has failed and indicated the PSN account is unlinked. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. pchUserName + // should be the users Steam username, and pchPassword should be the users Steam password. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultOtherAccountAlreadyLinked if already linked to another account. + virtual void LogOnAndLinkSteamAccountToPSN( bool bInteractive, const char *pchUserName, const char *pchPassword ) = 0; + + // Final logon option for PS3, this logs into an existing account if already linked, but if not already linked + // creates a new account using the info in the PSN ticket to generate a unique account name. The new account is + // then linked to the PSN ticket. This is the faster option for new users who don't have an existing Steam account + // to get into multiplayer. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0; + + // Returns a special SteamID that represents the user's PSN information. Can be used to query the user's PSN avatar, + // online name, etc. through the standard Steamworks interfaces. + virtual CSteamID GetConsoleSteamID() = 0; +#endif + +}; + +#endif // ISTEAMUSER_H diff --git a/src/public SDK/ISteamUser018.h b/src/public SDK/ISteamUser018.h new file mode 100644 index 0000000..4231279 --- /dev/null +++ b/src/public SDK/ISteamUser018.h @@ -0,0 +1,210 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSER018_H +#define ISTEAMUSER018_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing and manipulating a steam account +// associated with one client instance +//----------------------------------------------------------------------------- +abstract_class ISteamUser018 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the amount of captured audio data that is available in bytes. + // This provides both the compressed and uncompressed data. Please note that the uncompressed + // data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected. + // nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case) + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetAvailableVoice(uint32 *pcbCompressed, uint32 *pcbUncompressed, uint32 nUncompressedVoiceDesiredSampleRate) = 0; + + // Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to + // DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format. + // Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible + // levels of speech are detected, and may have passed through denoising filters, etc. + // This function should be called as often as possible once recording has started; once per frame at least. + // nBytesWritten is set to the number of bytes written to pDestBuffer. + // nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer. + // You must grab both compressed and uncompressed here at the same time, if you want both. + // Matching data that is not read during this call will be thrown away. + // GetAvailableVoice() can be used to determine how much data is actually available. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, uint32 cbUncompressedDestBufferSize, uint32 *nUncompressBytesWritten, uint32 nUncompressedVoiceDesiredSampleRate ) = 0; + + // Decompresses a chunk of compressed data produced by GetVoice(). + // nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall. + // In that case, nBytesWritten is set to the size of the buffer required to decompress the given + // data. The suggested buffer size for the destination buffer is 22 kilobytes. + // The output format of the data is 16-bit signed at the requested samples per second. + // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + + // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Trading Card badges data access + // if you only have one set of cards, the series will be 1 + // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) + virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0; + + // gets the Steam Level of the user, as shown on their profile + virtual int GetPlayerSteamLevel() = 0; + + // Requests a URL which authenticates an in-game browser for store check-out, + // and then redirects to the specified URL. As long as the in-game browser + // accepts and handles session cookies, Steam microtransaction checkout pages + // will automatically recognize the user instead of presenting a login page. + // The result of this API call will be a StoreAuthURLResponse_t callback. + // NOTE: The URL has a very short lifetime to prevent history-snooping attacks, + // so you should only call this API when you are about to launch the browser, + // or else immediately navigate to the result URL using a hidden browser window. + // NOTE 2: The resulting authorization cookie has an expiration time of one day, + // so it would be a good idea to request and visit a new auth URL every 12 hours. + virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0; + +#ifdef _PS3 + // Initiates PS3 Logon request using just PSN ticket. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultExternalAccountUnlinked if the PSN account is unknown to Steam. You should + // then call LogOnAndLinkSteamAccountToPSN() after prompting the user for credentials to establish a link. + // Future calls to LogOn() after the one time link call should succeed as long as the user is connected to PSN. + virtual void LogOn( bool bInteractive ) = 0; + + // Initiates a request to logon with a specific steam username/password and create a PSN account link at + // the same time. Should call this only if LogOn() has failed and indicated the PSN account is unlinked. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. pchUserName + // should be the users Steam username, and pchPassword should be the users Steam password. + // + // Listen for SteamServersConnected_t or SteamServerConnectFailure_t for status. SteamServerConnectFailure_t + // may return with EResult k_EResultOtherAccountAlreadyLinked if already linked to another account. + virtual void LogOnAndLinkSteamAccountToPSN( bool bInteractive, const char *pchUserName, const char *pchPassword ) = 0; + + // Final logon option for PS3, this logs into an existing account if already linked, but if not already linked + // creates a new account using the info in the PSN ticket to generate a unique account name. The new account is + // then linked to the PSN ticket. This is the faster option for new users who don't have an existing Steam account + // to get into multiplayer. + // + // PARAMS: bInteractive - If set tells Steam to go ahead and show the PS3 NetStart dialog if needed to + // prompt the user for network setup/PSN logon before initiating the Steam side of the logon. + virtual void LogOnAndCreateNewSteamAccountIfNeeded( bool bInteractive ) = 0; + + // Returns a special SteamID that represents the user's PSN information. Can be used to query the user's PSN avatar, + // online name, etc. through the standard Steamworks interfaces. + virtual CSteamID GetConsoleSteamID() = 0; +#endif + +}; + +#endif // ISTEAMUSER_H diff --git a/src/public SDK/ISteamUser019.h b/src/public SDK/ISteamUser019.h new file mode 100644 index 0000000..61f20cc --- /dev/null +++ b/src/public SDK/ISteamUser019.h @@ -0,0 +1,170 @@ +#include "SteamTypes.h" +#include "UserCommon.h" + +class ISteamUser019 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the size of captured audio data that is available from GetVoice. + // Most applications will only use compressed data and should ignore the other + // parameters, which exist primarily for backwards compatibility. See comments + // below for further explanation of "uncompressed" data. + virtual EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0; + + // --------------------------------------------------------------------------- + // NOTE: "uncompressed" audio is a deprecated feature and should not be used + // by most applications. It is raw single-channel 16-bit PCM wave data which + // may have been run through preprocessing filters and/or had silence removed, + // so the uncompressed audio could have a shorter duration than you expect. + // There may be no data at all during long periods of silence. Also, fetching + // uncompressed audio will cause GetVoice to discard any leftover compressed + // audio, so you must fetch both types at once. Finally, GetAvailableVoice is + // not precisely accurate when the uncompressed size is requested. So if you + // really need to use uncompressed audio, you should call GetVoice frequently + // with two very large (20kb+) output buffers instead of trying to allocate + // perfectly-sized buffers. But most applications should ignore all of these + // details and simply leave the "uncompressed" parameters as NULL/zero. + // --------------------------------------------------------------------------- + + // Read captured audio data from the microphone buffer. This should be called + // at least once per frame, and preferably every few milliseconds, to keep the + // microphone input delay as low as possible. Most applications will only use + // compressed data and should pass NULL/zero for the "uncompressed" parameters. + // Compressed data can be transmitted by your application and decoded into raw + // using the DecompressVoice function below. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed_Deprecated = false, void *pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32 *nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0; + + // Decodes the compressed voice data returned by GetVoice. The output data is + // raw single-channel 16-bit PCM audio. The decoder supports any sample rate + // from 11025 to 48000; see GetVoiceOptimalSampleRate() below for details. + // If the output buffer is not large enough, then *nBytesWritten will be set + // to the required buffer size, and k_EVoiceResultBufferTooSmall is returned. + // It is suggested to start with a 20kb buffer and reallocate as necessary. + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + + // This returns the native sample rate of the Steam voice decompressor; using + // this sample rate for DecompressVoice will perform the least CPU processing. + // However, the final audio quality will depend on how well the audio device + // (and/or your application's audio output SDK) deals with lower sample rates. + // You may find that you get the best audio output quality when you ignore + // this function and use the native sample rate of your audio output device, + // which is usually 48000 or 44100. + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Trading Card badges data access + // if you only have one set of cards, the series will be 1 + // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) + virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0; + + // gets the Steam Level of the user, as shown on their profile + virtual int GetPlayerSteamLevel() = 0; + + // Requests a URL which authenticates an in-game browser for store check-out, + // and then redirects to the specified URL. As long as the in-game browser + // accepts and handles session cookies, Steam microtransaction checkout pages + // will automatically recognize the user instead of presenting a login page. + // The result of this API call will be a StoreAuthURLResponse_t callback. + // NOTE: The URL has a very short lifetime to prevent history-snooping attacks, + // so you should only call this API when you are about to launch the browser, + // or else immediately navigate to the result URL using a hidden browser window. + // NOTE 2: The resulting authorization cookie has an expiration time of one day, + // so it would be a good idea to request and visit a new auth URL every 12 hours. + virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0; + + // gets whether the users phone number is verified + virtual bool BIsPhoneVerified() = 0; + + // gets whether the user has two factor enabled on their account + virtual bool BIsTwoFactorEnabled() = 0; + + // gets whether the users phone number is identifying + virtual bool BIsPhoneIdentifying() = 0; + + // gets whether the users phone number is awaiting (re)verification + virtual bool BIsPhoneRequiringVerification() = 0; +}; diff --git a/src/public SDK/ISteamUser020.h b/src/public SDK/ISteamUser020.h new file mode 100644 index 0000000..798625a --- /dev/null +++ b/src/public SDK/ISteamUser020.h @@ -0,0 +1,175 @@ +#include "SteamTypes.h" +#include "UserCommon.h" + +class ISteamUser020 +{ +public: + // returns the HSteamUser this interface represents + // this is only used internally by the API, and by a few select interfaces that support multi-user + virtual HSteamUser GetHSteamUser() = 0; + + // returns true if the Steam client current has a live connection to the Steam servers. + // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. + // The Steam client will automatically be trying to recreate the connection as often as possible. + virtual bool BLoggedOn() = 0; + + // returns the CSteamID of the account currently logged into the Steam client + // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API + virtual CSteamID GetSteamID() = 0; + + // Multiplayer Authentication functions + + // InitiateGameConnection() starts the state machine for authenticating the game client with the game server + // It is the client portion of a three-way handshake between the client, the game server, and the steam servers + // + // Parameters: + // void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token. + // int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( ) + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + // bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running) + // + // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed + // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. + virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0; + + // notify of disconnect + // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call + virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0; + + // Legacy functions + + // used by only a few games to track usage events + virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0; + + // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. + // this will usually be something like "C:\Progam Files\Steam\userdata\\\local" + virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0; + + // Starts voice recording. Once started, use GetVoice() to get the data + virtual void StartVoiceRecording( ) = 0; + + // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for + // a little bit after this function is called. GetVoice() should continue to be called until it returns + // k_eVoiceResultNotRecording + virtual void StopVoiceRecording( ) = 0; + + // Determine the size of captured audio data that is available from GetVoice. + // Most applications will only use compressed data and should ignore the other + // parameters, which exist primarily for backwards compatibility. See comments + // below for further explanation of "uncompressed" data. + virtual EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0; + + // --------------------------------------------------------------------------- + // NOTE: "uncompressed" audio is a deprecated feature and should not be used + // by most applications. It is raw single-channel 16-bit PCM wave data which + // may have been run through preprocessing filters and/or had silence removed, + // so the uncompressed audio could have a shorter duration than you expect. + // There may be no data at all during long periods of silence. Also, fetching + // uncompressed audio will cause GetVoice to discard any leftover compressed + // audio, so you must fetch both types at once. Finally, GetAvailableVoice is + // not precisely accurate when the uncompressed size is requested. So if you + // really need to use uncompressed audio, you should call GetVoice frequently + // with two very large (20kb+) output buffers instead of trying to allocate + // perfectly-sized buffers. But most applications should ignore all of these + // details and simply leave the "uncompressed" parameters as NULL/zero. + // --------------------------------------------------------------------------- + + // Read captured audio data from the microphone buffer. This should be called + // at least once per frame, and preferably every few milliseconds, to keep the + // microphone input delay as low as possible. Most applications will only use + // compressed data and should pass NULL/zero for the "uncompressed" parameters. + // Compressed data can be transmitted by your application and decoded into raw + // using the DecompressVoice function below. + virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed_Deprecated = false, void *pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32 *nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0; + + // Decodes the compressed voice data returned by GetVoice. The output data is + // raw single-channel 16-bit PCM audio. The decoder supports any sample rate + // from 11025 to 48000; see GetVoiceOptimalSampleRate() below for details. + // If the output buffer is not large enough, then *nBytesWritten will be set + // to the required buffer size, and k_EVoiceResultBufferTooSmall is returned. + // It is suggested to start with a 20kb buffer and reallocate as necessary. + virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0; + + // This returns the native sample rate of the Steam voice decompressor; using + // this sample rate for DecompressVoice will perform the least CPU processing. + // However, the final audio quality will depend on how well the audio device + // (and/or your application's audio output SDK) deals with lower sample rates. + // You may find that you get the best audio output quality when you ignore + // this function and use the native sample rate of your audio output device, + // which is usually 48000 or 44100. + virtual uint32 GetVoiceOptimalSampleRate() = 0; + + // Retrieve ticket to be sent to the entity who wishes to authenticate you. + // pcbTicket retrieves the length of the actual ticket. + virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused + // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) + virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; + + // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity + virtual void EndAuthSession( CSteamID steamID ) = 0; + + // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to + virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0; + + // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function + // to determine if the user owns downloadable content specified by the provided AppID. + virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0; + + // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam + // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. + virtual bool BIsBehindNAT() = 0; + + // set data to be replicated to friends so that they can join your game + // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client + // uint32 unIPServer, uint16 usPortServer - the IP address of the game server + virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0; + + // Requests a ticket encrypted with an app specific shared key + // pDataToInclude, cbDataToInclude will be encrypted into the ticket + // ( This is asynchronous, you must wait for the ticket to be completed by the server ) + + virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; + + // retrieve a finished ticket + virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0; + + // Trading Card badges data access + // if you only have one set of cards, the series will be 1 + // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) + virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0; + + // gets the Steam Level of the user, as shown on their profile + virtual int GetPlayerSteamLevel() = 0; + + // Requests a URL which authenticates an in-game browser for store check-out, + // and then redirects to the specified URL. As long as the in-game browser + // accepts and handles session cookies, Steam microtransaction checkout pages + // will automatically recognize the user instead of presenting a login page. + // The result of this API call will be a StoreAuthURLResponse_t callback. + // NOTE: The URL has a very short lifetime to prevent history-snooping attacks, + // so you should only call this API when you are about to launch the browser, + // or else immediately navigate to the result URL using a hidden browser window. + // NOTE 2: The resulting authorization cookie has an expiration time of one day, + // so it would be a good idea to request and visit a new auth URL every 12 hours. + + virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0; + + // gets whether the users phone number is verified + virtual bool BIsPhoneVerified() = 0; + + // gets whether the user has two factor enabled on their account + virtual bool BIsTwoFactorEnabled() = 0; + + // gets whether the users phone number is identifying + virtual bool BIsPhoneIdentifying() = 0; + + // gets whether the users phone number is awaiting (re)verification + virtual bool BIsPhoneRequiringVerification() = 0; + + + virtual SteamAPICall_t GetMarketEligibility() = 0; +}; diff --git a/src/public SDK/ISteamUserStats001.h b/src/public SDK/ISteamUserStats001.h new file mode 100644 index 0000000..8b774ee --- /dev/null +++ b/src/public SDK/ISteamUserStats001.h @@ -0,0 +1,88 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS001_H +#define ISTEAMUSERSTATS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +abstract_class ISteamUserStats001 +{ +public: + // The "schema" of a Game's UserData is really defined elsewhere, and + // the game should know it before accessing this interface. These top + // three functions are mostly provided for iteration / testing purposes. + // Get the number of stats fields for nGameID + virtual uint32 GetNumStats( CGameID nGameID ) = 0; + // Get stat name iStat in [0,GetNumStats) + virtual const char *GetStatName( CGameID nGameID, uint32 iStat ) = 0; + // Get type of this field + virtual ESteamUserStatType GetStatType( CGameID nGameID, const char *pchName ) = 0; + // Get the number of achievements for nGameID + virtual uint32 GetNumAchievements( CGameID nGameID ) = 0; + // Get achievement name iAchievement in [0,GetNumAchievements) + virtual const char *GetAchievementName( CGameID nGameID, uint32 iAchievement ) = 0; + + virtual OBSOLETE_FUNCTION uint32 GetNumGroupAchievements( CGameID ) = 0; + virtual OBSOLETE_FUNCTION const char *GetGroupAchievementName( CGameID, uint32 iAchievement ) = 0; + + // Ask the server to send down this user's data and achievements for nGameID + virtual bool RequestCurrentStats( CGameID nGameID ) = 0; + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; +#else + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; +#else + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; +#endif + + virtual bool UpdateAvgRateStat( CGameID nGameID, const char *pchName, float, double dSessionLength ) = 0; + + virtual bool GetAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved ) = 0; + virtual bool GetGroupAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved ) = 0; + + virtual bool SetAchievement( CGameID nGameID, const char *pchName ) = 0; + virtual bool SetGroupAchievement( CGameID nGameID, const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats( CGameID nGameID ) = 0; + + virtual bool ClearAchievement( CGameID nGameID, const char *pchName ) = 0; + virtual bool ClearGroupAchievement( CGameID nGameID, const char *pchName ) = 0; + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( CGameID nGameID, const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( CGameID nGameID, const char *pchName, const char *pchKey ) = 0; +}; + +#endif // ISTEAMUSERSTATS001_H diff --git a/src/public SDK/ISteamUserStats002.h b/src/public SDK/ISteamUserStats002.h new file mode 100644 index 0000000..1c2d7c3 --- /dev/null +++ b/src/public SDK/ISteamUserStats002.h @@ -0,0 +1,89 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS002_H +#define ISTEAMUSERSTATS002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + + +abstract_class ISteamUserStats002 +{ +public: + + // The "schema" of a Game's UserData is really defined elsewhere, and + // the game should know it before accessing this interface. These top + // three functions are mostly provided for iteration / testing purposes. + // Get the number of stats fields for nGameID + virtual uint32 GetNumStats( CGameID nGameID ) = 0; + // Get stat name iStat in [0,GetNumStats) + virtual const char *GetStatName( CGameID nGameID, uint32 iStat ) = 0; + // Get type of this field + virtual ESteamUserStatType GetStatType( CGameID nGameID, const char *pchName ) = 0; + // Get the number of achievements for nGameID + virtual uint32 GetNumAchievements( CGameID nGameID ) = 0; + // Get achievement name iAchievement in [0,GetNumAchievements) + virtual const char *GetAchievementName( CGameID nGameID, uint32 iAchievement ) = 0; + + // Ask the server to send down this user's data and achievements for nGameID + virtual bool RequestCurrentStats( CGameID nGameID ) = 0; + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; +#else + virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0; + virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0; +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; +#else + virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0; + virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0; +#endif + virtual bool UpdateAvgRateStat( CGameID nGameID, const char *pchName, uint32 nCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( CGameID nGameID, const char *pchName ) = 0; + virtual bool ClearAchievement( CGameID nGameID, const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats( CGameID nGameID ) = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( CGameID nGameID, const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( CGameID nGameID, const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( CGameID nGameID, const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + +}; + +#endif // ISTEAMUSER_H diff --git a/src/public SDK/ISteamUserStats003.h b/src/public SDK/ISteamUserStats003.h new file mode 100644 index 0000000..970dd42 --- /dev/null +++ b/src/public SDK/ISteamUserStats003.h @@ -0,0 +1,65 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS003_H +#define ISTEAMUSERSTATS003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + + +abstract_class ISteamUserStats003 +{ +public: + + // Ask the server to send down this user's data and achievements for nGameID + virtual bool RequestCurrentStats( ) = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats( ) = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + +}; + +#endif // ISTEAMUSERSTATS003_H diff --git a/src/public SDK/ISteamUserStats004.h b/src/public SDK/ISteamUserStats004.h new file mode 100644 index 0000000..4497f6a --- /dev/null +++ b/src/public SDK/ISteamUserStats004.h @@ -0,0 +1,77 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS004_H +#define ISTEAMUSERSTATS004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + + +abstract_class ISteamUserStats004 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; +}; + + +#endif // ISTEAMUSERSTATS004 diff --git a/src/public SDK/ISteamUserStats005.h b/src/public SDK/ISteamUserStats005.h new file mode 100644 index 0000000..2e8268d --- /dev/null +++ b/src/public SDK/ISteamUserStats005.h @@ -0,0 +1,137 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS005_H +#define ISTEAMUSERSTATS005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats005 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // If the score passed in is no better than the existing score this user has in the leaderboard, then the leaderboard will not be updated. + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, int32 nScore, int32 *pScoreDetails, int cScoreDetailsCount ) = 0; +}; + + +#endif // ISTEAMUSERSTATS005_H diff --git a/src/public SDK/ISteamUserStats006.h b/src/public SDK/ISteamUserStats006.h new file mode 100644 index 0000000..d8e30d3 --- /dev/null +++ b/src/public SDK/ISteamUserStats006.h @@ -0,0 +1,139 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS006_H +#define ISTEAMUSERSTATS006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats006 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; +}; + +#endif // ISTEAMUSERSTATS006_H diff --git a/src/public SDK/ISteamUserStats007.h b/src/public SDK/ISteamUserStats007.h new file mode 100644 index 0000000..e10372e --- /dev/null +++ b/src/public SDK/ISteamUserStats007.h @@ -0,0 +1,154 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS007_H +#define ISTEAMUSERSTATS007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats007 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Get the achievement status, and the time it was unlocked if unlocked. + // If the return value is true, but the unlock time is zero, that means it was unlocked before Steam + // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. + virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + // + // If the callback has a result of k_EResultInvalidParam, one or more stats + // uploaded has been rejected, either because they broke constraints + // or were out of date. In this case the server sends back updated values. + // The stats should be re-iterated to keep in sync. + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set. + // A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconReady_t callback + // which will notify you when the bits are actually read. If the callback still returns zero, then there is no image set + // and there never will be. + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + // See notes for GetAchievementAndUnlockTime above + virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry001_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; +}; + +#endif // ISTEAMUSERSTATS007_H diff --git a/src/public SDK/ISteamUserStats008.h b/src/public SDK/ISteamUserStats008.h new file mode 100644 index 0000000..955ef55 --- /dev/null +++ b/src/public SDK/ISteamUserStats008.h @@ -0,0 +1,162 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS008_H +#define ISTEAMUSERSTATS008_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats008 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; +#else + virtual bool GetStat( const char *pchName, float *pData ) = 0; + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; +#endif + + // Set / update data +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; +#else + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool SetStat( const char *pchName, int32 nData ) = 0; +#endif + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // most likely a bool return here + virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, RTime32 *prtTime ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + virtual bool StoreStats() = 0; + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name / text, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + + // requests stat information for a user, usable after a successful call to RequestUserStats() +#if !(defined(_WIN32) && defined(__GNUC__)) + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; +#else + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; +#endif + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, RTime32 *prtTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // If the score passed in is no better than the existing score this user has in the leaderboard, then the leaderboard will not be updated. + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; +}; + +#endif // ISTEAMUSERSTATS008_H diff --git a/src/public SDK/ISteamUserStats009.h b/src/public SDK/ISteamUserStats009.h new file mode 100644 index 0000000..fbb57ea --- /dev/null +++ b/src/public SDK/ISteamUserStats009.h @@ -0,0 +1,183 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS009_H +#define ISTEAMUSERSTATS009_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats009 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Get the achievement status, and the time it was unlocked if unlocked. + // If the return value is true, but the unlock time is zero, that means it was unlocked before Steam + // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. + virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + // + // If the callback has a result of k_EResultInvalidParam, one or more stats + // uploaded has been rejected, either because they broke constraints + // or were out of date. In this case the server sends back updated values. + // The stats should be re-iterated to keep in sync. + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set. + // A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback + // which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the + // specified achievement. + virtual int GetAchievementIcon( const char *pchName ) = 0; + // Get general attributes (display name, desc, etc) for an Achievement + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + // See notes for GetAchievementAndUnlockTime above + virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + // as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers + // if a user doesn't have a leaderboard entry, they won't be included in the result + // a max of 100 users can be downloaded at a time, with only one outstanding call at a time + virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, CSteamID *prgUsers, int cUsers ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + // Attaches a piece of user generated content the user's entry on a leaderboard. + // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). + // This call is asynchronous, with the result returned in LeaderboardUGCSet_t. + virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; + +#ifdef _PS3 + // Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t + // callback. + virtual bool InstallPS3Trophies() = 0; + + // Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed + // by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies(). + virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0; + + // On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data. + // At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method. + // If you do not have any user data, call this function with pvData = NULL and cubData = 0 + virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0; + + // Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t + // callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required + // buffer size. + virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0; +#endif +}; + +#endif // ISTEAMUSERSTATS009_H diff --git a/src/public SDK/ISteamUserStats010.h b/src/public SDK/ISteamUserStats010.h new file mode 100644 index 0000000..c953e00 --- /dev/null +++ b/src/public SDK/ISteamUserStats010.h @@ -0,0 +1,221 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS010_H +#define ISTEAMUSERSTATS010_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats010 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Get the achievement status, and the time it was unlocked if unlocked. + // If the return value is true, but the unlock time is zero, that means it was unlocked before Steam + // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. + virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + // + // If the callback has a result of k_EResultInvalidParam, one or more stats + // uploaded has been rejected, either because they broke constraints + // or were out of date. In this case the server sends back updated values. + // The stats should be re-iterated to keep in sync. + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set. + // A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback + // which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the + // specified achievement. + virtual int GetAchievementIcon( const char *pchName ) = 0; + + // Get general attributes for an achievement. Accepts the following keys: + // - "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8) + // - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden) + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + // See notes for GetAchievementAndUnlockTime above + virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + // as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers + // if a user doesn't have a leaderboard entry, they won't be included in the result + // a max of 100 users can be downloaded at a time, with only one outstanding call at a time + virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, CSteamID *prgUsers, int cUsers ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + // Attaches a piece of user generated content the user's entry on a leaderboard. + // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). + // This call is asynchronous, with the result returned in LeaderboardUGCSet_t. + virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; + + // Requests that Steam fetch data on the percentage of players who have received each achievement + // for the game globally. + // This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t. + virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0; + + // Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch + // the next most achieved afterwards. Will return -1 if there is no data on achievement + // percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback). + virtual int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another + // GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last + // achievement has been iterated. + virtual int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Returns the percentage of users who have achieved the specified achievement. + virtual bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) = 0; + + // Requests global stats data, which is available for stats marked as "aggregated". + // This call is asynchronous, with the results returned in GlobalStatsReceived_t. + // nHistoryDays specifies how many days of day-by-day history to retrieve in addition + // to the overall totals. The limit is 60. + virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0; + + // Gets the lifetime totals for an aggregated stat + virtual bool GetGlobalStat( const char *pchStatName, int64 *pData ) = 0; + virtual bool GetGlobalStat( const char *pchStatName, double *pData ) = 0; + + // Gets history for an aggregated stat. pData will be filled with daily values, starting with today. + // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, + // etc. cubData is the size in bytes of the pubData buffer. Returns the number of + // elements actually set. + virtual int32 GetGlobalStatHistory( const char *pchStatName, int64 *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( const char *pchStatName, double *pData, uint32 cubData ) = 0; + +#ifdef _PS3 + // Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t + // callback. + virtual bool InstallPS3Trophies() = 0; + + // Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed + // by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies(). + virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0; + + // On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data. + // At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method. + // If you do not have any user data, call this function with pvData = NULL and cubData = 0 + virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0; + + // Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t + // callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required + // buffer size. + virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0; +#endif +}; + +#endif // ISTEAMUSERSTATS010_H diff --git a/src/public SDK/ISteamUserStats011.h b/src/public SDK/ISteamUserStats011.h new file mode 100644 index 0000000..c76afe2 --- /dev/null +++ b/src/public SDK/ISteamUserStats011.h @@ -0,0 +1,227 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUSERSTATS011_H +#define ISTEAMUSERSTATS011_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UserStatsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Functions for accessing stats, achievements, and leaderboard information +//----------------------------------------------------------------------------- +abstract_class ISteamUserStats011 +{ +public: + // Ask the server to send down this user's data and achievements for this game + virtual bool RequestCurrentStats() = 0; + + // Data accessors + virtual bool GetStat( const char *pchName, int32 *pData ) = 0; + virtual bool GetStat( const char *pchName, float *pData ) = 0; + + // Set / update data + virtual bool SetStat( const char *pchName, int32 nData ) = 0; + virtual bool SetStat( const char *pchName, float fData ) = 0; + virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0; + + // Achievement flag accessors + virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0; + virtual bool SetAchievement( const char *pchName ) = 0; + virtual bool ClearAchievement( const char *pchName ) = 0; + + // Get the achievement status, and the time it was unlocked if unlocked. + // If the return value is true, but the unlock time is zero, that means it was unlocked before Steam + // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. + virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Store the current data on the server, will get a callback when set + // And one callback for every new achievement + // + // If the callback has a result of k_EResultInvalidParam, one or more stats + // uploaded has been rejected, either because they broke constraints + // or were out of date. In this case the server sends back updated values. + // The stats should be re-iterated to keep in sync. + virtual bool StoreStats() = 0; + + // Achievement / GroupAchievement metadata + + // Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set. + // A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback + // which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the + // specified achievement. + virtual int GetAchievementIcon( const char *pchName ) = 0; + + // Get general attributes for an achievement. Accepts the following keys: + // - "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8) + // - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden) + virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0; + + // Achievement progress - triggers an AchievementProgress callback, that is all. + // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. + virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0; + + // Used for iterating achievements. In general games should not need these functions because they should have a + // list of existing achievements compiled into them + virtual uint32 GetNumAchievements() = 0; + // Get achievement name iAchievement in [0,GetNumAchievements) + virtual const char *GetAchievementName( uint32 iAchievement ) = 0; + + // Friends stats & achievements + + // downloads stats for the user + // returns a UserStatsReceived_t received when completed + // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail + // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data + virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; + + // requests stat information for a user, usable after a successful call to RequestUserStats() + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; + virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; + virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; + // See notes for GetAchievementAndUnlockTime above + virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0; + + // Reset stats + virtual bool ResetAllStats( bool bAchievementsToo ) = 0; + + // Leaderboard functions + + // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; + + // as above, but won't create the leaderboard if it's not found + // This call is asynchronous, with the result returned in LeaderboardFindResult_t + virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; + + // returns the name of a leaderboard + virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the total number of entries in a leaderboard, as of the last request + virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the sort method of the leaderboard + virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // returns the display type of the leaderboard + virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0; + + // Asks the Steam back-end for a set of rows in the leaderboard. + // This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t + // LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) + // You can ask for more entries than exist, and it will return as many as do exist. + // k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] + // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate + // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after + // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user + virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; + // as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers + // if a user doesn't have a leaderboard entry, they won't be included in the result + // a max of 100 users can be downloaded at a time, with only one outstanding call at a time + virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, CSteamID *prgUsers, int cUsers ) = 0; + + // Returns data about a single leaderboard entry + // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries + // e.g. + // void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) + // { + // for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) + // { + // LeaderboardEntry_t leaderboardEntry; + // int32 details[3]; // we know this is how many we've stored previously + // GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); + // assert( leaderboardEntry.m_cDetails == 3 ); + // ... + // } + // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid + virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0; + + // Uploads a user score to the Steam back-end. + // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t + // Details are extra game-defined information regarding how the user got that score + // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list + virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; + + // Attaches a piece of user generated content the user's entry on a leaderboard. + // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). + // This call is asynchronous, with the result returned in LeaderboardUGCSet_t. + virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; + + // Retrieves the number of players currently playing your game (online + offline) + // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t + virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; + + // Requests that Steam fetch data on the percentage of players who have received each achievement + // for the game globally. + // This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t. + virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0; + + // Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch + // the next most achieved afterwards. Will return -1 if there is no data on achievement + // percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback). + virtual int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another + // GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last + // achievement has been iterated. + virtual int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0; + + // Returns the percentage of users who have achieved the specified achievement. + virtual bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) = 0; + + // Requests global stats data, which is available for stats marked as "aggregated". + // This call is asynchronous, with the results returned in GlobalStatsReceived_t. + // nHistoryDays specifies how many days of day-by-day history to retrieve in addition + // to the overall totals. The limit is 60. + virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0; + + // Gets the lifetime totals for an aggregated stat + virtual bool GetGlobalStat( const char *pchStatName, int64 *pData ) = 0; + virtual bool GetGlobalStat( const char *pchStatName, double *pData ) = 0; + + // Gets history for an aggregated stat. pData will be filled with daily values, starting with today. + // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, + // etc. cubData is the size in bytes of the pubData buffer. Returns the number of + // elements actually set. + virtual int32 GetGlobalStatHistory( const char *pchStatName, int64 *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( const char *pchStatName, double *pData, uint32 cubData ) = 0; + +#ifdef _PS3 + // Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t + // callback. + virtual bool InstallPS3Trophies() = 0; + + // Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed + // by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies(). + virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0; + + // On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data. + // At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method. + // If you do not have any user data, call this function with pvData = NULL and cubData = 0 + virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0; + + // Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t + // callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required + // buffer size. + virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0; +#endif +}; + +#endif // ISTEAMUSERSTATS011_H diff --git a/src/public SDK/ISteamUtils001.h b/src/public SDK/ISteamUtils001.h new file mode 100644 index 0000000..678dbcb --- /dev/null +++ b/src/public SDK/ISteamUtils001.h @@ -0,0 +1,44 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS001_H +#define ISTEAMUTILS001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils001 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; +}; + +#endif // ISTEAMUTILS001_H + diff --git a/src/public SDK/ISteamUtils002.h b/src/public SDK/ISteamUtils002.h new file mode 100644 index 0000000..551a0ce --- /dev/null +++ b/src/public SDK/ISteamUtils002.h @@ -0,0 +1,75 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS002_H +#define ISTEAMUTILS002_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils002 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; +}; + + +#endif // ISTEAMUTILS002_H diff --git a/src/public SDK/ISteamUtils003.h b/src/public SDK/ISteamUtils003.h new file mode 100644 index 0000000..22390d2 --- /dev/null +++ b/src/public SDK/ISteamUtils003.h @@ -0,0 +1,87 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS003_H +#define ISTEAMUTILS003_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +abstract_class ISteamUtils003 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; +}; + +#endif // ISTEAMUTILS003_H diff --git a/src/public SDK/ISteamUtils004.h b/src/public SDK/ISteamUtils004.h new file mode 100644 index 0000000..e4db1da --- /dev/null +++ b/src/public SDK/ISteamUtils004.h @@ -0,0 +1,94 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS004_H +#define ISTEAMUTILS004_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils004 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; +}; + +#endif // ISTEAMUTILS004_H diff --git a/src/public SDK/ISteamUtils005.h b/src/public SDK/ISteamUtils005.h new file mode 100644 index 0000000..9431937 --- /dev/null +++ b/src/public SDK/ISteamUtils005.h @@ -0,0 +1,134 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS005_H +#define ISTEAMUTILS005_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils005 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; + + // Normally this call is unneeded if your game has a constantly running frame loop that calls the + // D3D Present API, or OGL SwapBuffers API every frame. + // + // However, if you have a game that only refreshes the screen on an event driven basis then that can break + // the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + // need to Present() to the screen any time an even needing a notification happens or when the overlay is + // brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + // in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + virtual bool BOverlayNeedsPresent() = 0; + +#ifndef _PS3 + // Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + // of the partner site, for example to refuse to load modified executable files. + // The result is returned in CheckFileSignature_t. + // k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function. + // k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site. + // k_ECheckFileSignatureFileNotFound - The file does not exist on disk. + // k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match. + // k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid. + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; +#endif + +#ifdef _PS3 + virtual void PostPS3SysutilCallback( uint64_t status, uint64_t param, void* userdata ) = 0; + virtual bool BIsReadyToShutdown() = 0; + virtual bool BIsPSNOnline() = 0; + + // Call this with localized strings for the language the game is running in, otherwise default english + // strings will be used by Steam. + virtual void SetPSNGameBootInviteStrings( const char *pchSubject, const char *pchBody ) = 0; +#endif + + // Activates the Big Picture text input dialog which only supports gamepad input + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax ) = 0; + + // Returns previously entered text & length + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0; +}; + +#endif // ISTEAMUTILS005_H diff --git a/src/public SDK/ISteamUtils006.h b/src/public SDK/ISteamUtils006.h new file mode 100644 index 0000000..4dac353 --- /dev/null +++ b/src/public SDK/ISteamUtils006.h @@ -0,0 +1,140 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS006_H +#define ISTEAMUTILS006_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils006 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; + + // Normally this call is unneeded if your game has a constantly running frame loop that calls the + // D3D Present API, or OGL SwapBuffers API every frame. + // + // However, if you have a game that only refreshes the screen on an event driven basis then that can break + // the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + // need to Present() to the screen any time an even needing a notification happens or when the overlay is + // brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + // in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + virtual bool BOverlayNeedsPresent() = 0; + +#ifndef _PS3 + // Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + // of the partner site, for example to refuse to load modified executable files. + // The result is returned in CheckFileSignature_t. + // k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function. + // k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site. + // k_ECheckFileSignatureFileNotFound - The file does not exist on disk. + // k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match. + // k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid. + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; +#endif + +#ifdef _PS3 + virtual void PostPS3SysutilCallback( uint64_t status, uint64_t param, void* userdata ) = 0; + virtual bool BIsReadyToShutdown() = 0; + virtual bool BIsPSNOnline() = 0; + + // Call this with localized strings for the language the game is running in, otherwise default english + // strings will be used by Steam. + virtual void SetPSNGameBootInviteStrings( const char *pchSubject, const char *pchBody ) = 0; +#endif + + // Activates the Big Picture text input dialog which only supports gamepad input + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax ) = 0; + + // Returns previously entered text & length + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0; + + // returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases + virtual const char *GetSteamUILanguage() = 0; + + // returns true if Steam itself is running in VR mode + virtual bool IsSteamRunningInVR() = 0; +}; + +#endif // ISTEAMUTILS006_H diff --git a/src/public SDK/ISteamUtils007.h b/src/public SDK/ISteamUtils007.h new file mode 100644 index 0000000..df74252 --- /dev/null +++ b/src/public SDK/ISteamUtils007.h @@ -0,0 +1,143 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef ISTEAMUTILS007_H +#define ISTEAMUTILS007_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "UtilsCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: interface to user independent utility functions +//----------------------------------------------------------------------------- +abstract_class ISteamUtils007 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // this needs to be called every frame to process matchmaking results + // redundant if you're already calling SteamAPI_RunCallbacks() + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; + + // Normally this call is unneeded if your game has a constantly running frame loop that calls the + // D3D Present API, or OGL SwapBuffers API every frame. + // + // However, if you have a game that only refreshes the screen on an event driven basis then that can break + // the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + // need to Present() to the screen any time an even needing a notification happens or when the overlay is + // brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + // in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + virtual bool BOverlayNeedsPresent() = 0; + +#ifndef _PS3 + // Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + // of the partner site, for example to refuse to load modified executable files. + // The result is returned in CheckFileSignature_t. + // k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function. + // k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site. + // k_ECheckFileSignatureFileNotFound - The file does not exist on disk. + // k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match. + // k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid. + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; +#endif + +#ifdef _PS3 + virtual void PostPS3SysutilCallback( uint64_t status, uint64_t param, void* userdata ) = 0; + virtual bool BIsReadyToShutdown() = 0; + virtual bool BIsPSNOnline() = 0; + + // Call this with localized strings for the language the game is running in, otherwise default english + // strings will be used by Steam. + virtual void SetPSNGameBootInviteStrings( const char *pchSubject, const char *pchBody ) = 0; +#endif + + // Activates the Big Picture text input dialog which only supports gamepad input + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0; + + // Returns previously entered text & length + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0; + + // returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases + virtual const char *GetSteamUILanguage() = 0; + + // returns true if Steam itself is running in VR mode + virtual bool IsSteamRunningInVR() = 0; + + // Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition. + virtual void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) = 0; +}; + +#endif // ISTEAMUTILS007_H diff --git a/src/public SDK/ISteamUtils008.h b/src/public SDK/ISteamUtils008.h new file mode 100644 index 0000000..704f460 --- /dev/null +++ b/src/public SDK/ISteamUtils008.h @@ -0,0 +1,112 @@ +#include "UtilsCommon.h" +#include "SteamTypes.h" + +class ISteamUtils008 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // Deprecated. Applications should use SteamAPI_RunCallbacks() instead. Game servers do not need to call this function. + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; + + // Normally this call is unneeded if your game has a constantly running frame loop that calls the + // D3D Present API, or OGL SwapBuffers API every frame. + // + // However, if you have a game that only refreshes the screen on an event driven basis then that can break + // the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + // need to Present() to the screen any time an even needing a notification happens or when the overlay is + // brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + // in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + virtual bool BOverlayNeedsPresent() = 0; + + // Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + // of the partner site, for example to refuse to load modified executable files. + // The result is returned in CheckFileSignature_t. + // k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function. + // k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site. + // k_ECheckFileSignatureFileNotFound - The file does not exist on disk. + // k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match. + // k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid. + + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; + + // Activates the Big Picture text input dialog which only supports gamepad input + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0; + + // Returns previously entered text & length + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0; + + // returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases + virtual const char *GetSteamUILanguage() = 0; + + // returns true if Steam itself is running in VR mode + virtual bool IsSteamRunningInVR() = 0; + + // Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition. + virtual void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) = 0; + + // returns true if Steam & the Steam Overlay are running in Big Picture mode + // Games much be launched through the Steam client to enable the Big Picture overlay. During development, + // a game can be added as a non-steam game to the developers library to test this feature + virtual bool IsSteamInBigPictureMode() = 0; + + // ask SteamUI to create and render its OpenVR dashboard + virtual void StartVRDashboard() = 0; +}; diff --git a/src/public SDK/ISteamUtils009.h b/src/public SDK/ISteamUtils009.h new file mode 100644 index 0000000..fc146af --- /dev/null +++ b/src/public SDK/ISteamUtils009.h @@ -0,0 +1,121 @@ +#include "UtilsCommon.h" +#include "SteamTypes.h" + +class ISteamUtils009 +{ +public: + // return the number of seconds since the user + virtual uint32 GetSecondsSinceAppActive() = 0; + virtual uint32 GetSecondsSinceComputerActive() = 0; + + // the universe this client is connecting to + virtual EUniverse GetConnectedUniverse() = 0; + + // Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time) + virtual uint32 GetServerRealTime() = 0; + + // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + // e.g "US" or "UK". + virtual const char *GetIPCountry() = 0; + + // returns true if the image exists, and valid sizes were filled out + virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0; + + // returns true if the image exists, and the buffer was successfully filled out + // results are returned in RGBA format + // the destination buffer size should be 4 * height * width * sizeof(char) + virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; + + // returns the IP of the reporting server for valve - currently only used in Source engine games + virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + + // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power + virtual uint8 GetCurrentBatteryPower() = 0; + + // returns the appID of the current process + virtual uint32 GetAppID() = 0; + + // Sets the position where the overlay instance for the currently calling game should show notifications. + // This position is per-game and if this function is called from outside of a game context it will do nothing. + virtual void SetOverlayNotificationPosition( ENotificationPosition eNotificationPosition ) = 0; + + // API asynchronous call results + // can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) + virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0; + virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0; + virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0; + + // Deprecated. Applications should use SteamAPI_RunCallbacks() instead. Game servers do not need to call this function. + virtual void RunFrame() = 0; + + // returns the number of IPC calls made since the last time this function was called + // Used for perf debugging so you can understand how many IPC calls your game makes per frame + // Every IPC call is at minimum a thread context switch if not a process one so you want to rate + // control how often you do them. + virtual uint32 GetIPCCallCount() = 0; + + // API warning handling + // 'int' is the severity; 0 for msg, 1 for warning + // 'const char *' is the text of the message + // callbacks will occur directly after the API function is called that generated the warning or message + virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0; + + // Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to + // start & hook the game process, so this function will initially return false while the overlay is loading. + virtual bool IsOverlayEnabled() = 0; + + // Normally this call is unneeded if your game has a constantly running frame loop that calls the + // D3D Present API, or OGL SwapBuffers API every frame. + // + // However, if you have a game that only refreshes the screen on an event driven basis then that can break + // the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + // need to Present() to the screen any time an even needing a notification happens or when the overlay is + // brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + // in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + // refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + virtual bool BOverlayNeedsPresent() = 0; + + // Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + // of the partner site, for example to refuse to load modified executable files. + // The result is returned in CheckFileSignature_t. + // k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function. + // k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site. + // k_ECheckFileSignatureFileNotFound - The file does not exist on disk. + // k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match. + // k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid. + virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; + + // Activates the Big Picture text input dialog which only supports gamepad input + virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0; + + // Returns previously entered text & length + virtual uint32 GetEnteredGamepadTextLength() = 0; + virtual bool GetEnteredGamepadTextInput( char *pchText, uint32 cchText ) = 0; + + // returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases + virtual const char *GetSteamUILanguage() = 0; + + // returns true if Steam itself is running in VR mode + virtual bool IsSteamRunningInVR() = 0; + + // Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition. + virtual void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) = 0; + + // returns true if Steam & the Steam Overlay are running in Big Picture mode + // Games much be launched through the Steam client to enable the Big Picture overlay. During development, + // a game can be added as a non-steam game to the developers library to test this feature + virtual bool IsSteamInBigPictureMode() = 0; + + // ask SteamUI to create and render its OpenVR dashboard + virtual void StartVRDashboard() = 0; + + // Returns true if the HMD content will be streamed via Steam In-Home Streaming + virtual bool IsVRHeadsetStreamingEnabled() = 0; + + // Set whether the HMD content will be streamed via Steam In-Home Streaming + // If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed. + // If this is set to false, then the application window will be streamed instead, and remote input will be allowed. + // The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game. + // (this is useful for games that have asymmetric multiplayer gameplay) + virtual void SetVRHeadsetStreamingEnabled( bool bEnabled ) = 0; +}; \ No newline at end of file diff --git a/src/public SDK/ISteamVideo001.h b/src/public SDK/ISteamVideo001.h new file mode 100644 index 0000000..df4a1e0 --- /dev/null +++ b/src/public SDK/ISteamVideo001.h @@ -0,0 +1,31 @@ +//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. ======= +// +// Purpose: interface to app data in Steam +// +//============================================================================= + +#ifndef ISTEAMVIDEO001_H +#define ISTEAMVIDEO001_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" +#include "VideoCommon.h" + +//----------------------------------------------------------------------------- +// Purpose: Steam Video API +//----------------------------------------------------------------------------- +class ISteamVideo001 +{ +public: + + // Get a URL suitable for streaming the given Video app ID's video + virtual void GetVideoURL( AppId_t unVideoAppID ) = 0; + + // returns true if user is uploading a live broadcast + virtual bool IsBroadcasting( int *pnNumViewers ) = 0; +}; + + +#endif // ISTEAMVIDEO001_H diff --git a/src/public SDK/ISteamVideo002.h b/src/public SDK/ISteamVideo002.h new file mode 100644 index 0000000..5094c84 --- /dev/null +++ b/src/public SDK/ISteamVideo002.h @@ -0,0 +1,17 @@ +#include "SteamTypes.h" +#include "VideoCommon.h" + +class ISteamVideo002 +{ +public: + + // Get a URL suitable for streaming the given Video app ID's video + virtual void GetVideoURL( AppId_t unVideoAppID ) = 0; + + // returns true if user is uploading a live broadcast + virtual bool IsBroadcasting( int *pnNumViewers ) = 0; + + // Get the OPF Details for 360 Video Playback + virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0; + virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0; +}; \ No newline at end of file diff --git a/src/public SDK/Interface_OSW.h b/src/public SDK/Interface_OSW.h new file mode 100644 index 0000000..2554268 --- /dev/null +++ b/src/public SDK/Interface_OSW.h @@ -0,0 +1,227 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#if !defined(INTERFACEOSW_H) && !defined(_S4N_) +#define INTERFACEOSW_H +#ifdef _WIN32 +#pragma once +#endif + + + +#ifdef _WIN32 + #include "Win32Library.h" + + static const int k_iPathMaxSize = MAX_PATH; + static const char* k_cszSteam2LibraryName = "steam.dll"; + static const char* k_cszSteam3LibraryName = "steamclient.dll"; +#elif defined(__APPLE_CC__) + #include "POSIXLibrary.h" + #include + #include + + static const int k_iPathMaxSize = MAXPATHLEN; + static const char* k_cszSteam2LibraryName = "libsteam.dylib"; + static const char* k_cszSteam3LibraryName = "steamclient.dylib"; +#elif defined(__linux__) + #include "POSIXLibrary.h" + #include + #include + + static const int k_iPathMaxSize = PATH_MAX; + static const char* k_cszSteam2LibraryName = "libsteam.so"; + static const char* k_cszSteam3LibraryName = "steamclient.so"; +#else + #error Unsupported platform +#endif + + +class CSteamAPILoader +{ +public: + enum ESearchOrder + { + k_ESearchOrderLocalFirst, + k_ESearchOrderSteamInstallFirst, + }; + + CSteamAPILoader(ESearchOrder eSearchOrder = k_ESearchOrderLocalFirst) + { + m_eSearchOrder = eSearchOrder; + m_pSteamclient = NULL; + m_pSteam = NULL; + + TryGetSteamDir(); + TryLoadLibraries(); + } + + ~CSteamAPILoader() + { + if(m_pSteamclient) + delete m_pSteamclient; + if(m_pSteam) + delete m_pSteam; + } + + CreateInterfaceFn GetSteam3Factory() + { + return (CreateInterfaceFn)m_pSteamclient->GetSymbol("CreateInterface"); + } + + FactoryFn GetSteam2Factory() + { + return (FactoryFn)m_pSteam->GetSymbol("_f"); + } + + const char* GetSteamDir() + { + return m_szSteamPath; + } + + const DynamicLibrary *GetSteamClientModule() + { + return m_pSteamclient; + } + const DynamicLibrary *GetSteamModule() + { + return m_pSteam; + } + + CreateInterfaceFn STEAMWORKS_DEPRECATE("This function is provided for backward compatiblity. Please use GetSteam3Factory instead") Load() + { + return GetSteam3Factory(); + } + + FactoryFn STEAMWORKS_DEPRECATE("This function is provided for backward compatiblity. Please use GetSteam2Factory instead") LoadFactory() + { + return GetSteam2Factory(); + } + +private: + +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4996) +#endif + + void TryGetSteamDir() + { +#ifdef _WIN32 + HKEY hRegKey; + + bool bFallback = true; + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS) + { + DWORD dwLength = sizeof(m_szSteamPath) - 1; + if(RegQueryValueExA(hRegKey, "InstallPath", NULL, NULL, (BYTE*)m_szSteamPath, &dwLength) == ERROR_SUCCESS) + { + m_szSteamPath[dwLength] = '\0'; + bFallback = false; + } + RegCloseKey(hRegKey); + } + + if(bFallback) + { + strcpy(m_szSteamPath, "."); + } +#elif defined(__APPLE_CC__) + CFURLRef url; + OSStatus err = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR("com.valvesoftware.steam"), NULL, NULL, &url); + + bool bFallback = true; + + if(err == noErr) + { + if(CFURLGetFileSystemRepresentation(url, true, (UInt8*)m_szSteamPath, sizeof(m_szSteamPath))) + { + strncat(m_szSteamPath, "/Contents/MacOS/osx32/", sizeof(m_szSteamPath)); + bFallback = false; + } + } + CFRelease(url); + + if(bFallback) + { + strcpy(m_szSteamPath, "."); + } +#elif defined(__linux__) + // We don't know where to find Steam on this platform, so we're going + // to say it lives in the same directory as our executable + if(readlink("/proc/self/exe", m_szSteamPath, sizeof(m_szSteamPath)) != -1) + { + char *pchSlash = strrchr(m_szSteamPath, '/'); + + if(pchSlash) + { + *pchSlash = '\0'; + return; + } + } + + strcpy(m_szSteamPath, "."); +#endif + } + + void TryLoadLibraries() + { + if(m_eSearchOrder == k_ESearchOrderLocalFirst) + { + m_pSteamclient = new DynamicLibrary(k_cszSteam3LibraryName); + m_pSteam = new DynamicLibrary(k_cszSteam2LibraryName); + + if(!m_pSteamclient->IsLoaded() || !m_pSteam->IsLoaded()) + { + delete m_pSteamclient; + m_pSteamclient = NULL; + + delete m_pSteam; + m_pSteam = NULL; + } + else + return; + } + +#ifdef _WIN32 + // steamclient.dll expects to be able to load tier0_s without an absolute + // path, so we'll need to add the steam dir to the search path. + SetDllDirectoryA( m_szSteamPath ); +#endif + + char szLibraryPath[k_iPathMaxSize]; + szLibraryPath[sizeof(szLibraryPath) - 1] = '\0'; + + snprintf(szLibraryPath, sizeof(szLibraryPath) - 1, "%s/%s", m_szSteamPath, k_cszSteam3LibraryName); + m_pSteamclient = new DynamicLibrary(szLibraryPath); + + snprintf(szLibraryPath, sizeof(szLibraryPath) - 1, "%s/%s", m_szSteamPath, k_cszSteam2LibraryName); + m_pSteam = new DynamicLibrary(szLibraryPath); + } + + + char m_szSteamPath[k_iPathMaxSize]; + + DynamicLibrary* m_pSteamclient; + DynamicLibrary* m_pSteam; + + ESearchOrder m_eSearchOrder; +}; + +#ifdef _MSC_VER + #pragma warning(pop) +#endif + +#endif // INTERFACEOSW_H diff --git a/src/public SDK/InventoryCommon.h b/src/public SDK/InventoryCommon.h new file mode 100644 index 0000000..1ebe76d --- /dev/null +++ b/src/public SDK/InventoryCommon.h @@ -0,0 +1,109 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef INVENTORYCOMMON_H +#define INVENTORYCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define STEAMINVENTORY_INTERFACE_VERSION_001 "STEAMINVENTORY_INTERFACE_V001" +#define STEAMINVENTORY_INTERFACE_VERSION_002 "STEAMINVENTORY_INTERFACE_V002" +#define STEAMINVENTORY_INTERFACE_VERSION_003 "STEAMINVENTORY_INTERFACE_V003" + +typedef int32 SteamInventoryResult_t; +typedef uint64 SteamInventoryUpdateHandle_t; +const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffffull; +static const SteamInventoryResult_t k_SteamInventoryResultInvalid = -1; + + +// Every individual instance of an item has a globally-unique ItemInstanceID. +// This ID is unique to the combination of (player, specific item instance) +// and will not be transferred to another player or re-used for another item. +typedef uint64 SteamItemInstanceID_t; + +static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = ~(SteamItemInstanceID_t)0; + +// Types of items in your game are identified by a 32-bit "item definition number". +// Valid definition numbers are between 1 and 999999999; numbers less than or equal to +// zero are invalid, and numbers greater than or equal to one billion (1x10^9) are +// reserved for internal Steam use. +typedef int32 SteamItemDef_t; + + +#pragma pack( push, 8 ) + + +enum ESteamItemFlags +{ + // Item status flags - these flags are permanently attached to specific item instances + k_ESteamItemNoTrade = 1 << 0, // This item is account-locked and cannot be traded or given away. + + // Action confirmation flags - these flags are set one time only, as part of a result set + k_ESteamItemRemoved = 1 << 8, // The item has been destroyed, traded away, expired, or otherwise invalidated + k_ESteamItemConsumed = 1 << 9, // The item quantity has been decreased by 1 via ConsumeItem API. + + // All other flag bits are currently reserved for internal Steam use at this time. + // Do not assume anything about the state of other flags which are not defined here. +}; + +struct SteamItemDetails_t +{ + SteamItemInstanceID_t m_itemId; + SteamItemDef_t m_iDefinition; + uint16 m_unQuantity; + uint16 m_unFlags; // see ESteamItemFlags +}; + +// SteamInventoryResultReady_t callbacks are fired whenever asynchronous +// results transition from "Pending" to "OK" or an error state. There will +// always be exactly one callback per handle. +struct SteamInventoryResultReady_t +{ + enum { k_iCallback = k_iClientInventoryCallbacks + 0 }; + SteamInventoryResult_t m_handle; + EResult m_result; +}; + + +// SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems +// successfully returns a result which is newer / fresher than the last +// known result. (It will not trigger if the inventory hasn't changed, +// or if results from two overlapping calls are reversed in flight and +// the earlier result is already known to be stale/out-of-date.) +// The normal ResultReady callback will still be triggered immediately +// afterwards; this is an additional notification for your convenience. +struct SteamInventoryFullUpdate_t +{ + enum { k_iCallback = k_iClientInventoryCallbacks + 1 }; + SteamInventoryResult_t m_handle; +}; + + +// A SteamInventoryDefinitionUpdate_t callback is triggered whenever +// item definitions have been updated, which could be in response to +// LoadItemDefinitions() or any other async request which required +// a definition update in order to process results from the server. +struct SteamInventoryDefinitionUpdate_t +{ + enum { k_iCallback = k_iClientInventoryCallbacks + 2 }; +}; + +#pragma pack( pop ) + + +#endif // INVENTORYCOMMON_H diff --git a/src/public SDK/MasterServerUpdaterCommon.h b/src/public SDK/MasterServerUpdaterCommon.h new file mode 100644 index 0000000..177a476 --- /dev/null +++ b/src/public SDK/MasterServerUpdaterCommon.h @@ -0,0 +1,33 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MASTERSERVERUPDATERCOMMON_H +#define MASTERSERVERUPDATERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define CLIENTMASTERSERVERUPDATER_INTERFACE_VERSION "CLIENTMASTERSERVERUPDATER_INTERFACE_VERSION001" + +#define STEAMMASTERSERVERUPDATER_INTERFACE_VERSION_001 "SteamMasterServerUpdater001" + + + +#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1) + + + +#endif // MASTERSERVERUPDATERCOMMON_H diff --git a/src/public SDK/MatchMakingKeyValuePair.h b/src/public SDK/MatchMakingKeyValuePair.h new file mode 100644 index 0000000..b4633cf --- /dev/null +++ b/src/public SDK/MatchMakingKeyValuePair.h @@ -0,0 +1,58 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MATCHMAKINGKEYVALUEPAIR_H +#define MATCHMAKINGKEYVALUEPAIR_H +#ifdef _WIN32 +#pragma once +#endif + +#ifdef _S4N_ + #define strncpy(...) +#else + #include + #include +#endif + +struct MatchMakingKeyValuePair_t +{ + MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; } + + + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4996) + #endif + + MatchMakingKeyValuePair_t( const char *pchKey, const char *pchValue ) + { + strncpy( m_szKey, pchKey, sizeof(m_szKey) ); // this is a public header, use basic c library string funcs only! + m_szKey[ sizeof( m_szKey ) - 1 ] = '\0'; + strncpy( m_szValue, pchValue, sizeof(m_szValue) ); + m_szValue[ sizeof( m_szValue ) - 1 ] = '\0'; + } + + #ifdef _MSC_VER + #pragma warning(pop) + #endif + + char m_szKey[ 256 ]; + char m_szValue[ 256 ]; +}; + + + +#endif // MATCHMAKINGKEYVALUEPAIR_H diff --git a/src/public SDK/MatchmakingCommon.h b/src/public SDK/MatchmakingCommon.h new file mode 100644 index 0000000..41edf16 --- /dev/null +++ b/src/public SDK/MatchmakingCommon.h @@ -0,0 +1,324 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MATCHMAKINGCOMMON_H +#define MATCHMAKINGCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#include "FriendsCommon.h" + + + +#define CLIENTMATCHMAKING_INTERFACE_VERSION "CLIENTMATCHMAKING_INTERFACE_VERSION001" + +#define STEAMMATCHMAKING_INTERFACE_VERSION_001 "SteamMatchMaking001" +#define STEAMMATCHMAKING_INTERFACE_VERSION_002 "SteamMatchMaking002" +#define STEAMMATCHMAKING_INTERFACE_VERSION_003 "SteamMatchMaking003" +#define STEAMMATCHMAKING_INTERFACE_VERSION_004 "SteamMatchMaking004" +#define STEAMMATCHMAKING_INTERFACE_VERSION_005 "SteamMatchMaking005" +#define STEAMMATCHMAKING_INTERFACE_VERSION_006 "SteamMatchMaking006" +#define STEAMMATCHMAKING_INTERFACE_VERSION_007 "SteamMatchMaking007" +#define STEAMMATCHMAKING_INTERFACE_VERSION_008 "SteamMatchMaking008" +#define STEAMMATCHMAKING_INTERFACE_VERSION_009 "SteamMatchMaking009" + + + +// lobby search filter tools +enum ELobbyComparison +{ + k_ELobbyComparisonEqualToOrLessThan = -2, + k_ELobbyComparisonLessThan = -1, + k_ELobbyComparisonEqual = 0, + k_ELobbyComparisonGreaterThan = 1, + k_ELobbyComparisonEqualToOrGreaterThan = 2, + k_ELobbyComparisonNotEqual = 3, +}; + + +// lobby search distance +enum ELobbyDistanceFilter +{ + k_ELobbyDistanceFilterClose, // only lobbies in the same immediate region will be returned + k_ELobbyDistanceFilterDefault, // only lobbies in the same region or close, but looking further if the current region has infrequent lobby activity (the default) + k_ELobbyDistanceFilterFar, // for games that don't have many latency requirements, will return lobbies about half-way around the globe + k_ELobbyDistanceFilterWorldwide, // no filtering, will match lobbies as far as India to NY (not recommended, expect multiple seconds of latency between the clients) +}; + +// maximum number of characters a lobby metadata key can be +#define k_nMaxLobbyKeyLength 255 + +typedef int HServerQuery; +const int HSERVERQUERY_INVALID = 0xffffffff; + +// game server flags +const uint32 k_unFavoriteFlagNone = 0x00; +const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list +const uint32 k_unFavoriteFlagHistory = 0x02; // this game favorite entry is for the history list + + +#pragma pack( push, 8 ) + +//----------------------------------------------------------------------------- +// Purpose: a server was added/removed from the favorites list, you should refresh now +//----------------------------------------------------------------------------- +struct FavoritesListChangedOld_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 1 }; +}; + +//----------------------------------------------------------------------------- +// Purpose: a server was added/removed from the favorites list, you should refresh now +//----------------------------------------------------------------------------- +struct FavoritesListChanged_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 2 }; + + uint32 m_nIP; // an IP of 0 means reload the whole list, any other value means just one server + uint32 m_nQueryPort; + uint32 m_nConnPort; + AppId_t m_nAppID; + uint32 m_nFlags; + bool m_bAdd; // true if this is adding the entry, otherwise it is a remove + AccountID_t m_unAccountId; +}; + +//----------------------------------------------------------------------------- +// Purpose: Someone has invited you to join a Lobby +// normally you don't need to do anything with this, since +// the Steam UI will also display a ' has invited you to the lobby, join?' dialog +// +// if the user outside a game chooses to join, your game will be launched with the parameter "+connect_lobby <64-bit lobby id>", +// or with the callback GameLobbyJoinRequested_t if they're already in-game +//----------------------------------------------------------------------------- +struct LobbyInvite_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 3 }; + + CSteamID m_ulSteamIDUser; // Steam ID of the person making the invite + CSteamID m_ulSteamIDLobby; // Steam ID of the Lobby + CGameID m_ulGameID; // GameID of the Lobby +}; + + +//----------------------------------------------------------------------------- +// Purpose: Sent on entering a lobby, or on failing to enter +// m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success, +// or a higher value on failure (see enum EChatRoomEnterResponse) +//----------------------------------------------------------------------------- +struct LobbyEnter_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 4 }; + + CSteamID m_ulSteamIDLobby; // SteamID of the Lobby you have entered + EChatPermission m_rgfChatPermissions; // Permissions of the current user + bool m_bLocked; // If true, then only invited users may join + EChatRoomEnterResponse m_EChatRoomEnterResponse; // EChatRoomEnterResponse +}; + + +//----------------------------------------------------------------------------- +// Purpose: The lobby metadata has changed +// if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details +// if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata +//----------------------------------------------------------------------------- +struct LobbyDataUpdate_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 5 }; + + CSteamID m_ulSteamIDLobby; // steamID of the Lobby + CSteamID m_ulSteamIDMember; // steamID of the member whose data changed, or the room itself + uint8 m_bSuccess; +}; + +//----------------------------------------------------------------------------- +// Purpose: The lobby chat room state has changed +// this is usually sent when a user has joined or left the lobby +//----------------------------------------------------------------------------- +struct LobbyChatUpdate_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 6 }; + + CSteamID m_ulSteamIDLobby; // Lobby ID + CSteamID m_ulSteamIDUserChanged; // user who's status in the lobby just changed - can be recipient + CSteamID m_ulSteamIDMakingChange; // Chat member who made the change (different from SteamIDUserChange if kicking, muting, etc.) + // for example, if one user kicks another from the lobby, this will be set to the id of the user who initiated the kick + EChatMemberStateChange m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values +}; + + +//----------------------------------------------------------------------------- +// Purpose: A chat message for this lobby has been sent +// use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message +//----------------------------------------------------------------------------- +struct LobbyChatMsg_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 7 }; + + uint64 m_ulSteamIDLobby; // the lobby id this is in + uint64 m_ulSteamIDUser; // steamID of the user who has sent this message + uint8 m_eChatEntryType; // type of message + uint32 m_iChatID; // index of the chat entry to lookup +}; + +//----------------------------------------------------------------------------- +// Purpose: There's a change of Admin in this Lobby +//----------------------------------------------------------------------------- +struct OBSOLETE_CALLBACK LobbyAdminChange_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 8 }; + + CSteamID m_ulSteamIDLobby; + CSteamID m_ulSteamIDNewAdmin; +}; + +//----------------------------------------------------------------------------- +// Purpose: A game created a game for all the members of the lobby to join, +// as triggered by a SetLobbyGameServer() +// it's up to the individual clients to take action on this; the usual +// game behavior is to leave the lobby and connect to the specified game server +//----------------------------------------------------------------------------- +struct LobbyGameCreated_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 9 }; + + CSteamID m_ulSteamIDLobby; // the lobby we were in + CSteamID m_ulSteamIDGameServer; // the new game server that has been created or found for the lobby members + uint32 m_unIP; // IP & Port of the game server (if any) + uint16 m_usPort; +}; + +//----------------------------------------------------------------------------- +// Purpose: Number of matching lobbies found +// iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1 +//----------------------------------------------------------------------------- +struct LobbyMatchList_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 10 }; + + uint32 m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for +}; + + +//----------------------------------------------------------------------------- +// Purpose: Called when the lobby is being forcefully closed +// lobby details functions will no longer be updated +//----------------------------------------------------------------------------- +struct LobbyClosing_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 11 }; + + CSteamID m_ulSteamIDLobby; // Lobby +}; + + +//----------------------------------------------------------------------------- +// Purpose: posted if a user is forcefully removed from a lobby +// can occur if a user loses connection to Steam +//----------------------------------------------------------------------------- +struct LobbyKicked_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 12 }; + + uint64 m_ulSteamIDLobby; // Lobby + uint64 m_ulSteamIDAdmin; // User who kicked you - possibly the ID of the lobby itself + uint8 m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true) +}; + + + +//----------------------------------------------------------------------------- +// Purpose: Result of our request to create a Lobby +// m_eResult == k_EResultOK on success +// at this point, the local user may not have finishing joining this lobby; +// game code should wait until the subsequent LobbyEnter_t callback is received +//----------------------------------------------------------------------------- +struct LobbyCreated_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 13 }; + + EResult m_eResult; // k_EResultOK - the lobby was successfully created + // k_EResultNoConnection - your Steam client doesn't have a connection to the back-end + // k_EResultTimeout - you the message to the Steam servers, but it didn't respond + // k_EResultFail - the server responded, but with an unknown internal error + // k_EResultAccessDenied - your game isn't set to allow lobbies, or your client does haven't rights to play the game + // k_EResultLimitExceeded - your game client has created too many lobbies + + uint64 m_ulSteamIDLobby; // chat room, zero if failed +}; + +// used by now obsolete RequestFriendsLobbiesResponse_t +struct RequestFriendsLobbiesResponse_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 }; + + uint64 m_ulSteamIDFriend; + uint64 m_ulSteamIDLobby; + int m_cResultIndex; + int m_cResultsTotal; +}; + + +//----------------------------------------------------------------------------- +// Purpose: Result of CheckForPSNGameBootInvite +// m_eResult == k_EResultOK on success +// at this point, the local user may not have finishing joining this lobby; +// game code should wait until the subsequent LobbyEnter_t callback is received +//----------------------------------------------------------------------------- +struct PSNGameBootInviteResult_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 }; + + bool m_bGameBootInviteExists; + CSteamID m_steamIDLobby; // Should be valid if m_bGameBootInviteExists == true +}; + + +//----------------------------------------------------------------------------- +// Purpose: Result of our request to create a Lobby +// m_eResult == k_EResultOK on success +// at this point, the lobby has been joined and is ready for use +// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) +//----------------------------------------------------------------------------- +struct FavoritesListAccountsUpdated_t +{ + enum { k_iCallback = k_iSteamMatchmakingCallbacks + 16 }; + + EResult m_eResult; +}; + + +struct GMSQueryResult_t +{ + uint32 uServerIP; + uint32 uServerPort; + int32 nAuthPlayers; +}; + +struct PingSample_t +{ + // TODO: Reverse this struct +#ifdef _S4N_ + int m_iPadding; +#endif +}; + +#pragma pack( pop ) + + + +#endif // MATCHMAKINGCOMMON_H diff --git a/src/public SDK/MatchmakingServersCommon.h b/src/public SDK/MatchmakingServersCommon.h new file mode 100644 index 0000000..53cc225 --- /dev/null +++ b/src/public SDK/MatchmakingServersCommon.h @@ -0,0 +1,175 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MATCHMAKINGSERVERSCOMMON_H +#define MATCHMAKINGSERVERSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define CLIENTMATCHMAKINGSERVERS_INTERFACE_VERSION "CLIENTMATCHMAKINGSERVERS_INTERFACE_VERSION001" + +#define STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION_001 "SteamMatchMakingServers001" +#define STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION_002 "SteamMatchMakingServers002" + + +typedef enum EMatchMakingServerResponse +{ + eServerResponded = 0, + eServerFailedToRespond, + eNoServersListedOnMasterServer // for the Internet query type, returned in response callback if no servers of this type match +} EMatchMakingServerResponse; + +typedef enum EMatchMakingType +{ + eInternetServer = 0, + eLANServer, + eFriendsServer, + eFavoritesServer, + eHistoryServer, + eSpectatorServer, + eInvalidServer +} EMatchMakingType; + + + + +//----------------------------------------------------------------------------- +// Callback interfaces for server list functions (see ISteamMatchmakingServers below) +// +// The idea here is that your game code implements objects that implement these +// interfaces to receive callback notifications after calling asynchronous functions +// inside the ISteamMatchmakingServers() interface below. +// +// This is different than normal Steam callback handling due to the potentially +// large size of server lists. +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Purpose: Callback interface for receiving responses after a server list refresh +// or an individual server update. +// +// Since you get these callbacks after requesting full list refreshes you will +// usually implement this interface inside an object like CServerBrowser. If that +// object is getting destructed you should use ISteamMatchMakingServers()->CancelQuery() +// to cancel any in-progress queries so you don't get a callback into the destructed +// object and crash. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingServerListResponse001 +{ +public: + // Server has responded ok with updated data + virtual void ServerResponded( int iServer ) = 0; + + // Server has failed to respond + virtual void ServerFailedToRespond( int iServer ) = 0; + + // A list refresh you had initiated is now 100% completed + virtual void RefreshComplete( EMatchMakingServerResponse response ) = 0; +}; + +abstract_class ISteamMatchmakingServerListResponse002 +{ +public: + // Server has responded ok with updated data + virtual void ServerResponded( HServerListRequest hRequest, int iServer ) = 0; + + // Server has failed to respond + virtual void ServerFailedToRespond( HServerListRequest hRequest, int iServer ) = 0; + + // A list refresh you had initiated is now 100% completed + virtual void RefreshComplete( HServerListRequest hRequest, EMatchMakingServerResponse response ) = 0; +}; + +//Typedef to the lastest version of the interface +typedef ISteamMatchmakingServerListResponse002 ISteamMatchmakingServerListResponse; + +//----------------------------------------------------------------------------- +// Purpose: Callback interface for receiving responses after pinging an individual server +// +// These callbacks all occur in response to querying an individual server +// via the ISteamMatchmakingServers()->PingServer() call below. If you are +// destructing an object that implements this interface then you should call +// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query +// which is in progress. Failure to cancel in progress queries when destructing +// a callback handler may result in a crash when a callback later occurs. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingPingResponse +{ +public: + // Server has responded successfully and has updated data + virtual void ServerResponded( gameserveritem_t &server ) = 0; + + // Server failed to respond to the ping request + virtual void ServerFailedToRespond() = 0; +}; + + +//----------------------------------------------------------------------------- +// Purpose: Callback interface for receiving responses after requesting details on +// who is playing on a particular server. +// +// These callbacks all occur in response to querying an individual server +// via the ISteamMatchmakingServers()->PlayerDetails() call below. If you are +// destructing an object that implements this interface then you should call +// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query +// which is in progress. Failure to cancel in progress queries when destructing +// a callback handler may result in a crash when a callback later occurs. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingPlayersResponse +{ +public: + // Got data on a new player on the server -- you'll get this callback once per player + // on the server which you have requested player data on. + virtual void AddPlayerToList( const char *pchName, int nScore, float flTimePlayed ) = 0; + + // The server failed to respond to the request for player details + virtual void PlayersFailedToRespond() = 0; + + // The server has finished responding to the player details request + // (ie, you won't get anymore AddPlayerToList callbacks) + virtual void PlayersRefreshComplete() = 0; +}; + + +//----------------------------------------------------------------------------- +// Purpose: Callback interface for receiving responses after requesting rules +// details on a particular server. +// +// These callbacks all occur in response to querying an individual server +// via the ISteamMatchmakingServers()->ServerRules() call below. If you are +// destructing an object that implements this interface then you should call +// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query +// which is in progress. Failure to cancel in progress queries when destructing +// a callback handler may result in a crash when a callback later occurs. +//----------------------------------------------------------------------------- +abstract_class ISteamMatchmakingRulesResponse +{ +public: + // Got data on a rule on the server -- you'll get one of these per rule defined on + // the server you are querying + virtual void RulesResponded( const char *pchRule, const char *pchValue ) = 0; + + // The server failed to respond to the request for rule details + virtual void RulesFailedToRespond() = 0; + + // The server has finished responding to the rule details request + // (ie, you won't get anymore RulesResponded callbacks) + virtual void RulesRefreshComplete() = 0; +}; + +#endif // MATCHMAKINGSERVERSCOMMON_H diff --git a/src/public SDK/MusicCommon.h b/src/public SDK/MusicCommon.h new file mode 100644 index 0000000..841df5d --- /dev/null +++ b/src/public SDK/MusicCommon.h @@ -0,0 +1,50 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MUSICCOMMON_H +#define MUSICCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define STEAMMUSIC_INTERFACE_VERSION_001 "STEAMMUSIC_INTERFACE_VERSION001" + + +enum AudioPlayback_Status +{ + AudioPlayback_Undefined = 0, + AudioPlayback_Playing = 1, + AudioPlayback_Paused = 2, + AudioPlayback_Idle = 3 +}; + + +#pragma pack( push, 8 ) + +struct PlaybackStatusHasChanged_t +{ + enum { k_iCallback = k_iSteamMusicCallbacks + 1 }; +}; + +struct VolumeHasChanged_t +{ + enum { k_iCallback = k_iSteamMusicCallbacks + 2 }; + float m_flNewVolume; +}; + +#pragma pack( pop ) + +#endif // MUSICCOMMON_H diff --git a/src/public SDK/MusicRemoteCommon.h b/src/public SDK/MusicRemoteCommon.h new file mode 100644 index 0000000..5bb1653 --- /dev/null +++ b/src/public SDK/MusicRemoteCommon.h @@ -0,0 +1,103 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef MUSICREMOTECOMMON_H +#define MUSICREMOTECOMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#define STEAMMUSICREMOTE_INTERFACE_VERSION_001 "STEAMMUSICREMOTE_INTERFACE_VERSION001" + +#define k_SteamMusicNameMaxLength 255 +#define k_SteamMusicPNGMaxLength 65535 + + +#pragma pack( push, 8 ) + +struct MusicPlayerRemoteWillActivate_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 1 }; +}; + +struct MusicPlayerRemoteWillDeactivate_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 2 }; +}; + +struct MusicPlayerRemoteToFront_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 3 }; +}; + +struct MusicPlayerWillQuit_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 4 }; +}; + +struct MusicPlayerWantsPlay_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 5 }; +}; + +struct MusicPlayerWantsPause_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 6 }; +}; + +struct MusicPlayerWantsPlayPrevious_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 7 }; +}; + +struct MusicPlayerWantsPlayNext_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 8 }; +}; + +struct MusicPlayerWantsShuffled_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 9 }; + bool m_bShuffled; +}; + +struct MusicPlayerWantsLooped_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 10 }; + bool m_bLooped; +}; + +struct MusicPlayerWantsVolume_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 11 }; + float m_flNewVolume; +}; + +struct MusicPlayerSelectsQueueEntry_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 12 }; + int nID; +}; + +struct MusicPlayerSelectsPlaylistEntry_t +{ + enum { k_iCallback = k_iSteamMusicRemoteCallbacks + 13 }; + int nID; +}; + +#pragma pack( pop ) + +#endif // MUSICREMOTECOMMON_H diff --git a/src/public SDK/NetworkingCommon.h b/src/public SDK/NetworkingCommon.h new file mode 100644 index 0000000..c760f81 --- /dev/null +++ b/src/public SDK/NetworkingCommon.h @@ -0,0 +1,167 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef NETWORKINGCOMMON_H +#define NETWORKINGCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define STEAMNETWORKING_INTERFACE_VERSION_001 "SteamNetworking001" +#define STEAMNETWORKING_INTERFACE_VERSION_002 "SteamNetworking002" +#define STEAMNETWORKING_INTERFACE_VERSION_003 "SteamNetworking003" +#define STEAMNETWORKING_INTERFACE_VERSION_004 "SteamNetworking004" +#define STEAMNETWORKING_INTERFACE_VERSION_005 "SteamNetworking005" + +#define CLIENTNETWORKING_INTERFACE_VERSION "ClientNetworking001" + +// SendP2PPacket() send types +// Typically k_EP2PSendUnreliable is what you want for UDP-like packets, k_EP2PSendReliable for TCP-like packets +enum EP2PSend +{ + // Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare). + // The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or + // there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again. + k_EP2PSendUnreliable = 0, + + // As above, but if the underlying p2p connection isn't yet established the packet will just be thrown away. Using this on the first + // packet sent to a remote host almost guarantees the packet will be dropped. + // This is only really useful for kinds of data that should never buffer up, i.e. voice payload packets + k_EP2PSendUnreliableNoDelay = 1, + + // Reliable message send. Can send up to 1MB of data in a single message. + // Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for efficient sends of large chunks of data. + k_EP2PSendReliable = 2, + + // As above, but applies the Nagle algorithm to the send - sends will accumulate + // until the current MTU size (typically ~1200 bytes, but can change) or ~200ms has passed (Nagle algorithm). + // Useful if you want to send a set of smaller messages but have the coalesced into a single packet + // Since the reliable stream is all ordered, you can do several small message sends with k_EP2PSendReliableWithBuffering and then + // do a normal k_EP2PSendReliable to force all the buffered data to be sent. + k_EP2PSendReliableWithBuffering = 3, + +}; + +// list of possible errors returned by SendP2PPacket() API +// these will be posted in the P2PSessionConnectFail_t callback +enum EP2PSessionError +{ + k_EP2PSessionErrorNone = 0, + k_EP2PSessionErrorNotRunningApp = 1, // target is not running the same game + k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running + k_EP2PSessionErrorDestinationNotLoggedIn = 3, // target user isn't connected to Steam + k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser() + // corporate firewalls can also block this (NAT traversal is not firewall traversal) + // make sure that UDP ports 3478, 4379, and 4380 are open in an outbound direction + k_EP2PSessionErrorMax = 5 +}; + +// describes how the socket is currently connected +enum ESNetSocketConnectionType +{ + k_ESNetSocketConnectionTypeNotConnected = 0, + k_ESNetSocketConnectionTypeUDP = 1, + k_ESNetSocketConnectionTypeUDPRelay = 2, +}; + +// connection progress indicators +enum ESNetSocketState +{ + k_ESNetSocketStateInvalid = 0, + + // communication is valid + k_ESNetSocketStateConnected = 1, + + // states while establishing a connection + k_ESNetSocketStateInitiated = 10, // the connection state machine has started + + // p2p connections + k_ESNetSocketStateLocalCandidatesFound = 11, // we've found our local IP info + k_ESNetSocketStateReceivedRemoteCandidates = 12,// we've received information from the remote machine, via the Steam back-end, about their IP info + + // direct connections + k_ESNetSocketStateChallengeHandshake = 15, // we've received a challenge packet from the server + + // failure states + k_ESNetSocketStateDisconnecting = 21, // the API shut it down, and we're in the process of telling the other end + k_ESNetSocketStateLocalDisconnect = 22, // the API shut it down, and we've completed shutdown + k_ESNetSocketStateTimeoutDuringConnect = 23, // we timed out while trying to creating the connection + k_ESNetSocketStateRemoteEndDisconnected = 24, // the remote end has disconnected from us + k_ESNetSocketStateConnectionBroken = 25, // connection has been broken; either the other end has disappeared or our local network connection has broke + +}; + + +// handle to a socket +typedef uint32 SNetSocket_t; // CreateP2PConnectionSocket() +typedef uint32 SNetListenSocket_t; // CreateListenSocket() + + +#pragma pack( push, 8 ) + +// connection state to a specified user, returned by GetP2PSessionState() +// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin +struct P2PSessionState_t +{ + uint8 m_bConnectionActive; // true if we've got an active open connection + uint8 m_bConnecting; // true if we're currently trying to establish a connection + uint8 m_eP2PSessionError; // last error recorded (see enum above) + uint8 m_bUsingRelay; // true if it's going through a relay server (TURN) + int32 m_nBytesQueuedForSend; + int32 m_nPacketsQueuedForSend; + uint32 m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server. + uint16 m_nRemotePort; // Only exists for compatibility with older authentication api's +}; + + +// callback notification - status of a socket has changed +// used as part of the CreateListenSocket() / CreateP2PConnectionSocket() +struct SocketStatusCallback_t +{ + enum { k_iCallback = k_iSteamNetworkingCallbacks + 1 }; + + SNetSocket_t m_hSocket; // the socket used to send/receive data to the remote host + SNetListenSocket_t m_hListenSocket; // this is the server socket that we were listening on; NULL if this was an outgoing connection + CSteamID m_steamIDRemote; // remote steamID we have connected to, if it has one + int m_eSNetSocketState; // socket state, ESNetSocketState +}; + + +// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API +// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them +struct P2PSessionRequest_t +{ + enum { k_iCallback = k_iSteamNetworkingCallbacks + 2 }; + + CSteamID m_steamIDRemote; // user who wants to talk to us +}; + + +// callback notification - packets can't get through to the specified user via the SendP2PPacket() API +// all packets queued packets unsent at this point will be dropped +// further attempts to send will retry making the connection (but will be dropped if we fail again) +struct P2PSessionConnectFail_t +{ + enum { k_iCallback = k_iSteamNetworkingCallbacks + 3 }; + + CSteamID m_steamIDRemote; // user we were sending packets to + uint8 m_eP2PSessionError; // EP2PSessionError indicating why we're having trouble +}; +#pragma pack( pop ) + +#endif // NETWORKINGCOMMON_H diff --git a/src/public SDK/OAuthCommon.h b/src/public SDK/OAuthCommon.h new file mode 100644 index 0000000..c0a14e0 --- /dev/null +++ b/src/public SDK/OAuthCommon.h @@ -0,0 +1,27 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef OAUTHCOMMON_H +#define OAUTHCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#define STEAMOAUTH_INTERFACE_VERSION_001 "SteamOAuth001" + + +#endif // OAUTHCOMMON_H diff --git a/src/public SDK/Open Steamworks.vcproj b/src/public SDK/Open Steamworks.vcproj new file mode 100644 index 0000000..33c3e00 --- /dev/null +++ b/src/public SDK/Open Steamworks.vcproj @@ -0,0 +1,1070 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/public SDK/POSIXLibrary.h b/src/public SDK/POSIXLibrary.h new file mode 100644 index 0000000..f009f8a --- /dev/null +++ b/src/public SDK/POSIXLibrary.h @@ -0,0 +1,52 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#pragma once +#include + +class DynamicLibrary +{ +public: + DynamicLibrary(const char* cszPath) + { + m_handle = dlopen(cszPath, RTLD_LAZY); + } + + ~DynamicLibrary() + { + if(m_handle) + dlclose(m_handle); + } + + void * GetSymbol(const char* cszSymbol) const + { + if(!m_handle) + return NULL; + + return dlsym(m_handle, cszSymbol); + } + + bool IsLoaded() const + { + return m_handle != NULL; + } + +private: + void *m_handle; + + DynamicLibrary(const DynamicLibrary&); + void operator=(const DynamicLibrary&); +}; diff --git a/src/public SDK/RemoteStorageCommon.h b/src/public SDK/RemoteStorageCommon.h new file mode 100644 index 0000000..1d3d512 --- /dev/null +++ b/src/public SDK/RemoteStorageCommon.h @@ -0,0 +1,725 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef REMOTESTORAGECOMMON_H +#define REMOTESTORAGECOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_001 "STEAMREMOTESTORAGE_INTERFACE_VERSION001" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_002 "STEAMREMOTESTORAGE_INTERFACE_VERSION002" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_003 "STEAMREMOTESTORAGE_INTERFACE_VERSION003" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_004 "STEAMREMOTESTORAGE_INTERFACE_VERSION004" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_005 "STEAMREMOTESTORAGE_INTERFACE_VERSION005" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_006 "STEAMREMOTESTORAGE_INTERFACE_VERSION006" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_007 "STEAMREMOTESTORAGE_INTERFACE_VERSION007" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_008 "STEAMREMOTESTORAGE_INTERFACE_VERSION008" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_009 "STEAMREMOTESTORAGE_INTERFACE_VERSION009" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_010 "STEAMREMOTESTORAGE_INTERFACE_VERSION010" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_011 "STEAMREMOTESTORAGE_INTERFACE_VERSION011" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_012 "STEAMREMOTESTORAGE_INTERFACE_VERSION012" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_013 "STEAMREMOTESTORAGE_INTERFACE_VERSION013" +#define STEAMREMOTESTORAGE_INTERFACE_VERSION_014 "STEAMREMOTESTORAGE_INTERFACE_VERSION014" + +#define CLIENTREMOTESTORAGE_INTERFACE_VERSION "CLIENTREMOTESTORAGE_INTERFACE_VERSION001" + + +// A handle to a piece of user generated content +typedef uint64 UGCHandle_t; +typedef uint64 PublishedFileUpdateHandle_t; +typedef uint64 PublishedFileId_t; +const PublishedFileId_t k_PublishedFileIdInvalid = 0; +const UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffffull; +const PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffffull; + +// Handle for writing to Steam Cloud +typedef uint64 UGCFileWriteStreamHandle_t; +const UGCFileWriteStreamHandle_t k_UGCFileStreamHandleInvalid = 0xffffffffffffffffull; + +const uint32 k_cchPublishedDocumentTitleMax = 128 + 1; +const uint32 k_cchPublishedDocumentDescriptionMax = 8000; +const uint32 k_cchPublishedDocumentChangeDescriptionMax = 256; +const uint32 k_unEnumeratePublishedFilesMaxResults = 50; +const uint32 k_cchTagListMax = 1024 + 1; +const uint32 k_cchFilenameMax = 260; +const uint32 k_cchPublishedFileURLMax = 256; + +enum ERemoteStorageFileRoot +{ + k_ERemoteStorageFileRootInvalid = -1, + k_ERemoteStorageFileRootDefault, + k_ERemoteStorageFileRootGameInstall, + k_ERemoteStorageFileRootWinMyDocuments, + k_ERemoteStorageFileRootWinAppDataLocal, + k_ERemoteStorageFileRootWinAppDataRoaming, + k_ERemoteStorageFileRootSteamUserBaseStorage, + k_ERemoteStorageFileRootMacHome, + k_ERemoteStorageFileRootMacAppSupport, + k_ERemoteStorageFileRootMacDocuments, + k_ERemoteStorageFileRootWinSavedGames, + k_ERemoteStorageFileRootWinProgramData, + k_ERemoteStorageFileRootSteamCloudDocuments, + k_ERemoteStorageFileRootWinAppDataLocalLow, + k_ERemoteStorageFileRootMacCaches, + k_ERemoteStorageFileRootLinuxHome, + k_ERemoteStorageFileRootLinuxXdgDataHome, + k_ERemoteStorageFileRootMax +}; + +enum ERemoteStorageSyncState +{ + k_ERemoteSyncStateDisabled = 0, + k_ERemoteSyncStateUnknown = 1, + k_ERemoteSyncStateSynchronized = 2, + k_ERemoteSyncStateSyncInProgress = 3, + k_ERemoteSyncStatePendingChangesInCloud = 4, + k_ERemoteSyncStatePendingChangesLocally = 5, + k_ERemoteSyncStatePendingChangesInCloudAndLocally = 6, + k_ERemoteSyncStateConflictingChanges = 7, +}; + +enum EFileRemoteStorageSyncState +{ + // TODO: Reverse this enum +}; + +enum EUCMFilePrivacyState +{ + k_EUCMFilePrivacyStateInvalid = -1, + + k_EUCMFilePrivacyStateUnpublished = 0, + k_EUCMFilePrivacyStatePublished = 1, + + k_EUCMFilePrivacyStatePrivate = 2, + k_EUCMFilePrivacyStateFriendsOnly = 4, + k_EUCMFilePrivacyStatePublic = 8, + k_EUCMFilePrivacyStateAll = 14, +}; + +enum ERemoteStoragePlatform +{ + k_ERemoteStoragePlatformNone = 0, + k_ERemoteStoragePlatformWindows = (1 << 0), + k_ERemoteStoragePlatformOSX = (1 << 1), + k_ERemoteStoragePlatformPS3 = (1 << 2), + k_ERemoteStoragePlatformLinux = (1 << 3), + k_ERemoteStoragePlatformReserved2 = (1 << 4), + + k_ERemoteStoragePlatformAll = 0xffffffff +}; + +// Ways to handle a synchronization conflict +enum EResolveConflict +{ + k_EResolveConflictKeepClient = 1, // The local version of each file will be used to overwrite the server version + k_EResolveConflictKeepServer = 2, // The server version of each file will be used to overwrite the local version +}; + +enum ERemoteStoragePublishedFileVisibility +{ + k_ERemoteStoragePublishedFileVisibilityPublic = 0, + k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1, + k_ERemoteStoragePublishedFileVisibilityPrivate = 2, +}; + +enum ERemoteStoragePublishedFileSortOrder +{ + // TODO: Reverse this enum +}; + +enum EWorkshopFileType +{ + k_EWorkshopFileTypeFirst = 0, + + k_EWorkshopFileTypeCommunity = 0, // normal Workshop item that can be subscribed to + k_EWorkshopFileTypeMicrotransaction = 1, // Workshop item that is meant to be voted on for the purpose of selling in-game + k_EWorkshopFileTypeCollection = 2, // a collection of Workshop or Greenlight items + k_EWorkshopFileTypeArt = 3, // artwork + k_EWorkshopFileTypeVideo = 4, // external video + k_EWorkshopFileTypeScreenshot = 5, // screenshot + k_EWorkshopFileTypeGame = 6, // Greenlight game entry + k_EWorkshopFileTypeSoftware = 7, // Greenlight software entry + k_EWorkshopFileTypeConcept = 8, // Greenlight concept + k_EWorkshopFileTypeWebGuide = 9, // Steam web guide + k_EWorkshopFileTypeIntegratedGuide = 10, // application integrated guide + k_EWorkshopFileTypeMerch = 11, // Workshop merchandise meant to be voted on for the purpose of being sold + k_EWorkshopFileTypeControllerBinding = 12, // Steam Controller bindings + k_EWorkshopFileTypeSteamworksAccessInvite = 13, // internal + k_EWorkshopFileTypeSteamVideo = 14, // Steam video + k_EWorkshopFileTypeGameManagedItem = 15, // managed completely by the game, not the user, and not shown on the web + + // Update k_EWorkshopFileTypeMax if you add values. + k_EWorkshopFileTypeMax = 16 + +}; + +enum EWorkshopVote +{ + k_EWorkshopVoteUnvoted = 0, + k_EWorkshopVoteFor = 1, + k_EWorkshopVoteAgainst = 2, + k_EWorkshopVoteLater = 3, +}; + +enum EWorkshopVideoProvider +{ + // TODO: Reverse this enum +}; + +enum EWorkshopFileAction +{ + k_EWorkshopFileActionPlayed = 0, + k_EWorkshopFileActionCompleted = 1, +}; + + +enum EWorkshopEnumerationType +{ + k_EWorkshopEnumerationTypeRankedByVote = 0, + k_EWorkshopEnumerationTypeRecent = 1, + k_EWorkshopEnumerationTypeTrending = 2, + k_EWorkshopEnumerationTypeFavoritesOfFriends = 3, + k_EWorkshopEnumerationTypeVotedByFriends = 4, + k_EWorkshopEnumerationTypeContentByFriends = 5, + k_EWorkshopEnumerationTypeRecentFromFollowedUsers = 6, +}; + +enum EPublishedFileInfoMatchingFileType +{ + // TODO: Reverse this enum +}; + +enum EUGCReadAction +{ + // TODO: Reverse this enum +}; + +#pragma pack( push, 8 ) + +struct SteamParamStringArray_t +{ + SteamParamStringArray_t() + { + m_ppStrings = NULL; + m_nNumStrings = 0; + } + + const char ** m_ppStrings; + int32 m_nNumStrings; +}; + +//----------------------------------------------------------------------------- +// Purpose: helper structure for making updates to published files. +// make sure to update serialization/deserialization in interfacemap.cpp if new properties are added +//----------------------------------------------------------------------------- +struct RemoteStorageUpdatePublishedFileRequest_t +{ +public: + RemoteStorageUpdatePublishedFileRequest_t() + { + Initialize( k_GIDNil ); + } + + RemoteStorageUpdatePublishedFileRequest_t( PublishedFileId_t unPublishedFileId ) + { + Initialize( unPublishedFileId ); + } + + PublishedFileId_t GetPublishedFileId() { return m_unPublishedFileId; } + + void SetFile( const char *pchFile ) + { + m_pchFile = pchFile; + m_bUpdateFile = true; + } + + const char *GetFile() { return m_pchFile; } + bool BUpdateFile() { return m_bUpdateFile; } + + void SetPreviewFile( const char *pchPreviewFile ) + { + m_pchPreviewFile = pchPreviewFile; + m_bUpdatePreviewFile = true; + } + + const char *GetPreviewFile() { return m_pchPreviewFile; } + bool BUpdatePreviewFile() { return m_bUpdatePreviewFile; } + + void SetTitle( const char *pchTitle ) + { + m_pchTitle = pchTitle; + m_bUpdateTitle = true; + } + + const char *GetTitle() { return m_pchTitle; } + bool BUpdateTitle() { return m_bUpdateTitle; } + + void SetDescription( const char *pchDescription ) + { + m_pchDescription = pchDescription; + m_bUpdateDescription = true; + } + + const char *GetDescription() { return m_pchDescription; } + bool BUpdateDescription() { return m_bUpdateDescription; } + + void SetVisibility( ERemoteStoragePublishedFileVisibility eVisibility ) + { + m_eVisibility = eVisibility; + m_bUpdateVisibility = true; + } + + const ERemoteStoragePublishedFileVisibility GetVisibility() { return m_eVisibility; } + bool BUpdateVisibility() { return m_bUpdateVisibility; } + + void SetTags( SteamParamStringArray_t *pTags ) + { + m_pTags = pTags; + m_bUpdateTags = true; + } + + SteamParamStringArray_t *GetTags() { return m_pTags; } + bool BUpdateTags() { return m_bUpdateTags; } + SteamParamStringArray_t **GetTagsPointer() { return &m_pTags; } + + void Initialize( PublishedFileId_t unPublishedFileId ) + { + m_unPublishedFileId = unPublishedFileId; + m_pchFile = 0; + m_pchPreviewFile = 0; + m_pchTitle = 0; + m_pchDescription = 0; + m_pTags = 0; + + m_bUpdateFile = false; + m_bUpdatePreviewFile = false; + m_bUpdateTitle = false; + m_bUpdateDescription = false; + m_bUpdateTags = false; + m_bUpdateVisibility = false; + } + +private: + PublishedFileId_t m_unPublishedFileId; + const char *m_pchFile; + const char *m_pchPreviewFile; + const char *m_pchTitle; + const char *m_pchDescription; + ERemoteStoragePublishedFileVisibility m_eVisibility; + SteamParamStringArray_t *m_pTags; + + bool m_bUpdateFile; + bool m_bUpdatePreviewFile; + bool m_bUpdateTitle; + bool m_bUpdateDescription; + bool m_bUpdateVisibility; + bool m_bUpdateTags; +}; + + + +//----------------------------------------------------------------------------- +// Purpose: sent when the local file cache is fully synced with the server for an app +// That means that an application can be started and has all latest files +//----------------------------------------------------------------------------- +struct RemoteStorageAppSyncedClient_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 1 }; + + AppId_t m_nAppID; + EResult m_eResult; + int m_unNumDownloads; +}; + +//----------------------------------------------------------------------------- +// Purpose: sent when the server is fully synced with the local file cache for an app +// That means that we can shutdown Steam and our data is stored on the server +//----------------------------------------------------------------------------- +struct RemoteStorageAppSyncedServer_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 2 }; + + AppId_t m_nAppID; + EResult m_eResult; + int m_unNumUploads; +}; + +//----------------------------------------------------------------------------- +// Purpose: Status of up and downloads during a sync session +// +//----------------------------------------------------------------------------- +struct RemoteStorageAppSyncProgress_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 3 }; + + char m_rgchCurrentFile[260]; // Current file being transferred + AppId_t m_nAppID; // App this info relates to + uint32 m_uBytesTransferredThisChunk; // Bytes transferred this chunk + double m_dAppPercentComplete; // Percent complete that this app's transfers are + bool m_bUploading; // if false, downloading +}; + +struct RemoteStorageAppInfoLoaded_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 4 }; + + AppId_t m_nAppID; + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: Sent after we've determined the list of files that are out of sync +// with the server. +//----------------------------------------------------------------------------- +struct RemoteStorageAppSyncStatusCheck_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 5 }; + + AppId_t m_nAppID; + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: Sent after a conflict resolution attempt. +//----------------------------------------------------------------------------- +struct RemoteStorageConflictResolution_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 6 }; + + AppId_t m_nAppID; + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to FileShare() +//----------------------------------------------------------------------------- +struct RemoteStorageFileShareResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 7 }; + + EResult m_eResult; // The result of the operation + UGCHandle_t m_hFile; // The handle that can be shared with users and features + char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to UGCDownload() +//----------------------------------------------------------------------------- +struct _Deprecated_RemoteStorageDownloadUGCResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 8 }; + + EResult m_eResult; // The result of the operation. + UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded. + AppId_t m_nAppID; // ID of the app that created this file. + int32 m_nSizeInBytes; // The size of the file that was downloaded, in bytes. + char *m_pchFileName; // The name of the file that was downloaded. This pointer is + // not guaranteed to be valid indefinitely. + uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to PublishFile() +//----------------------------------------------------------------------------- +struct RemoteStoragePublishFileResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 9 }; + + EResult m_eResult; // The result of the operation. + PublishedFileId_t m_nPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to GetPublishedFileDetails() +//----------------------------------------------------------------------------- +struct _Deprecated_RemoteStorageGetPublishedFileDetailsResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 10 }; + + EResult m_eResult; // The result of the operation. + PublishedFileId_t m_nPublishedFileId; + AppId_t m_nCreatorAppID; // ID of the app that created this file. + AppId_t m_nConsumerAppID; // ID of the app that created this file. + char m_rgchTitle[129]; // title of document + char m_rgchDescription[257]; // description of document + UGCHandle_t m_hFile; // The handle of the primary file + UGCHandle_t m_hPreviewFile; // The handle of the preview file + uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. + uint32 m_rtimeCreated; // time when the published file was created + uint32 m_rtimeUpdated; // time when the published file was last updated + ERemoteStoragePublishedFileVisibility m_eVisibility; + bool m_bBanned; + char m_rgchTags[1025]; // comma separated list of all tags associated with this file + bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + char m_pchFileName[260]; // The name of the primary file + EWorkshopFileType m_eFileType; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to DeletePublishedFile() +//----------------------------------------------------------------------------- +struct RemoteStorageDeletePublishedFileResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 11 }; + + EResult m_eResult; // The result of the operation. + PublishedFileId_t m_nPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to EnumerateUserPublishedFiles() +//----------------------------------------------------------------------------- +struct RemoteStorageEnumerateUserPublishedFilesResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 12 }; + + EResult m_eResult; // The result of the operation. + int32 m_nResultsReturned; + int32 m_nTotalResultCount; + PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ]; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to SubscribePublishedFile() +//----------------------------------------------------------------------------- +struct RemoteStorageSubscribePublishedFileResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 13 }; + + EResult m_eResult; // The result of the operation. +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to EnumerateSubscribePublishedFiles() +//----------------------------------------------------------------------------- +struct RemoteStorageEnumerateUserSubscribedFilesResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 14 }; + + EResult m_eResult; // The result of the operation. + int32 m_nResultsReturned; + int32 m_nTotalResultCount; + PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ]; + uint32 m_rgRTimeSubscribed[ k_unEnumeratePublishedFilesMaxResults ]; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to UnsubscribePublishedFile() +//----------------------------------------------------------------------------- +struct RemoteStorageUnsubscribePublishedFileResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 15 }; + + EResult m_eResult; // The result of the operation. +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to UpdatePublishedFile() +//----------------------------------------------------------------------------- +struct RemoteStorageUpdatePublishedFileResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 16 }; + + EResult m_eResult; // The result of the operation. + PublishedFileId_t m_nPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to UGCDownload() +//----------------------------------------------------------------------------- +struct RemoteStorageDownloadUGCResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 17 }; + + EResult m_eResult; // The result of the operation. + UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded. + AppId_t m_nAppID; // ID of the app that created this file. + int32 m_nSizeInBytes; // The size of the file that was downloaded, in bytes. + char m_pchFileName[260]; // The name of the file that was downloaded. + uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to GetPublishedFileDetails() +//----------------------------------------------------------------------------- +struct RemoteStorageGetPublishedFileDetailsResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 18 }; + + EResult m_eResult; // The result of the operation. + PublishedFileId_t m_nPublishedFileId; + AppId_t m_nCreatorAppID; // ID of the app that created this file. + AppId_t m_nConsumerAppID; // ID of the app that created this file. + char m_rgchTitle[ k_cchPublishedDocumentTitleMax ]; // title of document + char m_rgchDescription[ k_cchPublishedDocumentDescriptionMax ]; // description of document + UGCHandle_t m_hFile; // The handle of the primary file + UGCHandle_t m_hPreviewFile; // The handle of the preview file + uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. + uint32 m_rtimeCreated; // time when the published file was created + uint32 m_rtimeUpdated; // time when the published file was last updated + ERemoteStoragePublishedFileVisibility m_eVisibility; + bool m_bBanned; + char m_rgchTags[ k_cchTagListMax ]; // comma separated list of all tags associated with this file + bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + char m_pchFileName[ k_cchFilenameMax ]; // The name of the primary file + int32 m_nFileSize; // File size of the primary file + int32 m_nPreviewFileSize; // File size of the preview file +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to EnumeratePublishedWorkshopFiles() +//----------------------------------------------------------------------------- +struct RemoteStorageEnumerateWorkshopFilesResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 19 }; + + EResult m_eResult; + int32 m_nResultsReturned; + int32 m_nTotalResultCount; + PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ]; + float m_rgScore[ k_unEnumeratePublishedFilesMaxResults ]; // [0-1.0] +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of GetPublishedItemVoteDetails +//----------------------------------------------------------------------------- +struct RemoteStorageGetPublishedItemVoteDetailsResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 20 }; + + EResult m_eResult; + PublishedFileId_t m_unPublishedFileId; + int32 m_nVotesFor; + int32 m_nVotesAgainst; + int32 m_nReports; + float m_fScore; // [0-1.0] +}; + +struct RemoteStoragePublishedFileSubscribed_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 21 }; + + PublishedFileId_t m_unPublishedFileId; + AppId_t m_nAppID; +}; + +struct RemoteStoragePublishedFileUnsubscribed_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 22 }; + + PublishedFileId_t m_unPublishedFileId; + AppId_t m_nAppID; +}; + +struct RemoteStoragePublishedFileDeleted_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 23 }; + + PublishedFileId_t m_unPublishedFileId; + AppId_t m_nAppID; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to UpdateUserPublishedItemVote() +//----------------------------------------------------------------------------- +struct RemoteStorageUpdateUserPublishedItemVoteResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 24 }; + + EResult m_eResult; + PublishedFileId_t m_unPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to GetUserPublishedItemVoteDetails() +//----------------------------------------------------------------------------- +struct RemoteStorageUserVoteDetails_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 25 }; + + EResult m_eResult; + int32 m_iVote; // Probably an enum + PublishedFileId_t m_unPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to EnumerateUserSharedWorkshopFiles() +//----------------------------------------------------------------------------- +struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 26 }; + + EResult m_eResult; + int32 m_nResultsReturned; + int32 m_nTotalResultCount; + PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ]; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to SetUserPublishedFileAction() +//----------------------------------------------------------------------------- +struct RemoteStorageSetUserPublishedFileActionResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 27 }; + + EResult m_eResult; + PublishedFileId_t m_unPublishedFileId; +}; + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to EnumeratePublishedFilesByUserAction() +//----------------------------------------------------------------------------- +struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 28 }; + + EResult m_eResult; + EWorkshopFileAction m_eAction; + int32 m_nResultsReturned; + int32 m_nTotalResultCount; + PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ]; + uint32 m_rgRTimes[ k_unEnumeratePublishedFilesMaxResults ]; +}; + +//----------------------------------------------------------------------------- +// Purpose: Called when a FileWriteAsync completes +//----------------------------------------------------------------------------- +struct RemoteStorageFileWriteAsyncComplete_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 31 }; + EResult m_eResult; // result +}; + +//----------------------------------------------------------------------------- +// Purpose: Called when a FileReadAsync completes +//----------------------------------------------------------------------------- +struct RemoteStorageFileReadAsyncComplete_t +{ + enum { k_iCallback = k_iClientRemoteStorageCallbacks + 32 }; + SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made + EResult m_eResult; // result + uint32 m_nOffset; // offset in the file this read was at + uint32 m_cubRead; // amount read - will the <= the amount requested +}; + +#pragma pack( pop ) + + + +#endif // REMOTESTORAGECOMMON_H diff --git a/src/public SDK/ScreenshotsCommon.h b/src/public SDK/ScreenshotsCommon.h new file mode 100644 index 0000000..a3733ae --- /dev/null +++ b/src/public SDK/ScreenshotsCommon.h @@ -0,0 +1,141 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef SCREENSHOTSCOMMON_H +#define SCREENSHOTSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +#include "RemoteStorageCommon.h" + + +// versions +#define CLIENTSCREENSHOTS_INTERFACE_VERSION "CLIENTSCREENSHOTS_INTERFACE_VERSION001" +#define STEAMSCREENSHOTS_INTERFACE_VERSION_001 "STEAMSCREENSHOTS_INTERFACE_VERSION001" +#define STEAMSCREENSHOTS_INTERFACE_VERSION_002 "STEAMSCREENSHOTS_INTERFACE_VERSION002" +#define STEAMSCREENSHOTS_INTERFACE_VERSION_003 "STEAMSCREENSHOTS_INTERFACE_VERSION003" + + +// Handle is valid for the lifetime of your process and no longer +typedef uint32 ScreenshotHandle; +#define INVALID_SCREENSHOT_HANDLE 0 + +const uint32 k_nScreenshotMaxTaggedUsers = 32; +const int k_cubUFSTagTypeMax = 255; +const int k_cubUFSTagValueMax = 255; + +// Required with of a thumbnail provided to AddScreenshotToLibrary. If you do not provide a thumbnail +// one will be generated. +const int k_ScreenshotThumbWidth = 200; + + +// callbacks +#pragma pack( push, 8 ) + +//----------------------------------------------------------------------------- +// Purpose: Screenshot successfully written or otherwise added to the library +// and can now be tagged +//----------------------------------------------------------------------------- +struct ScreenshotReady_t +{ + enum { k_iCallback = k_iSteamScreenshotsCallbacks + 1 }; + + ScreenshotHandle m_hLocal; + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: Screenshot has been requested by the user. Only sent if +// HookScreenshots() has been called, in which case Steam will not take +// the screenshot itself. +//----------------------------------------------------------------------------- +struct ScreenshotRequested_t +{ + enum { k_iCallback = k_iSteamScreenshotsCallbacks + 2 }; +}; + + + +// k_iClientScreenshotsCallbacks callbacks + + + +struct ScreenshotUploadProgress_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 1 }; + + double m_dPercentScreenshot; + double m_dPercentBatch; + int32 m_nFailed; +}; + +struct ScreenshotWritten_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 2 }; + + ScreenshotHandle m_hLocal; + CGameID m_gameID; + RTime32 m_timeCreated; + uint32 m_nWidth; + uint32 m_nHeight; +}; + +struct ScreenshotUploaded_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 3 }; + + ScreenshotHandle m_hLocal; + CGameID m_gameID; + UGCHandle_t m_hFile; + RTime32 m_timeCreated; + uint32 m_nWidth; + uint32 m_nHeight; + EUCMFilePrivacyState m_ePrivacy; + char m_pchCaption[540]; + uint8 pubUnknownData[28]; +}; + +struct ScreenshotBatchComplete_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 4 }; + + int m_nAttempted; + int m_nResultsOK; +}; + +struct ScreenshotDeleted_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 5 }; + + EResult m_eResult; + ScreenshotHandle m_hLocal; + CGameID m_gameID; +}; + +struct ScreenshotTriggered_t +{ + enum { k_iCallback = k_iClientScreenshotsCallbacks + 6 }; + + CGameID m_gameID; +}; + + +#pragma pack( pop ) + + +#endif // SCREENSHOTSCOMMON_H diff --git a/src/public SDK/Steam.h b/src/public SDK/Steam.h new file mode 100644 index 0000000..725de2c --- /dev/null +++ b/src/public SDK/Steam.h @@ -0,0 +1,362 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef STEAM_H +#define STEAM_H +#ifdef _WIN32 +#pragma once +#endif + + +#if defined(__GNUC__) && defined(_WIN32) + // This ugly hack allows us to provide GCC compatibility on windows without much effort + #pragma push_macro("virtual") + #undef virtual + #define virtual virtual __thiscall +#endif + +// steam.dll interfaces +#include "ISteam003.h" +#include "ISteam004.h" +#include "ISteam005.h" +#include "ISteam006.h" + +#if defined(__GNUC__) && defined(_WIN32) + #pragma pop_macro("virtual") +#endif + + +// steam.dll exports + +/* +** Initialization +*/ + +S_API int STEAM_CALL SteamStartEngine( TSteamError *pError ); +S_API int STEAM_CALL SteamStartEngineEx( TSteamError *pError, bool bStartOffline, bool bDetectOnlineOfflineState ); +S_API int STEAM_CALL SteamStartup( unsigned int uUsingMask, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetVersion( char *szVersion, unsigned int uVersionBufSize ); +S_API int STEAM_CALL SteamGetLocalClientVersion( unsigned int* puBootstrapperVersion, unsigned int* puClientVersion, TSteamError *pError ); + +S_API int STEAM_CALL SteamCleanup( TSteamError *pError ); +S_API int STEAM_CALL SteamShutdownEngine( TSteamError *pError ); +S_API int STEAM_CALL SteamShutdownSteamBridgeInterface( TSteamError *pError ); + +/* +** Asynchrounous call handling +*/ + +S_API int STEAM_CALL SteamProcessCall( SteamCallHandle_t handle, TSteamProgress *pProgress, TSteamError *pError ); +S_API int STEAM_CALL SteamAbortCall( SteamCallHandle_t handle, TSteamError *pError ); +S_API int STEAM_CALL SteamBlockingCall( SteamCallHandle_t handle, uint32 uiProcessTickMS, TSteamError *pError ); +S_API int STEAM_CALL SteamSetMaxStallCount( uint32 uNumStalls, TSteamError *pError ); + +/* +** Filesystem +*/ + + +S_API int STEAM_CALL SteamMountAppFilesystem( TSteamError *pError ); +S_API int STEAM_CALL SteamUnmountAppFilesystem( TSteamError *pError ); + +S_API SteamHandle_t STEAM_CALL SteamMountFilesystem( unsigned int uAppId, const char *szMountPath, TSteamError *pError ); +S_API int STEAM_CALL SteamUnmountFilesystem( SteamHandle_t hFile, TSteamError *pError ); + +S_API SteamHandle_t STEAM_CALL SteamOpenFile2( const char* cszPath, const char* cszMode, int nFlags, unsigned int* puFileSize, int* pbLocal, TSteamError* pError ); +S_API SteamHandle_t STEAM_CALL SteamOpenFileEx( const char *cszPath, const char *cszMode, unsigned int *puFileSize, TSteamError *pError ); +S_API SteamHandle_t STEAM_CALL SteamOpenFile64( const char *cszPath, const char *cszMode, SteamUnsigned64_t *pu64FileSize, TSteamError *pError ); +S_API SteamHandle_t STEAM_CALL SteamOpenFile( const char *cszPath, const char *cszMode, TSteamError *pError ); +S_API SteamHandle_t STEAM_CALL SteamOpenTmpFile( TSteamError *pError ); + +S_API int STEAM_CALL SteamFlushFile( SteamHandle_t hFile, TSteamError *pError ); +S_API int STEAM_CALL SteamCloseFile( SteamHandle_t hFile, TSteamError *pError ); + +S_API int STEAM_CALL SteamSetvBuf( SteamHandle_t hFile, void* pBuf, ESteamBufferMethod eMethod, unsigned int uBytes, TSteamError *pError ); +S_API int STEAM_CALL SteamGetc( SteamHandle_t hFile, TSteamError *pError ); +S_API int STEAM_CALL SteamPutc( int cChar, SteamHandle_t hFile, TSteamError *pError ); + +S_API int STEAM_CALL SteamPrintFile( SteamHandle_t hFile, TSteamError *pError, const char *cszFormat, ... ); +S_API unsigned int STEAM_CALL SteamReadFile( void *pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError *pError ); +S_API unsigned int STEAM_CALL SteamWriteFile( const void *pBuf, unsigned int uSize, unsigned int uCount, SteamHandle_t hFile, TSteamError *pError ); + +S_API int STEAM_CALL SteamSeekFile64( SteamHandle_t hFile, SteamSigned64_t s64Offset, ESteamSeekMethod eMethod, TSteamError *pError ); +S_API int STEAM_CALL SteamSeekFile( SteamHandle_t hFile, long int lOffset, ESteamSeekMethod eMethod, TSteamError *pError ); +S_API SteamSigned64_t STEAM_CALL SteamSizeFile64( SteamHandle_t hFile, TSteamError *pError ); +S_API long STEAM_CALL SteamSizeFile( SteamHandle_t hFile, TSteamError *pError ); +S_API SteamSigned64_t STEAM_CALL SteamTellFile64( SteamHandle_t hFile, TSteamError *pError ); +S_API long STEAM_CALL SteamTellFile( SteamHandle_t hFile, TSteamError *pError ); + +S_API int STEAM_CALL SteamStat64( const char *cszName, TSteamElemInfo64 *pInfo, TSteamError *pError ); +S_API int STEAM_CALL SteamStat( const char *cszName, TSteamElemInfo *pInfo, TSteamError *pError ); + +S_API SteamHandle_t STEAM_CALL SteamFindFirst64( const char *cszPattern, ESteamFindFilter eFilter, TSteamElemInfo64 *pFindInfo, TSteamError *pError ); +S_API SteamHandle_t STEAM_CALL SteamFindFirst( const char *cszPattern, ESteamFindFilter eFilter, TSteamElemInfo *pFindInfo, TSteamError *pError ); +S_API int STEAM_CALL SteamFindNext64( SteamHandle_t hDirectory, TSteamElemInfo64 *pFindInfo, TSteamError *pError ); +S_API int STEAM_CALL SteamFindNext( SteamHandle_t hDirectory, TSteamElemInfo *pFindInfo, TSteamError *pError ); +S_API int STEAM_CALL SteamFindClose( SteamHandle_t hDirectory, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetLocalFileCopy( const char *cszPath, TSteamError *pError ); + +S_API int STEAM_CALL SteamIsFileImmediatelyAvailable( const char *cszName, TSteamError *pError ); + +S_API int STEAM_CALL SteamHintResourceNeed( const char* cszMasterList, int bForgetEverything, TSteamError* pError ); +S_API int STEAM_CALL SteamForgetAllHints( TSteamError *pError ); + +S_API int STEAM_CALL SteamPauseCachePreloading( TSteamError *pError ); +S_API int STEAM_CALL SteamResumeCachePreloading( TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamWaitForResources( const char *cszMasterList, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamFlushCache( unsigned int uAppId, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetCacheDecryptionKey( unsigned int uCacheId, char* pchKeyBuffer, unsigned int cubBuff, unsigned int* pcubKey, TSteamError *pError ); +S_API int STEAM_CALL SteamGetCacheDefaultDirectory( char *szPath, TSteamError *pError ); +S_API int STEAM_CALL SteamSetCacheDefaultDirectory( const char *szPath, TSteamError *pError ); +S_API int STEAM_CALL SteamGetCacheFilePath( unsigned int uCacheId, char* szPathBuf, unsigned int uBufSize, unsigned int* puPathChars, TSteamError *pError ); + +S_API int STEAM_CALL SteamIsFileNeededByCache( unsigned int uCacheId, const char* pchFileName, SteamUnsigned64_t u64FileSize, TSteamError* pError ); + +S_API int STEAM_CALL SteamIsFileNeededByApp( unsigned int uAppId, const char* pchFileName, SteamUnsigned64_t u64FileSize, unsigned int* puCacheId, TSteamError* pError ); + +S_API int STEAM_CALL SteamRepairOrDecryptCaches( unsigned int uAppId, int bForceValidation, TSteamError *pError ); + +S_API int STEAM_CALL SteamCreateCachePreloaders( TSteamError *pError ); +S_API int STEAM_CALL SteamIsCacheLoadingEnabled( unsigned int uAppId, int *pbIsLoading, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamLoadCacheFromDir( unsigned int uAppId, const char *szPath, TSteamError *pError ); +S_API int STEAM_CALL SteamLoadFileToApp( unsigned int uAppId, const char* pchFileName, const void* pubDataChunk, unsigned int cubDataChunk, SteamUnsigned64_t cubDataOffset, TSteamError *pError ); +S_API int STEAM_CALL SteamLoadFileToCache( unsigned int uCacheId, const char* pchFileName, const void* pubDataChunk, unsigned int cubDataChunk, SteamUnsigned64_t cubDataOffset, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamStartLoadingCache( unsigned int uAppId, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamStopLoadingCache( unsigned int uAppId, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetFileAttributeFlags( const char* cszName, int* puFlags, TSteamError *pError ); + +S_API int STEAM_CALL SteamReleaseCacheFiles( unsigned int uAppId, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamRefreshMinimumFootprintFiles( unsigned int uAppId, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamDefragCaches( unsigned int uAppId, TSteamError* pError ); +S_API SteamCallHandle_t STEAM_CALL SteamWaitForAppResources( unsigned int uAppId, const char* cszMasterList, TSteamError* pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamGetCachePercentFragmentation( unsigned int uAppId, unsigned int* puPctFragmentation, TSteamError* pError ); + +/* +** Logging +*/ + +S_API SteamHandle_t STEAM_CALL SteamCreateLogContext( const char *cszName ); +S_API int STEAM_CALL SteamLog( SteamHandle_t hContext, const char *cszMsg ); +S_API void STEAM_CALL SteamLogResourceLoadStarted( const char *cszMsg ); +S_API void STEAM_CALL SteamLogResourceLoadFinished( const char *cszMsg ); + +/* +** Account +*/ + +S_API SteamCallHandle_t STEAM_CALL SteamCreateAccount( const char *cszUser, const char *cszEmailAddress, const char *cszPassphrase, const char *cszCreationKey, const char *cszPersonalQuestion, const char *cszAnswerToQuestion, int *pbCreated, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamDeleteAccount( TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamChangeAccountName( const char* cszCurrentPassphrase, const char* cszNewAccountName, TSteamError* pError ); +S_API SteamCallHandle_t STEAM_CALL SteamChangeEmailAddress( const char *cszNewEmailAddress, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamChangeForgottenPassword( const char* cszUser, const char* cszAnswerToQuestion, const char* cszEmailVerificationKey, const char* cszNewPassphrase, int* pbChanged, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamChangePassword( const char *cszCurrentPassphrase, const char *cszNewPassphrase, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamChangePersonalQA( const char *cszCurrentPassphrase, const char *cszNewPersonalQuestion, const char *cszNewAnswerToQuestion, TSteamError *pError ); + +S_API int STEAM_CALL SteamEnumerateApp( unsigned int uAppId, TSteamApp *pApp, TSteamError *pError ); +S_API int STEAM_CALL SteamEnumerateAppDependency( unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo *pDependencyInfo, TSteamError *pError); +S_API int STEAM_CALL SteamEnumerateAppIcon( unsigned int uAppId, unsigned int uIconIndex, unsigned char *pIconData, unsigned int uIconDataBufSize, unsigned int *puSizeOfIconData, TSteamError *pError ); +S_API int STEAM_CALL SteamEnumerateAppLaunchOption( unsigned int uAppId, unsigned int uLaunchOptionIndex, TSteamAppLaunchOption *pLaunchOption, TSteamError *pError ); +S_API int STEAM_CALL SteamEnumerateAppVersion( unsigned int uAppId, unsigned int uVersionIndex, TSteamAppVersion *pAppVersion, TSteamError *pError ); +S_API int STEAM_CALL SteamEnumerateSubscription( unsigned int uSubscriptionId, TSteamSubscription *pSubscription, TSteamError *pError ); + +S_API int STEAM_CALL SteamEnumerateSubscriptionDiscount( unsigned int uSubscriptionId, unsigned int uDiscountIndex, TSteamSubscriptionDiscount* pSubscriptionDiscount, TSteamError *pError ); +S_API int STEAM_CALL SteamEnumerateSubscriptionDiscountQualifier( unsigned int uSubscriptionId, unsigned int uDiscountIndex, unsigned int uQualifierIndex, TSteamDiscountQualifier* pDiscountQualifier, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamGenerateSuggestedAccountNames( const char* cszAccountNameToSelectMasterAS, const char* cszGenerateNamesLikeAccountName, char* pSuggestedNamesBuf, unsigned int uBufSize, unsigned int* puNumSuggestedChars, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetAccountStatus( unsigned int* puAccountStatusFlags, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamGetAppCacheSize( unsigned int uAppId, unsigned int *pCacheSizeInMb, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppDependencies( unsigned int uAppId, unsigned int puCacheIds[], unsigned int uMaxIds, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppDir( unsigned int uAppId, char* szAppDir, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppIds( unsigned int puIds[], unsigned int uMaxIds, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppPurchaseCountry( unsigned int uAppId, char* szCountryBuf, unsigned int uBufSize, unsigned int* pPurchaseTime, TSteamError* pError ); +S_API int STEAM_CALL SteamGetAppStats( TSteamAppStats *pAppStats, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppUpdateStats( unsigned int uAppId, ESteamAppUpdateStatsQueryType eQueryType, TSteamUpdateStats* pUpdateStats, TSteamError* pError ); +S_API int STEAM_CALL SteamGetAppUserDefinedInfo( unsigned int uAppId, const char *cszPropertyName, char *szPropertyValue, unsigned int uBufSize, unsigned int *puPropertyValueLength, TSteamError *pError ); +S_API int STEAM_CALL SteamGetAppUserDefinedRecord(unsigned int uAppId, KeyValueIteratorCallback_t AddEntryToKeyValueFunc, void* pvCKeyValue, TSteamError *pError); + +S_API int STEAM_CALL SteamGetCurrentEmailAddress( char *szEmailaddress, unsigned int uBufSize, unsigned int *puEmailaddressChars, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamGetNumAccountsWithEmailAddress( const char *cszEmailAddress, unsigned int *puNumAccounts, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetSponsorUrl( unsigned int uAppId, char *szUrl, unsigned int uBufSize, unsigned int *pUrlChars, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetSubscriptionExtendedInfo( unsigned int uSubscriptionId, const char* cszKeyName, char* szKeyValue, unsigned int uBufferLength, unsigned int* puRecievedLength, TSteamError *pError ); +S_API int STEAM_CALL SteamGetSubscriptionIds( unsigned int puIds[], unsigned int uMaxIds, TSteamError *pError ); +S_API int STEAM_CALL SteamGetSubscriptionPurchaseCountry( unsigned int uSubscriptionId, char* szCountryBuf, unsigned int uBufSize , int* pPurchaseTime, TSteamError *pError ); +S_API int STEAM_CALL SteamGetSubscriptionReceipt( unsigned int uSubscriptionId , TSteamSubscriptionReceipt* pSteamSubscriptionReceipt, TSteamError *pError ); +S_API int STEAM_CALL SteamGetSubscriptionStats( TSteamSubscriptionStats *pSubscriptionStats, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetTotalUpdateStats( TSteamUpdateStats *pUpdateStats, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetUser( char *szUser, unsigned int uBufSize, unsigned int *puUserChars, TSteamGlobalUserID* pOptionalReceiveUserID, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamSetUser( const char *cszUser, int *pbUserSet, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamSetUser2( const char *cszUser, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetUserType( unsigned int* puUserTypeFlags, TSteamError* pError ); + +S_API int STEAM_CALL SteamIsAccountNameInUse( const char* cszAccountName, int* pbIsUsed, TSteamError *pError ); + +S_API int STEAM_CALL SteamIsAppSubscribed( unsigned int uAppId, int *pbIsAppSubscribed, int *pbIsSubscriptionPending, TSteamError *pError ); +S_API int STEAM_CALL SteamIsSubscribed( unsigned int uSubscriptionId, int *pbIsSubscribed, int *pbIsSubscriptionPending, TSteamError *pError ); + +S_API int STEAM_CALL SteamIsLoggedIn( int *pbIsLoggedIn, TSteamError *pError ); +S_API int STEAM_CALL SteamIsSecureComputer( int *pbIsSecureComputer, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamLaunchApp( unsigned int uAppId, unsigned int uLaunchOption, const char *cszArgs, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamLogin( const char *cszUser, const char *cszPassphrase, int bIsSecureComputer, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamLogout( TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamMoveApp( unsigned int uAppId, const char *szPath, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamRefreshAccountInfo( TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamRefreshAccountInfoEx( int bContentDescriptionOnly, TSteamError* pError ); +S_API SteamCallHandle_t STEAM_CALL SteamRefreshAccountInfo2( int bRefreshAccount, int bRefreshCDDB, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamRefreshLogin( const char *cszPassphrase, int bIsSecureComputer, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamRequestAccountsByCdKeyEmail( const char* cszCdKey, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamRequestAccountsByEmailAddressEmail( const char* cszEmailAddress, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamRequestEmailAddressVerificationEmail( TSteamError* pError ); +S_API SteamCallHandle_t STEAM_CALL SteamRequestForgottenPasswordEmail( const char* cszUser, char* ReceivePersonalQuestion, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamSubscribe( unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo *pSubscriptionBillingInfo, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamUnsubscribe( unsigned int uSubscriptionId, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamUpdateAccountBillingInfo( const TSteamPaymentCardInfo *pPaymentCardInfo, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamUpdateSubscriptionBillingInfo( unsigned int uSubscriptionId, const TSteamSubscriptionBillingInfo *pSubscriptionBillingInfo, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamVerifyEmailAddress( const char* cszEmailVerificationKey, TSteamError* pError ); +S_API int STEAM_CALL SteamVerifyPassword( const char* cszPassword, int* pbCorrect, TSteamError* pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamWaitForAppReadyToLaunch( unsigned int uAppId, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamAckSubscriptionReceipt( unsigned int uSubscriptionId, TSteamError *pError ); +S_API int STEAM_CALL SteamRemoveAppDependency( unsigned int uAppId, unsigned int uIndex, TSteamError *pError ); +S_API int STEAM_CALL SteamInsertAppDependency( unsigned int uAppId, unsigned int uIndex, TSteamAppDependencyInfo *pDependencyInfo, TSteamError *pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamSetAppCacheSize( unsigned int uAppId, unsigned int nCacheSizeInMb, TSteamError *pError ); +S_API SteamCallHandle_t STEAM_CALL SteamSetAppVersion( unsigned int uAppId, unsigned int uAppVersionId, TSteamError *pError ); + +S_API unsigned int STEAM_CALL SteamNumAppsRunning( TSteamError *pError ); +S_API int STEAM_CALL SteamFindApp( const char* cszAppName, unsigned int* puAppId, TSteamError *pError ); + +S_API int STEAM_CALL SteamCheckAppOwnership( unsigned int uAppId, int* pbOwned, TSteamGlobalUserID* pSteamID, TSteamError* pError ); + +/* +** Minidump +*/ + +S_API void STEAM_CALL SteamMiniDumpInit(); + +S_API int STEAM_CALL SteamWriteMiniDumpFromAssert(unsigned int unknown1, unsigned int unknown2, unsigned int unknown3, const char *szMessage, const char *szFileName); +S_API int STEAM_CALL SteamWriteMiniDumpSetComment( const char* cszComment ); +S_API int STEAM_CALL SteamWriteMiniDumpUsingExceptionInfo(); +S_API int STEAM_CALL SteamWriteMiniDumpUsingExceptionInfoWithBuildId(); + + +/* +** User ID functions +*/ + +S_API ESteamError STEAM_CALL SteamGetEncryptedUserIDTicket( const void *pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void *pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int *pReceiveSizeOfEncryptedTicket, TSteamError *pError ); + +S_API ESteamError STEAM_CALL SteamInitializeUserIDTicketValidator( const char * pszOptionalPublicEncryptionKeyFilename, const char * pszOptionalPrivateDecryptionKeyFilename, unsigned int ClientClockSkewToleranceInSeconds, unsigned int ServerClockSkewToleranceInSeconds, unsigned int MaxNumLoginsWithinClientClockSkewTolerancePerClient, unsigned int HintPeakSimultaneousValidations, unsigned int AbortValidationAfterStallingForNProcessSteps ); +S_API ESteamError STEAM_CALL SteamShutdownUserIDTicketValidator(); + +S_API const unsigned char* STEAM_CALL SteamGetEncryptionKeyToSendToNewClient( unsigned int * pReceiveSizeOfEncryptionKey ); + +S_API ESteamError STEAM_CALL SteamStartValidatingUserIDTicket( void *pEncryptedUserIDTicketFromClient, unsigned int uSizeOfEncryptedUserIDTicketFromClient, unsigned int ObservedClientIPAddr, SteamUserIDTicketValidationHandle_t *pReceiveHandle ); +S_API ESteamError STEAM_CALL SteamStartValidatingNewValveCDKey( void *pEncryptedNewValveCDKeyFromClient, unsigned int uSizeOfEncryptedNewValveCDKeyFromClient, unsigned int ObservedClientIPAddr, struct sockaddr *pPrimaryValidateNewCDKeyServerSockAddr, struct sockaddr *pSecondaryValidateNewCDKeyServerSockAddr, SteamUserIDTicketValidationHandle_t *pReceiveHandle ); + +S_API ESteamError STEAM_CALL SteamProcessOngoingUserIDTicketValidation( SteamUserIDTicketValidationHandle_t Handle, TSteamGlobalUserID *pReceiveValidSteamGlobalUserID, unsigned int *pReceiveClientLocalIPAddr, unsigned char *pOptionalReceiveProofOfAuthenticationToken, size_t SizeOfOptionalAreaToReceiveProofOfAuthenticationToken, size_t *pOptionalReceiveSizeOfProofOfAuthenticationToken ); + +S_API void STEAM_CALL SteamAbortOngoingUserIDTicketValidation( SteamUserIDTicketValidationHandle_t Handle ); + +S_API ESteamError STEAM_CALL SteamOptionalCleanUpAfterClientHasDisconnected( unsigned int ObservedClientIPAddr, unsigned int ClientLocalIPAddr ); + + +/* +** Misc +*/ + +S_API void STEAM_CALL SteamClearError( TSteamError *pError ); + +S_API unsigned int STEAM_CALL InternalSteamNumClientsConnectedToEngine( TSteamError *pError ); +S_API int STEAM_CALL InternalSteamShouldShutdownEngine2( TSteamError *pError ); + +S_API int STEAM_CALL SteamChangeOfflineStatus( TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError ); +S_API int STEAM_CALL SteamGetOfflineStatus( TSteamOfflineStatus* pSteamOfflineStatus, TSteamError* pError ); + +S_API SteamCallHandle_t STEAM_CALL SteamUninstall( TSteamError *pError ); + +S_API int STEAM_CALL SteamWeakVerifyNewValveCDKey( const char *pszCDKeyFormattedForCDLabel, unsigned int *pReceiveGameCode, unsigned int *pReceiveSalesTerritoryCode, unsigned int *pReceiveUniqueSerialNumber ); +S_API int STEAM_CALL SteamGetEncryptedNewValveCDKey( const char *pszCDKeyFormattedForCDLabel, unsigned int ClientLocalIPAddr, const void * pEncryptionKeyReceivedFromAppServer, unsigned int uEncryptionKeyLength, void* pOutputBuffer, unsigned int uSizeOfOutputBuffer, unsigned int* pReceiveSizeOfEncryptedNewValveCDKey ); + +// Encrypts machine-specific data from the machine that is executing. +S_API ESteamError STEAM_CALL SteamDecryptDataForThisMachine +( + const uint8 *pEncryptedData, // [in] The encrypted data to decrypt. This is usually stored as a hex string. + uint32 uEncryptedDataSize, // [in] The size of the encrypted data in bytes. This is usually the number of characters in the hex string. + uint8 *pDecryptedBuffer, // [in/out] The buffer to decrypt the data into. + uint32 uDecryptedBufferSize, // [in] The size of the decryption buffer in bytes. + uint32 *puDecryptedDataSize // [out] The number of bytes that were decrypted. +); +// Decrypts machine-specific data from the machine that is executing. +S_API ESteamError STEAM_CALL SteamEncryptDataForThisMachine +( + const uint8 *pPlaintextData, // [in] The plaintext data to encrypt. + uint32 uPlaintextDataSize, // [in] The size of the plaintext data in bytes. + uint8 *pEncryptedBuffer, // [in/out] The buffer to encrypt the data into. + uint32 uEncryptedBufferSize, // [in] The size of the encryption buffer in bytes. + uint32 *puEncryptedDataSize // [out] The number of bytes that were used in the encryption buffer. +); + +S_API const char* STEAM_CALL SteamFindServersGetErrorString(); +S_API int STEAM_CALL SteamFindServersIterateServer(ESteamServerType eSteamServerType, unsigned int uIndex, char *szServerAddress, int iServerAddressChars); +S_API int STEAM_CALL SteamFindServersNumServers( ESteamServerType eSteamServerType ); + +S_API int STEAM_CALL SteamGetContentServerInfo( unsigned int uAppId, unsigned int* pServerId, unsigned int* pServerIpAddress, TSteamError *pError ); + +S_API int STEAM_CALL SteamSetNotificationCallback( SteamNotificationCallback_t pCallbackFunction, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetAppDLCStatus( unsigned int uAppId, unsigned int uDLCCacheId, int *pbDownloaded, TSteamError *pError ); + +S_API int STEAM_CALL SteamIsUsingSdkContentServer( int *pbUsingSdkCS, TSteamError *pError ); + +S_API int STEAM_CALL SteamForceCellId( unsigned int uCellId, TSteamError* pError ); + +S_API int STEAM_CALL SteamWasBlobRegistryDeleted( int *puWasDeleted, TSteamError *pError ); + +S_API int STEAM_CALL SteamGetDepotParent( unsigned int uDepotId, unsigned int* puParentId, TSteamError* pError ); + +S_API int STEAM_CALL GetCurrentCellID( unsigned int* puCellID, unsigned int* puPing, TSteamError* pError ); + +#endif // STEAM_H diff --git a/src/public SDK/SteamAPI.h b/src/public SDK/SteamAPI.h new file mode 100644 index 0000000..ffd945d --- /dev/null +++ b/src/public SDK/SteamAPI.h @@ -0,0 +1,37 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef STEAMAPI_H +#define STEAMAPI_H +#ifdef _WIN32 +#pragma once +#endif + + +// includes +#include "SteamTypes.h" + +// extern function declarations +#include "Steam.h" + + +// inline interface utils +#include "Interface_OSW.h" + + + +#endif // STEAMAPI_H diff --git a/src/public SDK/SteamSalt.h b/src/public SDK/SteamSalt.h new file mode 100644 index 0000000..3972c68 --- /dev/null +++ b/src/public SDK/SteamSalt.h @@ -0,0 +1,28 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef STEAMSALT_H +#define STEAMSALT_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct SteamSalt +{ + unsigned char uchSalt[STEAM_SALT_SIZE]; +} SteamSalt_t; + +#endif // STEAMSALT_H diff --git a/src/public SDK/SteamTypes.h b/src/public SDK/SteamTypes.h new file mode 100644 index 0000000..c9852f6 --- /dev/null +++ b/src/public SDK/SteamTypes.h @@ -0,0 +1,1023 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef STEAMTYPES_H +#define STEAMTYPES_H +#ifdef _WIN32 +#pragma once +#endif + +// Compiler checks + +#if defined(_MSC_VER) + + #if _MSC_VER < 1400 + #error "OpenSteamworks requires MSVC 2005 or better" + #endif + +#elif defined(__GNUC__) + + #if defined(_WIN32) + #if (__GNUC__ < 4 || __GNUC_MINOR__ < 6) && !defined(_S4N_) + #error "OpenSteamworks requires GCC 4.6 or better on windows" + #endif + #elif defined(__linux__) || defined(__APPLE_CC__) + #if __GNUC__ < 4 + #error "OpenSteamworks requires GCC 4.X (4.2 or 4.4 have been tested)" + #endif + #else + #error "Unsupported OS: OpenSteamworks can only be used with Windows, Mac OS X or Linux" + #endif + +#else + #error "Unsupported compiler: OpenSteamworks can only be used with MSVC, GCC or CLANG" +#endif + + + +#if defined(_WIN32) + #ifndef _S4N_ + #if defined(_MSC_VER) && _MSC_VER > 1400 + #include + #else + #if !defined(_WIN32_WINNT) + #define _WIN32_WINNT 0x0502 + #endif + #if !defined(WINVER) + #define WINVER _WIN32_WINNT + #endif + #endif + + #include + + #undef SendMessage // for ISteamGameCoordinator001 to work right.. + #undef CreateProcess // for ISteam2Bridge + #endif + + #if defined( STEAM_API_EXPORTS ) + #define S_API extern "C" __declspec( dllexport ) + #else + #define S_API extern "C" __declspec( dllimport ) + #endif // STEAM_API_EXPORTS +#else + #include // dlopen,dlclose, et al + #include + #include + #include + + #define S_API extern "C" +#endif + + +#ifdef __GNUC__ + typedef unsigned int errno_t; + + #ifdef _S4N_ + typedef unsigned int size_t; + #define NULL 0 + #endif +#endif + +#ifdef _WIN32 + #define STEAM_CALL __cdecl +#else + #define STEAM_CALL +#endif + +#if defined(__x86_64__) || defined(_WIN64) + #define X64BITS +#endif + +typedef unsigned char uint8; +typedef signed char int8; + +#if defined( _MSC_VER ) + + typedef __int16 int16; + typedef unsigned __int16 uint16; + typedef __int32 int32; + typedef unsigned __int32 uint32; + typedef __int64 int64; + typedef unsigned __int64 uint64; + + #ifdef X64BITS + typedef __int64 intp; // intp is an integer that can accomodate a pointer + typedef unsigned __int64 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *) + #else + typedef __int32 intp; + typedef unsigned __int32 uintp; + #endif + +#else // _MSC_VER + + typedef short int16; + typedef unsigned short uint16; + typedef int int32; + typedef unsigned int uint32; + typedef long long int64; + typedef unsigned long long uint64; + #ifdef X64BITS + typedef long long intp; + typedef unsigned long long uintp; + #else + typedef int intp; + typedef unsigned int uintp; + #endif + +#endif // else _MSC_VER + + +#ifndef abstract_class + #ifdef _MSC_VER + #define abstract_class class __declspec( novtable ) + #else + #define abstract_class class + #endif +#endif + + +#ifdef _MSC_VER + #define STEAMWORKS_DEPRECATE( Message ) __declspec(deprecated(#Message)) +#elif defined(__GNUC__) + #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) + #define STEAMWORKS_DEPRECATE( Message ) __attribute__((__deprecated__(#Message))) + #else + #define STEAMWORKS_DEPRECATE( Message ) __attribute__((__deprecated__)) + #endif +#else + #define STEAMWORKS_DEPRECATE( Message ) +#endif + +#ifndef STEAMWORKS_OBSOLETE_INTERFACES + #define OBSOLETE_INTERFACE STEAMWORKS_DEPRECATE("This interface is obsolete and is not available in the latest builds of Steam. #define STEAMWORKS_OBSOLETE_INTERFACES to suppress this warning.") +#else + #define OBSOLETE_INTERFACE +#endif + +#ifndef STEAMWORKS_OBSOLETE_FUNCTIONS + #define OBSOLETE_FUNCTION STEAMWORKS_DEPRECATE("This function is obsolete and is not available in the latest builds of Steam. #define STEAMWORKS_OBSOLETE_FUNCTIONS to suppress this warning.") +#else + #define OBSOLETE_FUNCTION +#endif + +#ifndef STEAMWORKS_OBSOLETE_CALLBACKS + #define OBSOLETE_CALLBACK STEAMWORKS_DEPRECATE("This callback is obsolete and will not be triggered in the latest builds of Steam. #define STEAMWORKS_OBSOLETE_CALLBACKS to suppress this warning.") +#else + #define OBSOLETE_CALLBACK +#endif + +#ifndef STEAMWORKS_CLIENT_INTERFACES + #define UNSAFE_INTERFACE STEAMWORKS_DEPRECATE("IClient interfaces are unversioned and potentially unsafe. Class definition can change between steamclient releases. #define STEAMWORKS_CLIENT_INTERFACES to suppress this warning.") +#else + #define UNSAFE_INTERFACE +#endif + +#ifndef STEAM_API_NON_VERSIONED_INTERFACES + #ifdef _MSC_VER + #define S_API_UNSAFE extern "C" __declspec( dllexport ) STEAMWORKS_DEPRECATE("Steam*() interface accessing functions are unversioned and potentially unsafe. These are versioned to assume you are using the latest version of the steam_api loader, if this is not the case your code is likely to crash, read the comment above the functions to learn about the version safe accessing method that will account for newer steam_api versions, older versions are always unsupported. #define STEAM_API_NON_VERSIONED_INTERFACES to suppress this warning.") + #elif defined(__GNUC__) + #if defined(__linux__) || defined(__APPLE_CC__) + #define S_API_UNSAFE extern "C" STEAMWORKS_DEPRECATE("Steam*() interface accessing functions are unversioned and potentially unsafe. These are versioned to assume you are using the latest version of the steam_api loader, if this is not the case your code is likely to crash, read the comment above the functions to learn about the version safe accessing method that will account for newer steam_api versions, older versions are always unsupported. #define STEAM_API_NON_VERSIONED_INTERFACES to suppress this warning.") + #else + #define S_API_UNSAFE extern "C" __declspec( dllexport ) STEAMWORKS_DEPRECATE("Steam*() interface accessing functions are unversioned and potentially unsafe. These are versioned to assume you are using the latest version of the steam_api loader, if this is not the case your code is likely to crash, read the comment above the functions to learn about the version safe accessing method that will account for newer steam_api versions, older versions are always unsupported. #define STEAM_API_NON_VERSIONED_INTERFACES to suppress this warning.") + #endif + #else + #define S_API_UNSAFE extern "C" + #endif +#else + #ifdef _WIN32 + #define S_API_UNSAFE extern "C" __declspec( dllexport ) + #else + #define S_API_UNSAFE extern "C" + #endif +#endif + +#if defined(_WIN32) && defined(__GNUC__) && !defined(_S4N_) + #define STEAMWORKS_STRUCT_RETURN_0(returnType, functionName) \ + virtual void functionName( returnType& ret ) = 0; \ + inline returnType functionName() \ + { \ + returnType ret; \ + this->functionName(ret); \ + return ret; \ + } + #define STEAMWORKS_STRUCT_RETURN_1(returnType, functionName, arg1Type, arg1Name) \ + virtual void functionName( returnType& ret, arg1Type arg1Name ) = 0; \ + inline returnType functionName( arg1Type arg1Name ) \ + { \ + returnType ret; \ + this->functionName(ret, arg1Name); \ + return ret; \ + } + #define STEAMWORKS_STRUCT_RETURN_2(returnType, functionName, arg1Type, arg1Name, arg2Type, arg2Name) \ + virtual void functionName( returnType& ret, arg1Type arg1Name, arg2Type arg2Name ) = 0; \ + inline returnType functionName( arg1Type arg1Name, arg2Type arg2Name ) \ + { \ + returnType ret; \ + this->functionName(ret, arg1Name, arg2Name); \ + return ret; \ + } + #define STEAMWORKS_STRUCT_RETURN_3(returnType, functionName, arg1Type, arg1Name, arg2Type, arg2Name, arg3Type, arg3Name) \ + virtual void functionName( returnType& ret, arg1Type arg1Name, arg2Type arg2Name, arg3Type arg3Name ) = 0; \ + inline returnType functionName( arg1Type arg1Name, arg2Type arg2Name, arg3Type arg3Name ) \ + { \ + returnType ret; \ + this->functionName(ret, arg1Name, arg2Name, arg3Name); \ + return ret; \ + } +#else + #define STEAMWORKS_STRUCT_RETURN_0(returnType, functionName) virtual returnType functionName() = 0; + #define STEAMWORKS_STRUCT_RETURN_1(returnType, functionName, arg1Type, arg1Name) virtual returnType functionName( arg1Type arg1Name ) = 0; + #define STEAMWORKS_STRUCT_RETURN_2(returnType, functionName, arg1Type, arg1Name, arg2Type, arg2Name) virtual returnType functionName( arg1Type arg1Name, arg2Type arg2Name ) = 0; + #define STEAMWORKS_STRUCT_RETURN_3(returnType, functionName, arg1Type, arg1Name, arg2Type, arg2Name, arg3Type, arg3Name) virtual returnType functionName( arg1Type arg1Name, arg2Type arg2Name, arg3Type arg3Name ) = 0; +#endif + +// steamclient/api + +#include "EResult.h" + + +// lobby type description +enum ELobbyType +{ + k_ELobbyTypePrivate = 0, // only way to join the lobby is to invite to someone else + k_ELobbyTypeFriendsOnly = 1, // shows for friends or invitees, but not in lobby list + k_ELobbyTypePublic = 2, // visible for friends and in lobby list + k_ELobbyTypeInvisible = 3, // returned by search, but not visible to other friends + // useful if you want a user in two lobbies, for example matching groups together + // a user can be in only one regular lobby, and up to two invisible lobbies +}; + +//----------------------------------------------------------------------------- +// Purpose: Possible positions to tell the overlay to show notifications in +//----------------------------------------------------------------------------- +enum ENotificationPosition +{ + k_EPositionTopLeft = 0, + k_EPositionTopRight = 1, + k_EPositionBottomLeft = 2, + k_EPositionBottomRight = 3, +}; + +//----------------------------------------------------------------------------- +// Purpose: Used in ChatInfo messages - fields specific to a chat member - must fit in a uint32 +//----------------------------------------------------------------------------- +enum EChatMemberStateChange +{ + // Specific to joining / leaving the chatroom + k_EChatMemberStateChangeEntered = 0x0001, // This user has joined or is joining the chat room + k_EChatMemberStateChangeLeft = 0x0002, // This user has left or is leaving the chat room + k_EChatMemberStateChangeDisconnected = 0x0004, // User disconnected without leaving the chat first + k_EChatMemberStateChangeKicked = 0x0008, // User kicked + k_EChatMemberStateChangeBanned = 0x0010, // User kicked and banned +}; + + +enum EServerMode +{ + eServerModeInvalid = 0, // DO NOT USE + eServerModeNoAuthentication = 1, // Don't authenticate user logins and don't list on the server list + eServerModeAuthentication = 2, // Authenticate users, list on the server list, don't run VAC on clients that connect + eServerModeAuthenticationAndSecure = 3, // Authenticate users, list on the server list and VAC protect clients +}; + +// Steam universes. Each universe is a self-contained Steam instance. +enum EUniverse +{ + k_EUniverseInvalid = 0, + k_EUniversePublic = 1, + k_EUniverseBeta = 2, + k_EUniverseInternal = 3, + k_EUniverseDev = 4, +// k_EUniverseRC = 5, // Removed + + k_EUniverseMax +}; + + + +// these is outside NO_STEAM because external things use it +#include "ESteamError.h" +#include "ESteamNotify.h" + +#ifndef NO_STEAM +// steam +#include "ESteamSeekMethod.h" +#include "ESteamBufferMethod.h" +#include "ESteamFindFilter.h" +#include "ESteamSubscriptionBillingInfoType.h" +#include "ESteamPaymentCardType.h" +#include "ESteamAppUpdateStatsQueryType.h" +#include "ESteamSubscriptionStatus.h" +#include "ESteamServerType.h" +#endif // NO_STEAM + + +#ifdef __clang__ +# define CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define CLANG_ATTR(ATTR) +#endif + +#define METHOD_DESC(DESC) CLANG_ATTR( "desc:" #DESC ";" ) +#define IGNOREATTR() CLANG_ATTR( "ignore" ) +#define OUT_STRUCT() CLANG_ATTR( "out_struct: ;" ) +#define OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define OUT_ARRAY_COUNT(COUNTER, DESC) CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC ) +#define ARRAY_COUNT(COUNTER) CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define ARRAY_COUNT_D(COUNTER, DESC) CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define BUFFER_COUNT(COUNTER) CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define OUT_BUFFER_COUNT(COUNTER) CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define OUT_STRING_COUNT(COUNTER) CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +#define DESC(DESC) CLANG_ATTR("desc:" #DESC ";") + +//----------------------------------------------------------------------------- +// Purpose: Used by ICrashHandler interfaces to reference particular installed crash handlers +//----------------------------------------------------------------------------- +typedef void *BREAKPAD_HANDLE; +#define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0 + +const int k_cubDigestSize = 20; // CryptoPP::SHA::DIGESTSIZE +const int k_cubSaltSize = 8; + +const int k_cchGameExtraInfoMax = 64; + +// Max number of credit cards stored for one account +const int k_nMaxNumCardsPerAccount = 1; + +// game server flags +const uint32 k_unServerFlagNone = 0x00; +const uint32 k_unServerFlagActive = 0x01; // server has users playing +const uint32 k_unServerFlagSecure = 0x02; // server wants to be secure +const uint32 k_unServerFlagDedicated = 0x04; // server is dedicated +const uint32 k_unServerFlagLinux = 0x08; // linux build +const uint32 k_unServerFlagPassworded = 0x10; // password protected +const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master server and + // won't enforce authentication of users that connect to the server. + // Useful when you run a server where the clients may not + // be connected to the internet but you want them to play (i.e LANs) + +//----------------------------------------------------------------------------- +// Constants used for query ports. +//----------------------------------------------------------------------------- +#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet. +#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server. + + +typedef uint8 SHADigest_t[ k_cubDigestSize ]; +typedef uint8 Salt_t[ k_cubSaltSize ]; + +//----------------------------------------------------------------------------- +// GID (GlobalID) stuff +// This is a globally unique identifier. It's guaranteed to be unique across all +// racks and servers for as long as a given universe persists. +//----------------------------------------------------------------------------- +// NOTE: for GID parsing/rendering and other utils, see gid.h +typedef uint64 GID_t; + +const GID_t k_GIDNil = 0xffffffffffffffffull; + +// For convenience, we define a number of types that are just new names for GIDs +typedef uint64 JobID_t; // Each Job has a unique ID +typedef GID_t TxnID_t; // Each financial transaction has a unique ID + +const JobID_t k_JobIDNil = 0xffffffffffffffffull; + +const GID_t k_TxnIDNil = k_GIDNil; +const GID_t k_TxnIDUnknown = 0; + + +// this is baked into client messages and interfaces as an int, +// make sure we never break this. +typedef uint32 PackageId_t; +const PackageId_t k_uPackageIdFreeSub = 0x0; +const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF; +const PackageId_t k_uPackageIdWallet = -2; +const PackageId_t k_uPackageIdMicroTxn = -3; + +typedef uint32 BundleId_t; +const BundleId_t k_uBundleIdInvalid = 0; + +// this is baked into client messages and interfaces as an int, +// make sure we never break this. +typedef uint32 AppId_t; +const AppId_t k_uAppIdInvalid = 0x0; +const AppId_t k_nGameIDNotepad = 65535; +const AppId_t k_nGameIDCSSTestApp = 65534; +const AppId_t k_nGameIDDRMTestApp_Static = 6710; +const AppId_t k_nGameIDDRMTestApp_Blob = 6711; +const AppId_t k_nGameIDDRMTestApp_Dynamic = 6712; +const AppId_t k_nGameIDDRMTestApp_SDK = 6713; +const AppId_t k_nGameIDWinUI = 7; +const AppId_t k_nGameIDWinUI2 = 8; +const AppId_t k_nGameIDCS = 10; +const AppId_t k_nGameIDTFC = 20; +const AppId_t k_nGameIDDOD = 30; +const AppId_t k_nGameIDDMC = 40; +const AppId_t k_nGameIDOpFor = 50; +const AppId_t k_nGameIDRicochet = 60; +const AppId_t k_nGameIDHL1 = 70; +const AppId_t k_nGameIDCZero = 80; +const AppId_t k_nGameIDCSBeta = 150; +const AppId_t k_nGameIDMacVAC = 160; +const AppId_t k_nGameIDWinVAC = 202; +const AppId_t k_nGameIDScreenshots = 760; +const AppId_t k_nGameDRMTest = 199; +const AppId_t k_nGameIDBaseSourceSDK = 215; +const AppId_t k_nGameIDHL2 = 220; +const AppId_t k_nDepotHL2Buka = 235; +const AppId_t k_nGameIDCSS = 240; +const AppId_t k_nGameIDCSSBeta = 260; +const AppId_t k_nGameHL1SRC = 280; +const AppId_t k_nGameIDDODSRC = 300; +const AppId_t k_nGameIDHL2DM = 320; +const AppId_t k_nGameIDPortal = 400; +const AppId_t k_nGameIDHL2EP2 = 420; +const AppId_t k_nGameIDTF2 = 440; +const AppId_t k_nGameIDL4D = 500; +const AppId_t k_nGameIDL4DDemo = 530; +const AppId_t k_nGameIDL4D2 = 550; +const AppId_t k_nGameIDASW = 630; +const AppId_t k_nGameIDTF2Staging = 810; +const AppId_t k_nGameIDPortal2Main = 852; +const AppId_t k_nGameIDPortal2 = 620; +const AppId_t k_nGameIDASWMain = 877; +const AppId_t k_nGameIDDOTA = 882; +const AppId_t k_nGameIDASWStaging = 886; +const AppId_t k_nGameIDRedOrchestra = 1200; +const AppId_t k_nGameIDRedOrchestraBeta = 1210; +const AppId_t k_nGameIDKillingFloor = 1250; +const AppId_t k_nGameIDSin1 = 1309; +const AppId_t k_nGameIDEarth2160 = 1900; +const AppId_t k_nGameIDTheShip = 2400; +const AppId_t k_nGameIDTheShipBeta = 2410; +const AppId_t k_nGameIDDarkMessiahSP = 2100; +const AppId_t k_nGameIDDarkMessiahMPBeta = 2110; +const AppId_t k_nGameIDDarkMessiahMP = 2115; +const AppId_t k_nGameIDDarkMessiahSPDemo = 2120; +const AppId_t k_nGameIDDarkMessiahFix = 2130; +const AppId_t k_nGameRaceWTCC = 4230; +const AppId_t k_nGameIDLostPlanetOld = 6500; +const AppId_t k_nGameIDLostPlanet = 6510; +const AppId_t k_nGameIDNBA2K9 = 7740; +const AppId_t k_nGameIDCallofDuty4 = 7940; +const AppId_t k_nMLBFrontOfficeManager = 7780; +const AppId_t k_nGameIDMW2SP = 10180; +const AppId_t k_nGameIDMW2MP = 10190; +const AppId_t k_nGameIDIW5SP = 42680; +const AppId_t k_nGameIDIW5MP = 42690; +const AppId_t k_nGameIDCODBLOPSSP = 42700; +const AppId_t k_nGameIDCODBLOPSMP = 42710; +const AppId_t k_nGameIDEmpireTotalWar = 10500; +const AppId_t k_nGameCSSOnline = 11600; +const AppId_t k_nGameIDFirstSource = 200; +const AppId_t k_nGameIDLastSource = 999; +const AppId_t k_nGameIDFirstGoldSource = 10; +const AppId_t k_nGameIDLastGoldSource = 199; +const AppId_t k_nGameIDFirstNonSource = 1000; +const AppId_t k_nGameIDMax = 2147483647; +const AppId_t k_nGameIDStress = 30020; +const AppId_t k_nGameIDGCTest = 30100; +const AppId_t k_nAppATIDriver_Vista7_32 = 61800; +const AppId_t k_nAppATIDriver_Vista7_64 = 61810; +const AppId_t k_nAppATIDriver_XP_32 = 61820; +const AppId_t k_nAppATIDriver_XP_64 = 61830; + +typedef enum ShareType_t +{ + SHARE_STOPIMMEDIATELY = 0, + SHARE_RATIO = 1, + SHARE_MANUAL = 2, +} ShareType_t; + +typedef uint64 AssetClassId_t; +const AssetClassId_t k_ulAssetClassIdInvalid = 0x0; + +typedef uint32 PhysicalItemId_t; +const PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0; + +// this is baked into client messages and interfaces as an int, +// make sure we never break this. AppIds and DepotIDs also presently +// share the same namespace, but since we'd like to change that in the future +// I've defined it seperately here. +typedef uint32 DepotId_t; +const DepotId_t k_uDepotIdInvalid = 0x0; + +typedef int HVoiceCall; + + +// RTime32 +// We use this 32 bit time representing real world time. +// It offers 1 second resolution beginning on January 1, 1970 (Unix time) +typedef uint32 RTime32; +const RTime32 k_RTime32Nil = 0; +const RTime32 k_RTime32MinValid = 10; +const RTime32 k_RTime32Infinite = 2147483647; + +typedef uint32 CellID_t; +const CellID_t k_uCellIDInvalid = 0xFFFFFFFF; + +// handle to a Steam API call +typedef uint64 SteamAPICall_t; +const SteamAPICall_t k_uAPICallInvalid = 0x0; + +typedef uint32 AccountID_t; + +typedef uint32 PartnerId_t; + +// handle to a communication pipe to the Steam client +typedef int32 HSteamPipe; +// handle to single instance of a steam user +typedef int32 HSteamUser; +// reference to a steam call, to filter results by +typedef int32 HSteamCall; + +//----------------------------------------------------------------------------- +// Typedef for handle type you will receive when requesting server list. +//----------------------------------------------------------------------------- +typedef void* HServerListRequest; + +// return type of GetAuthSessionTicket +typedef uint32 HAuthTicket; +const HAuthTicket k_HAuthTicketInvalid = 0; + +typedef int HNewItemRequest; +typedef uint64 ItemID; + +typedef uint32 HTTPRequestHandle; + +typedef int unknown_ret; // unknown return value + +// returns true of the flags indicate that a user has been removed from the chat +#define BChatMemberStateChangeRemoved( rgfChatMemberStateChangeFlags ) ( rgfChatMemberStateChangeFlags & ( k_EChatMemberStateChangeDisconnected | k_EChatMemberStateChangeLeft | k_EChatMemberStateChangeKicked | k_EChatMemberStateChangeBanned ) ) + +typedef void (*PFNLegacyKeyRegistration)( const char *pchCDKey, const char *pchInstallPath ); +typedef bool (*PFNLegacyKeyInstalled)(); + +const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF; +const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF; +// we allow 3 simultaneous user account instances right now, 1= desktop, 2 = console, 4 = web, 0 = all +const unsigned int k_unSteamUserDesktopInstance = 1; +const unsigned int k_unSteamUserConsoleInstance = 2; +const unsigned int k_unSteamUserWebInstance = 4; + +// Special flags for Chat accounts - they go in the top 8 bits +// of the steam ID's "instance", leaving 12 for the actual instances +enum EChatSteamIDInstanceFlags +{ + k_EChatAccountInstanceMask = 0x00000FFF, // top 8 bits are flags + + k_EChatInstanceFlagClan = ( k_unSteamAccountInstanceMask + 1 ) >> 1, // top bit + k_EChatInstanceFlagLobby = ( k_unSteamAccountInstanceMask + 1 ) >> 2, // next one down, etc + k_EChatInstanceFlagMMSLobby = ( k_unSteamAccountInstanceMask + 1 ) >> 3, // next one down, etc + + // Max of 8 flags +}; + +#define STEAM_USING_FILESYSTEM (0x00000001) +#define STEAM_USING_LOGGING (0x00000002) +#define STEAM_USING_USERID (0x00000004) +#define STEAM_USING_ACCOUNT (0x00000008) +#define STEAM_USING_ALL (0x0000000f) +#define STEAM_MAX_PATH (255) +#define STEAM_QUESTION_MAXLEN (255) +#define STEAM_SALT_SIZE (8) + +#define STEAM_DATE_SIZE (9) +#define STEAM_TIME_SIZE (9) +#define STEAM_CARD_NUMBER_SIZE (17) +#define STEAM_CONFIRMATION_CODE_SIZE (22) +#define STEAM_CARD_HOLDERNAME_SIZE (100) +#define STEAM_CARD_APPROVAL_CODE_SIZE (100) +#define STEAM_CARD_EXPYEAR_SIZE (4) +#define STEAM_CARD_LASTFOURDIGITS_SIZE (4) +#define STEAM_CARD_EXPMONTH_SIZE (2) +#define STEAM_CARD_CVV2_SIZE (5) +#define STEAM_BILLING_ADDRESS1_SIZE (128) +#define STEAM_BILLING_ADDRESS2_SIZE (128) +#define STEAM_BILLING_CITY_SIZE (50) +#define STEAM_BILLING_ZIP_SIZE (16) +#define STEAM_BILLING_STATE_SIZE (32) +#define STEAM_BILLING_COUNTRY_SIZE (32) +#define STEAM_BILLING_PHONE_SIZE (20) +#define STEAM_BILLING_EMAIL_SIZE (100) +#define STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE (20) +#define STEAM_PROOF_OF_PURCHASE_TOKEN_SIZE (200) +#define STEAM_EXTERNAL_ACCOUNTNAME_SIZE (100) +#define STEAM_EXTERNAL_ACCOUNTPASSWORD_SIZE (80) + +#define IS_STEAM_ERROR(e) (e.eSteamError != eSteamErrorNone) + +typedef unsigned int SteamHandle_t; + +typedef void * SteamUserIDTicketValidationHandle_t; + +typedef unsigned int SteamCallHandle_t; + +#if defined(_MSC_VER) + typedef __int64 SteamSigned64_t; + typedef unsigned __int64 SteamUnsigned64_t; +#else + typedef long long SteamSigned64_t; + typedef unsigned long long SteamUnsigned64_t; +#endif + + +#ifdef __cplusplus + +const SteamHandle_t STEAM_INVALID_HANDLE = 0; +const SteamCallHandle_t STEAM_INVALID_CALL_HANDLE = 0; +const SteamUserIDTicketValidationHandle_t STEAM_INACTIVE_USERIDTICKET_VALIDATION_HANDLE = 0; +const unsigned int STEAM_USE_LATEST_VERSION = 0xFFFFFFFF; + +#else + +#define STEAM_INVALID_HANDLE ((SteamHandle_t)(0)) +#define STEAM_INVALID_CALL_HANDLE ((SteamCallHandle_t)(0)) +#define STEAM_INACTIVE_USERIDTICKET_VALIDATION_HANDLE ((SteamUserIDTicketValidationHandle_t)(0)) +#define STEAM_USE_LATEST_VERSION (0xFFFFFFFFu); + +#endif + + +// Each Steam instance (licensed Steam Service Provider) has a unique SteamInstanceID_t. +// +// Each Steam instance as its own DB of users. +// Each user in the DB has a unique SteamLocalUserID_t (a serial number, with possible +// rare gaps in the sequence). + +typedef unsigned short SteamInstanceID_t; // MUST be 16 bits + +#if defined (_MSC_VER) + typedef unsigned __int64 SteamLocalUserID_t; // MUST be 64 bits +#else + typedef unsigned long long SteamLocalUserID_t; // MUST be 64 bits +#endif + + +typedef char SteamPersonalQuestion_t[ STEAM_QUESTION_MAXLEN + 1 ]; + + +typedef void* (*CreateInterfaceFn)( const char *pName, int *pReturnCode ); +typedef void* (*FactoryFn)( const char *pName ); +typedef void* (*InstantiateInterfaceFn)( void ); + +typedef void (*SteamAPIWarningMessageHook_t)(int hpipe, const char *message); +typedef void( *SteamAPI_PostAPIResultInProcess_t )(SteamAPICall_t callHandle, void *, uint32 unCallbackSize, int iCallbackNum); +typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum ); +typedef void (*KeyValueIteratorCallback_t)(const char* key, const char* value, void* kv); + +typedef void (*SteamNotificationCallback_t)(ESteamNotify eEvent, unsigned int nData); + +typedef bool (*SteamBGetCallbackFn)( int hpipe, void *pCallbackMsg ); +typedef void (*SteamFreeLastCallbackFn)( int hpipe ); +typedef bool (*SteamGetAPICallResultFn)( int hpipe, uint64 hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed ); + +//----------------------------------------------------------------------------- +// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback +// just before minidump file is captured after a crash has occurred. (Allows app to append additional comment data to the dump, etc.) +//----------------------------------------------------------------------------- +typedef void (*PFNPreMinidumpCallback)(void *context); + +//----------------------------------------------------------------------------- +// Purpose: Base values for callback identifiers, each callback must +// have a unique ID. +//----------------------------------------------------------------------------- +enum ECallbackType +{ + k_iSteamUserCallbacks = 100, + k_iSteamGameServerCallbacks = 200, + k_iSteamFriendsCallbacks = 300, + k_iSteamBillingCallbacks = 400, + k_iSteamMatchmakingCallbacks = 500, + k_iSteamContentServerCallbacks = 600, + k_iSteamUtilsCallbacks = 700, + k_iClientFriendsCallbacks = 800, + k_iClientUserCallbacks = 900, + k_iSteamAppsCallbacks = 1000, + k_iSteamUserStatsCallbacks = 1100, + k_iSteamNetworkingCallbacks = 1200, + k_iClientRemoteStorageCallbacks = 1300, + //k_iSteamUserItemsCallbacks = 1400, + k_iClientDepotBuilderCallbacks = 1400, + k_iSteamGameServerItemsCallbacks = 1500, + k_iClientUtilsCallbacks = 1600, + k_iSteamGameCoordinatorCallbacks = 1700, + k_iSteamGameServerStatsCallbacks = 1800, + k_iSteam2AsyncCallbacks = 1900, + k_iSteamGameStatsCallbacks = 2000, + k_iClientHTTPCallbacks = 2100, + k_iClientScreenshotsCallbacks = 2200, + k_iSteamScreenshotsCallbacks = 2300, + k_iClientAudioCallbacks = 2400, + k_iClientUnifiedMessagesCallbacks = 2500, + k_iSteamStreamLauncherCallbacks = 2600, + k_iClientControllerCallbacks = 2700, + k_iSteamControllerCallbacks = 2800, + k_iClientParentalSettingsCallbacks = 2900, + k_iClientDeviceAuthCallbacks = 3000, + k_iClientNetworkDeviceManagerCallbacks = 3100, + k_iClientMusicCallbacks = 3200, + k_iClientRemoteClientManagerCallbacks = 3300, + k_iClientUGCCallbacks = 3400, + k_iSteamStreamClientCallbacks = 3500, + k_IClientProductBuilderCallbacks = 3600, + k_iClientShortcutsCallbacks = 3700, + k_iClientRemoteControlManagerCallbacks = 3800, + k_iSteamAppListCallbacks = 3900, + k_iSteamMusicCallbacks = 4000, + k_iSteamMusicRemoteCallbacks = 4100, + k_iClientVRCallbacks = 4200, + k_iClientReservedCallbacks = 4300, + k_iSteamReservedCallbacks = 4400, + k_iSteamHTMLSurfaceCallbacks = 4500, + k_iClientVideoCallbacks = 4600, + k_iClientInventoryCallbacks = 4700 +}; + + +//----------------------------------------------------------------------------- +// The CALLBACK macros are for client side callback logging enabled with +// log_callback +// Do not change any of these. +//----------------------------------------------------------------------------- + +struct SteamCallback_t +{ +public: + SteamCallback_t() {} +}; + +#ifndef REFERENCE +#define REFERENCE(arg) ((void)arg) +#endif + +#define DEFINE_CALLBACK( callbackname, callbackid ) \ +struct callbackname : SteamCallback_t { \ + enum { k_iCallback = callbackid }; \ + static callbackname *GetNullPointer() { return 0; } \ + static const char *GetCallbackName() { return #callbackname; } \ + static uint32 GetCallbackID() { return callbackname::k_iCallback; } + +#define CALLBACK_MEMBER( varidx, vartype, varname ) \ +public: vartype varname ; \ + static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ + varOffset = (unsigned int)(size_t)&GetNullPointer()->varname; \ + varSize = sizeof( vartype ); \ + varCount = 1; \ + *pszName = #varname; *pszType = #vartype; } + +#define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) \ +public: vartype varname [ varcount ]; \ + static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ + varOffset = (unsigned int)(size_t)&GetNullPointer()->varname[0]; \ + varSize = sizeof( vartype ); \ + varCount = varcount; \ + *pszName = #varname; *pszType = #vartype; } + + +#define END_CALLBACK_INTERNAL_BEGIN( numvars ) \ + static uint32 GetNumMemberVariables() { return numvars; } \ + static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ + switch ( index ) { default : return false; + + +#define END_CALLBACK_INTERNAL_SWITCH( varidx ) case varidx : GetMemberVar_##varidx( varOffset, varSize, varCount, pszName, pszType ); return true; + +#define END_CALLBACK_INTERNAL_END() }; } }; + +#define END_DEFINE_CALLBACK_0() \ + static uint32 GetNumMemberVariables() { return 0; } \ + 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; } \ + }; + + +#define END_DEFINE_CALLBACK_1() \ + END_CALLBACK_INTERNAL_BEGIN( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_2() \ + END_CALLBACK_INTERNAL_BEGIN( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_3() \ + END_CALLBACK_INTERNAL_BEGIN( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_4() \ + END_CALLBACK_INTERNAL_BEGIN( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_5() \ + END_CALLBACK_INTERNAL_BEGIN( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_END() + + +#define END_DEFINE_CALLBACK_6() \ + END_CALLBACK_INTERNAL_BEGIN( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_7() \ + END_CALLBACK_INTERNAL_BEGIN( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_8() \ + END_CALLBACK_INTERNAL_BEGIN( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_9() \ + END_CALLBACK_INTERNAL_BEGIN( 9 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_10() \ + END_CALLBACK_INTERNAL_BEGIN( 10 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 9 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_11() \ + END_CALLBACK_INTERNAL_BEGIN( 11 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 9 ) \ + END_CALLBACK_INTERNAL_SWITCH( 10 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_12() \ + END_CALLBACK_INTERNAL_BEGIN( 12 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 9 ) \ + END_CALLBACK_INTERNAL_SWITCH( 10 ) \ + END_CALLBACK_INTERNAL_SWITCH( 11 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_13() \ + END_CALLBACK_INTERNAL_BEGIN( 13 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 9 ) \ + END_CALLBACK_INTERNAL_SWITCH( 10 ) \ + END_CALLBACK_INTERNAL_SWITCH( 11 ) \ + END_CALLBACK_INTERNAL_SWITCH( 12 ) \ + END_CALLBACK_INTERNAL_END() + +#define END_DEFINE_CALLBACK_14() \ + END_CALLBACK_INTERNAL_BEGIN( 14 ) \ + END_CALLBACK_INTERNAL_SWITCH( 0 ) \ + END_CALLBACK_INTERNAL_SWITCH( 1 ) \ + END_CALLBACK_INTERNAL_SWITCH( 2 ) \ + END_CALLBACK_INTERNAL_SWITCH( 3 ) \ + END_CALLBACK_INTERNAL_SWITCH( 4 ) \ + END_CALLBACK_INTERNAL_SWITCH( 5 ) \ + END_CALLBACK_INTERNAL_SWITCH( 6 ) \ + END_CALLBACK_INTERNAL_SWITCH( 7 ) \ + END_CALLBACK_INTERNAL_SWITCH( 8 ) \ + END_CALLBACK_INTERNAL_SWITCH( 9 ) \ + END_CALLBACK_INTERNAL_SWITCH( 10 ) \ + END_CALLBACK_INTERNAL_SWITCH( 11 ) \ + END_CALLBACK_INTERNAL_SWITCH( 12 ) \ + END_CALLBACK_INTERNAL_SWITCH( 13 ) \ + END_CALLBACK_INTERNAL_END() + + +#ifndef NO_STEAM +// steam structs, etc +#include "TSteamElemInfo.h" +#include "TSteamError.h" +#include "TSteamProgress.h" +#include "TSteamAppStats.h" +#include "TSteamUpdateStats.h" +#include "TSteamPaymentCardInfo.h" +#include "TSteamPrepurchaseInfo.h" +#include "TSteamExternalBillingInfo.h" +#include "TSteamSubscriptionBillingInfo.h" +#include "TSteamSubscriptionStats.h" +#include "TSteamSubscription.h" +#include "TSteamApp.h" +#include "TSteamAppLaunchOption.h" +#include "TSteamAppVersion.h" +#include "TSteamSplitLocalUserID.h" +#include "TSteamGlobalUserID.h" +#include "TSteamAppDependencyInfo.h" +#include "TSteamOfflineStatus.h" +#include "TSteamPaymentCardReceiptInfo.h" +#include "TSteamPrepurchaseReceiptInfo.h" +#include "TSteamSubscriptionReceipt.h" +#include "TSteamSubscriptionDiscount.h" +#include "TSteamDiscountQualifier.h" +#include "SteamSalt.h" +#endif // NO_STEAM + + +// steamclient/api +#include "CSteamID.h" +#include "CGameID.h" + +#include "MatchMakingKeyValuePair.h" +#include "servernetadr.h" +#include "gameserveritem.h" +#include "FriendGameInfo.h" +#include "EVoiceResult.h" +#include "ECurrencyCode.h" + +// structure that contains client callback data +struct CallbackMsg_t +{ + HSteamUser m_hSteamUser; + int m_iCallback; + uint8 *m_pubParam; + int m_cubParam; +}; + + + +#endif // STEAMTYPES_H + diff --git a/src/public SDK/Steamclient.h b/src/public SDK/Steamclient.h new file mode 100644 index 0000000..0a6cf36 --- /dev/null +++ b/src/public SDK/Steamclient.h @@ -0,0 +1,514 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef STEAMCLIENT_H +#define STEAMCLIENT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#if defined(__GNUC__) && defined(_WIN32) + // This ugly hack allows us to provide GCC compatibility on windows without much effort + #pragma push_macro("virtual") + #undef virtual + #define virtual virtual __thiscall +#endif + +// client +#include "ISteamClient006.h" +#include "ISteamClient007.h" +#include "ISteamClient008.h" +#include "ISteamClient009.h" +#include "ISteamClient010.h" +#include "ISteamClient011.h" +#include "ISteamClient012.h" +#include "ISteamClient014.h" +#include "ISteamClient015.h" +#include "ISteamClient016.h" +#include "ISteamClient017.h" + +// friends +#include "ISteamFriends001.h" +#include "ISteamFriends002.h" +#include "ISteamFriends003.h" +#include "ISteamFriends004.h" +#include "ISteamFriends005.h" +#include "ISteamFriends006.h" +#include "ISteamFriends007.h" +#include "ISteamFriends008.h" +#include "ISteamFriends009.h" +#include "ISteamFriends010.h" +#include "ISteamFriends011.h" +#include "ISteamFriends012.h" +#include "ISteamFriends013.h" +#include "ISteamFriends014.h" +#include "ISteamFriends015.h" + +// screenshots +#include "ISteamScreenshots001.h" +#include "ISteamScreenshots002.h" + +// user +#include "ISteamUser004.h" +#include "ISteamUser005.h" +#include "ISteamUser006.h" +#include "ISteamUser007.h" +#include "ISteamUser008.h" +#include "ISteamUser009.h" +#include "ISteamUser010.h" +#include "ISteamUser011.h" +#include "ISteamUser012.h" +#include "ISteamUser013.h" +#include "ISteamUser014.h" +#include "ISteamUser015.h" +#include "ISteamUser016.h" +#include "ISteamUser017.h" +#include "ISteamUser018.h" + +// OAuth +#include "ISteamOAuth001.h" + +// apps +#include "ISteamApps001.h" +#include "ISteamApps002.h" +#include "ISteamApps003.h" +#include "ISteamApps004.h" +#include "ISteamApps005.h" +#include "ISteamApps006.h" +#include "ISteamApps007.h" + +// user stats +#include "ISteamUserStats001.h" +#include "ISteamUserStats002.h" +#include "ISteamUserStats003.h" +#include "ISteamUserStats004.h" +#include "ISteamUserStats005.h" +#include "ISteamUserStats006.h" +#include "ISteamUserStats007.h" +#include "ISteamUserStats008.h" +#include "ISteamUserStats009.h" +#include "ISteamUserStats010.h" +#include "ISteamUserStats011.h" + +// utils +#include "ISteamUtils001.h" +#include "ISteamUtils002.h" +#include "ISteamUtils003.h" +#include "ISteamUtils004.h" +#include "ISteamUtils005.h" +#include "ISteamUtils006.h" +#include "ISteamUtils007.h" + +// game server +#include "ISteamGameServer002.h" +#include "ISteamGameServer003.h" +#include "ISteamGameServer004.h" +#include "ISteamGameServer005.h" +#include "ISteamGameServer006.h" +#include "ISteamGameServer007.h" +#include "ISteamGameServer008.h" +#include "ISteamGameServer009.h" +#include "ISteamGameServer010.h" +#include "ISteamGameServer011.h" +#include "ISteamGameServer012.h" + +// master server updater +#include "ISteamMasterServerUpdater001.h" + +// matchmaking +#include "ISteamMatchmaking001.h" +#include "ISteamMatchmaking002.h" +#include "ISteamMatchmaking003.h" +#include "ISteamMatchmaking004.h" +#include "ISteamMatchmaking005.h" +#include "ISteamMatchmaking006.h" +#include "ISteamMatchmaking007.h" +#include "ISteamMatchmaking008.h" +#include "ISteamMatchmaking009.h" + +// matchmaking servers +#include "ISteamMatchmakingServers001.h" +#include "ISteamMatchmakingServers002.h" + +// networking +#include "ISteamNetworking001.h" +#include "ISteamNetworking002.h" +#include "ISteamNetworking003.h" +#include "ISteamNetworking004.h" +#include "ISteamNetworking005.h" + +// billing +#include "ISteamBilling001.h" +#include "ISteamBilling002.h" + +// remote storage +#include "ISteamRemoteStorage001.h" +#include "ISteamRemoteStorage002.h" +#include "ISteamRemoteStorage003.h" +#include "ISteamRemoteStorage004.h" +#include "ISteamRemoteStorage005.h" +#include "ISteamRemoteStorage006.h" +#include "ISteamRemoteStorage007.h" +#include "ISteamRemoteStorage008.h" +#include "ISteamRemoteStorage009.h" +#include "ISteamRemoteStorage010.h" +#include "ISteamRemoteStorage011.h" +#include "ISteamRemoteStorage012.h" +#include "ISteamRemoteStorage013.h" + +// content server +#include "ISteamContentServer001.h" +#include "ISteamContentServer002.h" + +// steam 2 bridge +#include "ISteam2Bridge001.h" +#include "ISteam2Bridge002.h" + +// game coordinator +#include "ISteamGameCoordinator001.h" + +// game server stats +#include "ISteamGameServerStats001.h" + +// game stats +#include "ISteamGameStats001.h" + +// app ticket +#include "ISteamAppTicket001.h" + +// applist +#include "ISteamAppList001.h" + +// http +#include "ISteamHTTP001.h" +#include "ISteamHTTP002.h" + +// unified messages +#include "ISteamUnifiedMessages001.h" + +// stream launcher +#include "ISteamStreamLauncher001.h" + +// ugc +#include "ISteamUGC001.h" +#include "ISteamUGC002.h" +#include "ISteamUGC003.h" +#include "ISteamUGC004.h" +#include "ISteamUGC005.h" +#include "ISteamUGC007.h" + +// music +#include "ISteamMusic001.h" + +// music remote +#include "ISteamMusicRemote001.h" + +// controller +#include "ISteamController001.h" +#include "ISteamController003.h" + +// html surface +#include "ISteamHTMLSurface002.h" +#include "ISteamHTMLSurface003.h" + +// inventory +#include "ISteamInventory001.h" + +// video +#include "ISteamVideo001.h" + +#ifndef NO_ICLIENT +// client interfaces +#include "IClientEngine.h" + +#include "IClientAppManager.h" +#include "IClientApps.h" +#include "IClientAudio.h" +#include "IClientBilling.h" +#include "IClientContentServer.h" +#include "IClientDepotBuilder.h" +#include "IClientFriends.h" +#include "IClientGameCoordinator.h" +#include "IClientGameServer.h" +#include "IClientGameServerStats.h" +#include "IClientGameStats.h" +#include "IClientMasterServerUpdater.h" +#include "IClientMatchmaking.h" +#include "IClientMatchmakingServers.h" +#include "IClientNetworking.h" +#include "IClientRemoteStorage.h" +#include "IClientScreenshots.h" +#include "IClientUser.h" +#include "IClientUserStats.h" +#include "IClientUtils.h" +#include "IClientHTTP.h" +#include "IClientConfigStore.h" +#include "IClientUnifiedMessages.h" +#include "IClientStreamLauncher.h" +#include "IClientNetworkDeviceManager.h" +#include "IClientDeviceAuth.h" +#endif // NO_ICLIENT + +// callback +#include "CCallback.h" + +// steam_api +#ifdef VERSION_SAFE_STEAM_API_INTERFACES + #include "CSteamAPIContext.h" +#endif // VERSION_SAFE_STEAM_API_INTERFACES + +#if defined(__GNUC__) && defined(_WIN32) + #pragma pop_macro("virtual") +#endif + +// Breakpad +S_API errno_t STEAM_CALL Breakpad_SetSteamID( uint64 ulSteamID ); +S_API errno_t STEAM_CALL Breakpad_SteamSetSteamID( uint64 ulSteamID ); +S_API void STEAM_CALL Breakpad_SteamMiniDumpInit( uint32 a, const char *b, const char *c ); +S_API errno_t STEAM_CALL Breakpad_SteamWriteMiniDumpSetComment( const char *pchMsg ); +S_API void STEAM_CALL Breakpad_SteamWriteMiniDumpUsingExceptionInfoWithBuildId( int a, int b ); + + +// Steam user +S_API bool STEAM_CALL Steam_BConnected( HSteamUser hUser, HSteamPipe hSteamPipe ); +S_API bool STEAM_CALL Steam_BLoggedOn( HSteamUser hUser, HSteamPipe hSteamPipe ); +S_API void STEAM_CALL Steam_LogOn( HSteamUser hUser, HSteamPipe hSteamPipe, uint64 ulSteamID ); +S_API void STEAM_CALL Steam_LogOff( HSteamUser hUser, HSteamPipe hSteamPipe ); +S_API int STEAM_CALL Steam_InitiateGameConnection( HSteamUser hUser, HSteamPipe hSteamPipe, void *pBlob, int cbMaxBlob, uint64 steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ); +S_API void STEAM_CALL Steam_TerminateGameConnection( HSteamUser hUser, HSteamPipe hSteamPipe, uint32 unIPServer, uint16 usPortServer ); + +// Steam callbacks +S_API bool STEAM_CALL Steam_BGetCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg ); +S_API void STEAM_CALL Steam_FreeLastCallback( HSteamPipe hSteamPipe ); +S_API bool STEAM_CALL Steam_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed ); + +// Steam client +S_API HSteamPipe STEAM_CALL Steam_CreateSteamPipe(); +S_API bool STEAM_CALL Steam_BReleaseSteamPipe( HSteamPipe hSteamPipe ); +S_API HSteamUser STEAM_CALL Steam_CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ); +S_API HSteamUser STEAM_CALL Steam_CreateGlobalUser( HSteamPipe *phSteamPipe ); +S_API HSteamUser STEAM_CALL Steam_ConnectToGlobalUser( HSteamPipe hSteamPipe ); +S_API void STEAM_CALL Steam_ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ); +S_API void STEAM_CALL Steam_SetLocalIPBinding( uint32 unIP, uint16 usLocalPort ); + +// Steam game server +S_API int STEAM_CALL Steam_GSGetSteamGameConnectToken( HSteamUser hUser, HSteamPipe hSteamPipe, void *pBlob, int cbBlobMax ); // does this exist anymore? +S_API void* STEAM_CALL Steam_GetGSHandle( HSteamUser hUser, HSteamPipe hSteamPipe ); +S_API bool STEAM_CALL Steam_GSSendSteam2UserConnect( void *phSteamHandle, uint32 unUserID, const void *pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void *pvCookie, uint32 cubCookie ); +S_API bool STEAM_CALL Steam_GSSendUserDisconnect( void *phSteamHandle, uint64 ulSteamID, uint32 unUserID ); +S_API OBSOLETE_FUNCTION bool STEAM_CALL Steam_GSSendUserStatusResponse( void *phSteamHandle, uint64 ulSteamID, int nSecondsConnected, int nSecondsSinceLast ); +S_API bool STEAM_CALL Steam_GSUpdateStatus( void *phSteamHandle, int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pchMapName ); +S_API bool STEAM_CALL Steam_GSRemoveUserConnect( void *phSteamHandle, uint32 unUserID ); +S_API void STEAM_CALL Steam_GSSetSpawnCount( void *phSteamHandle, uint32 ucSpawn ); +S_API bool STEAM_CALL Steam_GSGetSteam2GetEncryptionKeyToSendToNewClient( void *phSteamHandle, void *pvEncryptionKey, uint32 *pcbEncryptionKey, uint32 cbMaxEncryptionKey ); +S_API void STEAM_CALL Steam_GSLogOn( void *phSteamHandle ); +S_API void STEAM_CALL Steam_GSLogOff( void *phSteamHandle ); +S_API bool STEAM_CALL Steam_GSBLoggedOn( void *phSteamHandle ); +S_API bool STEAM_CALL Steam_GSSetServerType( void *phSteamHandle, int32 nAppIdServed, uint32 unServerFlags, uint32 unGameIP, uint32 unGamePort, const char *pchGameDir, const char *pchVersion ); +S_API bool STEAM_CALL Steam_GSBSecure( void *phSteamHandle); + + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// Steam API setup & shutdown +// +// These functions manage loading, initializing and shutdown of the steamclient.dll +// +//----------------------------------------------------------------------------------------------------------------------------------------------------------// + +// S_API void SteamAPI_Init(); (see below) +S_API void SteamAPI_Shutdown(); + +// checks if a local Steam client is running +S_API bool SteamAPI_IsSteamRunning(); + +// Detects if your executable was launched through the Steam client, and restarts your game through +// the client if necessary. The Steam client will be started if it is not running. +// +// Returns: true if your executable was NOT launched through the Steam client. This function will +// then start your application through the client. Your current process should exit. +// +// false if your executable was started through the Steam client or a steam_appid.txt file +// is present in your game's directory (for development). Your current process should continue. +// +// NOTE: This function should be used only if you are using CEG or not using Steam's DRM. Once applied +// to your executable, Steam's DRM will handle restarting through Steam if necessary. +S_API bool SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID ); + +// crash dump recording functions +S_API void SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID ); +S_API void SteamAPI_SetMiniDumpComment( const char *pchMsg ); + +// this should be called before the game initialized the steam APIs +// pchDate should be of the format "Mmm dd yyyy" (such as from the __DATE__ macro ) +// pchTime should be of the format "hh:mm:ss" (such as from the __TIME__ macro ) +// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder +// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback +// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream. +S_API void SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback ); +S_API void SteamAPI_SetBreakpadAppID( uint32 unAppID ); + +// interface pointers, configured by SteamAPI_Init() +S_API_UNSAFE ISteamClient009* STEAM_CALL SteamClient(); + +// VERSION_SAFE_STEAM_API_INTERFACES is usually not necessary, but it provides safety against releasing +// new steam_api.dll's without recompiling/rereleasing modules that use it. +// +// If you use VERSION_SAFE_STEAM_API_INTERFACES, then you should call SteamAPI_InitSafe(). Also, to get the +// Steam interfaces, you must create and Init() a CSteamAPIContext (below) and use the interfaces in there. +// +// If you don't use VERSION_SAFE_STEAM_API_INTERFACES, then you can use SteamAPI_Init() and the SteamXXXX() +// functions below to get at the Steam interfaces. +// +#ifdef VERSION_SAFE_STEAM_API_INTERFACES +S_API bool STEAM_CALL SteamAPI_InitSafe(); +#else +S_API bool STEAM_CALL SteamAPI_Init(); + +S_API_UNSAFE ISteamUser013* STEAM_CALL SteamUser(); +S_API_UNSAFE ISteamFriends005* STEAM_CALL SteamFriends(); +S_API_UNSAFE ISteamUtils005* STEAM_CALL SteamUtils(); +S_API_UNSAFE ISteamMatchmaking008* STEAM_CALL SteamMatchmaking(); +S_API_UNSAFE ISteamUserStats007* STEAM_CALL SteamUserStats(); +S_API_UNSAFE ISteamApps003* STEAM_CALL SteamApps(); +S_API_UNSAFE ISteamNetworking003* STEAM_CALL SteamNetworking(); +S_API_UNSAFE ISteamMatchmakingServers002* STEAM_CALL SteamMatchmakingServers(); +S_API_UNSAFE ISteamRemoteStorage002* STEAM_CALL SteamRemoteStorage(); +#endif // VERSION_SAFE_STEAM_API_INTERFACES + +// sets whether or not Steam_RunCallbacks() should do a try {} catch (...) {} around calls to issuing callbacks +S_API void STEAM_CALL SteamAPI_SetTryCatchCallbacks( bool bTryCatchCallbacks ); + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// steam callback and call-result helpers +// +// The following macros and classes are used to register your application for +// callbacks and call-results, which are delivered in a predictable manner. +// +// STEAM_CALLBACK macros are meant for use inside of a C++ class definition. +// They map a Steam notification callback directly to a class member function +// which is automatically prototyped as "void func( callback_type *pParam )". +// +// CCallResult is used with specific Steam APIs that return "result handles". +// The handle can be passed to a CCallResult object's Set function, along with +// an object pointer and member-function pointer. The member function will +// be executed once the results of the Steam API call are available. +// +// CCallback and CCallbackManual classes can be used instead of STEAM_CALLBACK +// macros if you require finer control over registration and unregistration. +// +// Callbacks and call-results are queued automatically and are only +// delivered/executed when your application calls SteamAPI_RunCallbacks(). +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +S_API void SteamAPI_RunCallbacks(); + + + +// Internal functions used by the utility CCallback objects to receive callbacks +S_API void SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback ); +S_API void SteamAPI_UnregisterCallback( class CCallbackBase *pCallback ); +// Internal functions used by the utility CCallResult objects to receive async call results +S_API void SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); +S_API void SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// steamclient.dll private wrapper functions +// +// The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +S_API void STEAM_CALL Steam_RunCallbacks( HSteamPipe hSteamPipe, bool bGameServerCallbacks ); +S_API void STEAM_CALL Steam_RegisterInterfaceFuncs( void *hModule ); + +S_API HSteamUser STEAM_CALL Steam_GetHSteamUserCurrent(); + +S_API const char* STEAM_CALL SteamAPI_GetSteamInstallPath(); + +// used in version safe api +S_API HSteamPipe STEAM_CALL GetHSteamPipe(); +S_API HSteamUser STEAM_CALL GetHSteamUser(); + +S_API HSteamPipe STEAM_CALL SteamAPI_GetHSteamPipe(); +S_API HSteamUser STEAM_CALL SteamAPI_GetHSteamUser(); + +//S_API bool STEAM_CALL SteamGameServer_InitSafe( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString ); +//S_API bool STEAM_CALL SteamGameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString ); + +S_API void STEAM_CALL SteamGameServer_Shutdown(); +S_API void STEAM_CALL SteamGameServer_RunCallbacks(); + +S_API bool STEAM_CALL SteamGameServer_BSecure(); +S_API uint64 STEAM_CALL SteamGameServer_GetSteamID(); + +S_API HSteamPipe STEAM_CALL SteamGameServer_GetHSteamPipe(); +S_API HSteamUser STEAM_CALL SteamGameServer_GetHSteamUser(); +S_API int32 STEAM_CALL SteamGameServer_GetIPCCallCount(); + +// Note: if you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it will use "GameSocketShare" mode, +// which means that the game is responsible for sending and receiving UDP packets for the master +// server updater. See references to GameSocketShare in isteammasterserverupdater.h. +// +// Pass 0 for usGamePort or usSpectatorPort if you're not using that. Then, the master server updater will report +// what's running based on that. +#ifdef VERSION_SAFE_STEAM_API_INTERFACES +S_API bool STEAM_CALL SteamGameServer_InitSafe( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString ); +#else +S_API bool STEAM_CALL SteamGameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, const char *pchGameDir, const char *pchVersionString ); + +S_API_UNSAFE ISteamGameServer010* STEAM_CALL SteamGameServer(); +S_API_UNSAFE ISteamUtils005* STEAM_CALL SteamGameServerUtils(); +S_API_UNSAFE ISteamMasterServerUpdater001* STEAM_CALL SteamMasterServerUpdater(); +S_API_UNSAFE ISteamNetworking003* STEAM_CALL SteamGameServerNetworking(); +S_API_UNSAFE ISteamGameServerStats001* STEAM_CALL SteamGameServerStats(); +#endif + +//content server +S_API_UNSAFE ISteamContentServer002* STEAM_CALL SteamContentServer(); +S_API_UNSAFE ISteamUtils005* STEAM_CALL SteamContentServerUtils(); +S_API bool STEAM_CALL SteamContentServer_Init(uint32 unIP, uint16 usPort); + +S_API void STEAM_CALL SteamContentServer_Shutdown(); +S_API void STEAM_CALL SteamContentServer_RunCallbacks(); + + +// Purpose: utilities to decode/decrypt a ticket from the +// ISteamUser::RequestEncryptedAppTicket, ISteamUser::GetEncryptedAppTicket API +// +// To use: declare CSteamEncryptedAppTicket, then call BDecryptTicket +// if BDecryptTicket returns true, other accessors are valid +static const int k_nSteamEncryptedAppTicketSymmetricKeyLen = 32; + + +S_API bool SteamEncryptedAppTicket_BDecryptTicket( const uint8 *rgubTicketEncrypted, uint32 cubTicketEncrypted, + uint8 *rgubTicketDecrypted, uint32 *pcubTicketDecrypted, + const uint8 rgubKey[k_nSteamEncryptedAppTicketSymmetricKeyLen], int cubKey ); + +S_API bool SteamEncryptedAppTicket_BIsTicketForApp( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, AppId_t nAppID ); + +S_API RTime32 SteamEncryptedAppTicket_GetTicketIssueTime( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); + +S_API void SteamEncryptedAppTicket_GetTicketSteamID( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, CSteamID *psteamID ); + +S_API AppId_t SteamEncryptedAppTicket_GetTicketAppID( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); + +S_API bool SteamEncryptedAppTicket_BUserOwnsAppInTicket( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, AppId_t nAppID ); + +S_API bool SteamEncryptedAppTicket_BUserIsVacBanned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); + +S_API const uint8 *SteamEncryptedAppTicket_GetUserVariableData( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, uint32 *pcubUserData ); + +#endif // STEAMCLIENT_H diff --git a/src/public SDK/SteamclientAPI.h b/src/public SDK/SteamclientAPI.h new file mode 100644 index 0000000..1e726ac --- /dev/null +++ b/src/public SDK/SteamclientAPI.h @@ -0,0 +1,36 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + + +#ifndef STEAMCLIENTAPI_H +#define STEAMCLIENTAPI_H +#ifdef _WIN32 +#pragma once +#endif + + +// includes +#include "SteamTypes.h" + +// extern function declarations +#include "Steamclient.h" + +// inline interface utils +#include "Interface_OSW.h" + + + +#endif // STEAMCLIENTAPI_H diff --git a/src/public SDK/Steamworks.h b/src/public SDK/Steamworks.h new file mode 100644 index 0000000..b02e5b9 --- /dev/null +++ b/src/public SDK/Steamworks.h @@ -0,0 +1,35 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef STEAMWORKS_H +#define STEAMWORKS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +#ifndef NO_STEAM + // steam.dll + #include "SteamAPI.h" +#endif + +#ifndef NO_STEAMCLIENT + // steamclient.dll / steam_api.dll + #include "SteamclientAPI.h" +#endif + +#endif // STEAMWORKS_H diff --git a/src/public SDK/StreamLauncherCommon.h b/src/public SDK/StreamLauncherCommon.h new file mode 100644 index 0000000..2c3a57e --- /dev/null +++ b/src/public SDK/StreamLauncherCommon.h @@ -0,0 +1,40 @@ + //========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef STREAMLAUNCHERCOMMON_H +#define STREAMLAUNCHERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +// versions +#define CLIENTSTREAMLAUNCHER_INTERFACE_VERSION "CLIENTSTREAMLAUNCHER_INTERFACE_VERSION001" +#define STEAMSTREAMLAUNCHER_INTERFACE_VERSION_001 "STEAMSTREAMLAUNCHER_INTERFACE_VERSION001" + +enum EStreamLauncherResult +{ + // TODO: Reverse this enum +}; + +// callbacks +#pragma pack( push, 8 ) + + +#pragma pack( pop ) + + +#endif // STREAMLAUNCHERCOMMON_H diff --git a/src/public SDK/TSteamApp.h b/src/public SDK/TSteamApp.h new file mode 100644 index 0000000..4ea07d3 --- /dev/null +++ b/src/public SDK/TSteamApp.h @@ -0,0 +1,44 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMAPP_H +#define TSTEAMAPP_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamApp +{ + char *szName; + unsigned int uMaxNameChars; + char *szLatestVersionLabel; + unsigned int uMaxLatestVersionLabelChars; + char *szCurrentVersionLabel; + unsigned int uMaxCurrentVersionLabelChars; + char* szInstallDirName; + unsigned int uMaxInstallDirNameChars; + unsigned int uId; + unsigned int uLatestVersionId; + unsigned int uCurrentVersionId; + unsigned int uMinCacheFileSizeMB; + unsigned int uMaxCacheFileSizeMB; + unsigned int uNumLaunchOptions; + unsigned int uNumIcons; + unsigned int uNumVersions; + unsigned int uNumDependencies; +} TSteamApp; + +#endif // TSTEAMAPP_H diff --git a/src/public SDK/TSteamAppDependencyInfo.h b/src/public SDK/TSteamAppDependencyInfo.h new file mode 100644 index 0000000..c332c0b --- /dev/null +++ b/src/public SDK/TSteamAppDependencyInfo.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMAPPDEPENDENCYINFO_H +#define TSTEAMAPPDEPENDENCYINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamAppDependencyInfo +{ + unsigned int AppId; + unsigned int IsRequired; + char szMountName[STEAM_MAX_PATH]; +} TSteamAppDependencyInfo; + + +#endif // TSTEAMAPPDEPENDENCYINFO_H diff --git a/src/public SDK/TSteamAppLaunchOption.h b/src/public SDK/TSteamAppLaunchOption.h new file mode 100644 index 0000000..967f676 --- /dev/null +++ b/src/public SDK/TSteamAppLaunchOption.h @@ -0,0 +1,37 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMAPPLAUNCHOPTION_H +#define TSTEAMAPPLAUNCHOPTION_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamAppLaunchOption +{ + char *szDesc; + unsigned int uMaxDescChars; + char *szCmdLine; + unsigned int uMaxCmdLineChars; + unsigned int uIndex; + unsigned int uIconIndex; + int bNoDesktopShortcut; + int bNoStartMenuShortcut; + int bIsLongRunningUnattended; + +} TSteamAppLaunchOption; + +#endif // TSTEAMAPPLAUNCHOPTION_H diff --git a/src/public SDK/TSteamAppStats.h b/src/public SDK/TSteamAppStats.h new file mode 100644 index 0000000..f4208b3 --- /dev/null +++ b/src/public SDK/TSteamAppStats.h @@ -0,0 +1,38 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMAPPSTATS_H +#define TSTEAMAPPSTATS_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamAppStats +{ + unsigned int uNumApps; + unsigned int uMaxNameChars; + unsigned int uMaxInstallDirNameChars; + unsigned int uMaxVersionLabelChars; + unsigned int uMaxLaunchOptions; + unsigned int uMaxLaunchOptionDescChars; + unsigned int uMaxLaunchOptionCmdLineChars; + unsigned int uMaxNumIcons; + unsigned int uMaxIconSize; + unsigned int uMaxDependencies; +} TSteamAppStats; + + +#endif // TSTEAMAPPSTATS_H diff --git a/src/public SDK/TSteamAppVersion.h b/src/public SDK/TSteamAppVersion.h new file mode 100644 index 0000000..c3d6850 --- /dev/null +++ b/src/public SDK/TSteamAppVersion.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMAPPVERSION_H +#define TSTEAMAPPVERSION_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamAppVersion +{ + char *szLabel; + unsigned int uMaxLabelChars; + unsigned int uVersionId; + int bIsNotAvailable; +} TSteamAppVersion; + +#endif // TSTEAMAPPVERSION_H diff --git a/src/public SDK/TSteamDiscountQualifier.h b/src/public SDK/TSteamDiscountQualifier.h new file mode 100644 index 0000000..d056f15 --- /dev/null +++ b/src/public SDK/TSteamDiscountQualifier.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMDISCOUNTQUALIFIER_H +#define TSTEAMDISCOUNTQUALIFIER_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamDiscountQualifier +{ + char szName[STEAM_MAX_PATH]; + unsigned int uRequiredSubscription; + int bIsDisqualifier; +} TSteamDiscountQualifier; + + +#endif // TSTEAMDISCOUNTQUALIFIER_H diff --git a/src/public SDK/TSteamElemInfo.h b/src/public SDK/TSteamElemInfo.h new file mode 100644 index 0000000..ffada4a --- /dev/null +++ b/src/public SDK/TSteamElemInfo.h @@ -0,0 +1,45 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMELEMINFO_H +#define TSTEAMELEMINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamElemInfo +{ + int bIsDir; /* If non-zero, element is a directory; if zero, element is a file */ + unsigned int uSizeOrCount; /* If element is a file, this contains size of file in bytes */ + int bIsLocal; /* If non-zero, reported item is a standalone element on local filesystem */ + char cszName[STEAM_MAX_PATH]; /* Base element name (no path) */ + long lLastAccessTime; /* Seconds since 1/1/1970 (like time_t) when element was last accessed */ + long lLastModificationTime; /* Seconds since 1/1/1970 (like time_t) when element was last modified */ + long lCreationTime; /* Seconds since 1/1/1970 (like time_t) when element was created */ +} TSteamElemInfo; + +typedef struct TSteamElemInfo64 +{ + int bIsDir; /* If non-zero, element is a directory; if zero, element is a file */ + unsigned long long ullSizeOrCount; /* If element is a file, this contains size of file in bytes */ + int bIsLocal; /* If non-zero, reported item is a standalone element on local filesystem */ + char cszName[STEAM_MAX_PATH]; /* Base element name (no path) */ + long long llLastAccessTime; /* Seconds since 1/1/1970 (like time_t) when element was last accessed */ + long long llLastModificationTime; /* Seconds since 1/1/1970 (like time_t) when element was last modified */ + long long llCreationTime; /* Seconds since 1/1/1970 (like time_t) when element was created */ +} TSteamElemInfo64; + +#endif // TSTEAMELEMINFO_H diff --git a/src/public SDK/TSteamError.h b/src/public SDK/TSteamError.h new file mode 100644 index 0000000..9822ebc --- /dev/null +++ b/src/public SDK/TSteamError.h @@ -0,0 +1,40 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMERROR_H +#define TSTEAMERROR_H +#ifdef _WIN32 +#pragma once +#endif + +typedef enum EDetailedPlatformErrorType +{ + eNoDetailedErrorAvailable, + eStandardCerrno, + eWin32LastError, + eWinSockLastError, + eDetailedPlatformErrorCount +} EDetailedPlatformErrorType; + +typedef struct TSteamError +{ + ESteamError eSteamError; + EDetailedPlatformErrorType eDetailedErrorType; + int nDetailedErrorCode; + char szDesc[STEAM_MAX_PATH]; +} TSteamError; + +#endif // TSTEAMERROR_H diff --git a/src/public SDK/TSteamExternalBillingInfo.h b/src/public SDK/TSteamExternalBillingInfo.h new file mode 100644 index 0000000..cf4880b --- /dev/null +++ b/src/public SDK/TSteamExternalBillingInfo.h @@ -0,0 +1,29 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMEXTERNALBILLINGINFO_H +#define TSTEAMEXTERNALBILLINGINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamExternalBillingInfo +{ + char szAccountName[ STEAM_EXTERNAL_ACCOUNTNAME_SIZE + 1 ]; + char szPassword[ STEAM_EXTERNAL_ACCOUNTPASSWORD_SIZE + 1 ]; +} TSteamExternalBillingInfo; + +#endif // TSTEAMEXTERNALBILLINGINFO_H diff --git a/src/public SDK/TSteamGlobalUserID.h b/src/public SDK/TSteamGlobalUserID.h new file mode 100644 index 0000000..acdda95 --- /dev/null +++ b/src/public SDK/TSteamGlobalUserID.h @@ -0,0 +1,39 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMGLOBALUSERID_H +#define TSTEAMGLOBALUSERID_H +#ifdef _WIN32 +#pragma once +#endif + +// Applications need to be able to authenticate Steam users from ANY instance. +// So a SteamIDTicket contains SteamGlobalUserID, which is a unique combination of +// instance and user id. +typedef struct TSteamGlobalUserID +{ + SteamInstanceID_t m_SteamInstanceID; + + union m_SteamLocalUserID + { + SteamLocalUserID_t As64bits; + TSteamSplitLocalUserID Split; + } m_SteamLocalUserID; + +} TSteamGlobalUserID; + + +#endif // TSTEAMGLOBALUSERID_H diff --git a/src/public SDK/TSteamOfflineStatus.h b/src/public SDK/TSteamOfflineStatus.h new file mode 100644 index 0000000..94e8116 --- /dev/null +++ b/src/public SDK/TSteamOfflineStatus.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMOFFLINESTATUS_H +#define TSTEAMOFFLINESTATUS_H +#ifdef _WIN32 +#pragma once +#endif + + +typedef struct TSteamOfflineStatus +{ + int eOfflineNow; + int eOfflineNextSession; +} TSteamOfflineStatus; + + +#endif // TSTEAMOFFLINESTATUS_H diff --git a/src/public SDK/TSteamPaymentCardInfo.h b/src/public SDK/TSteamPaymentCardInfo.h new file mode 100644 index 0000000..635a004 --- /dev/null +++ b/src/public SDK/TSteamPaymentCardInfo.h @@ -0,0 +1,53 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMPAYMENTCARDINFO_H +#define TSTEAMPAYMENTCARDINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamPaymentCardInfo +{ + ESteamPaymentCardType eCardType; + char szCardNumber[ STEAM_CARD_NUMBER_SIZE +1 ]; + char szCardHolderName[ STEAM_CARD_HOLDERNAME_SIZE + 1]; + char szCardExpYear[ STEAM_CARD_EXPYEAR_SIZE + 1 ]; + char szCardExpMonth[ STEAM_CARD_EXPMONTH_SIZE+ 1 ]; + char szCardCVV2[ STEAM_CARD_CVV2_SIZE + 1 ]; + char szBillingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ]; + char szBillingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ]; + char szBillingCity[ STEAM_BILLING_CITY_SIZE + 1 ]; + char szBillingZip[ STEAM_BILLING_ZIP_SIZE + 1 ]; + char szBillingState[ STEAM_BILLING_STATE_SIZE + 1 ]; + char szBillingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ]; + char szBillingPhone[ STEAM_BILLING_PHONE_SIZE + 1 ]; + char szBillingEmailAddress[ STEAM_BILLING_EMAIL_SIZE + 1 ]; + unsigned int uExpectedCostInCents; + unsigned int uExpectedTaxInCents; + char szShippingName[ STEAM_CARD_HOLDERNAME_SIZE + 1 ]; + char szShippingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ]; + char szShippingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ]; + char szShippingCity[ STEAM_BILLING_CITY_SIZE + 1 ]; + char szShippingZip[ STEAM_BILLING_ZIP_SIZE + 1 ]; + char szShippingState[ STEAM_BILLING_STATE_SIZE + 1 ]; + char szShippingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ]; + char szShippingPhone[ STEAM_BILLING_PHONE_SIZE + 1]; + unsigned int uExpectedShippingCostInCents; +} TSteamPaymentCardInfo; + + +#endif // TSTEAMPAYMENTCARDINFO_H diff --git a/src/public SDK/TSteamPaymentCardReceiptInfo.h b/src/public SDK/TSteamPaymentCardReceiptInfo.h new file mode 100644 index 0000000..4dc953e --- /dev/null +++ b/src/public SDK/TSteamPaymentCardReceiptInfo.h @@ -0,0 +1,43 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMPAYMENTCARDRECEIPTINFO_H +#define TSTEAMPAYMENTCARDRECEIPTINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamPaymentCardReceiptInfo +{ + ESteamPaymentCardType eCardType; + char szCardLastFourDigits[ STEAM_CARD_LASTFOURDIGITS_SIZE + 1 ]; + char szCardHolderName[ STEAM_CARD_HOLDERNAME_SIZE + 1 ]; + char szBillingAddress1[ STEAM_BILLING_ADDRESS1_SIZE + 1 ]; + char szBillingAddress2[ STEAM_BILLING_ADDRESS2_SIZE + 1 ]; + char szBillingCity[ STEAM_BILLING_CITY_SIZE + 1 ]; + char szBillingZip[ STEAM_BILLING_ZIP_SIZE + 1 ]; + char szBillingState[ STEAM_BILLING_STATE_SIZE + 1 ]; + char szBillingCountry[ STEAM_BILLING_COUNTRY_SIZE + 1 ]; + char szCardApprovalCode[ STEAM_CARD_APPROVAL_CODE_SIZE + 1 ]; + char szTransDate[ STEAM_DATE_SIZE + 1 ]; + char szTransTime[ STEAM_TIME_SIZE + 1 ]; + unsigned int uPriceWithoutTax; + unsigned int uTaxAmount; + unsigned int uShippingCost; +} TSteamPaymentCardReceiptInfo; + + +#endif // TSTEAMPAYMENTCARDRECEIPTINFO_H diff --git a/src/public SDK/TSteamPrepurchaseInfo.h b/src/public SDK/TSteamPrepurchaseInfo.h new file mode 100644 index 0000000..c05814d --- /dev/null +++ b/src/public SDK/TSteamPrepurchaseInfo.h @@ -0,0 +1,33 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMPREPURCHASEINFO_H +#define TSTEAMPREPURCHASEINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamPrepurchaseInfo +{ + char szTypeOfProofOfPurchase[ STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1 ]; + + // A ProofOfPurchase token is not necessarily a nul-terminated string; it may be binary data + // (perhaps encrypted). Hence we need a length and an array of bytes. + unsigned int uLengthOfBinaryProofOfPurchaseToken; + char cBinaryProofOfPurchaseToken[ STEAM_PROOF_OF_PURCHASE_TOKEN_SIZE + 1 ]; +} TSteamPrepurchaseInfo; + +#endif // TSTEAMPREPURCHASEINFO_H diff --git a/src/public SDK/TSteamPrepurchaseReceiptInfo.h b/src/public SDK/TSteamPrepurchaseReceiptInfo.h new file mode 100644 index 0000000..e42d3a6 --- /dev/null +++ b/src/public SDK/TSteamPrepurchaseReceiptInfo.h @@ -0,0 +1,29 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMPREPURCHASERECEIPTINFO_H +#define TSTEAMPREPURCHASERECEIPTINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamPrepurchaseReceiptInfo +{ + char szTypeOfProofOfPurchase[ STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1]; +} TSteamPrepurchaseReceiptInfo; + + +#endif // TSTEAMPREPURCHASERECEIPTINFO_H diff --git a/src/public SDK/TSteamProgress.h b/src/public SDK/TSteamProgress.h new file mode 100644 index 0000000..d843ca2 --- /dev/null +++ b/src/public SDK/TSteamProgress.h @@ -0,0 +1,30 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMPROGRESS_H +#define TSTEAMPROGRESS_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamProgress +{ + int bValid; // non-zero if call provides progress info + unsigned int uPercentDone; // 0 to 100 if bValid + char szProgress[ STEAM_MAX_PATH ]; // additional progress info +} TSteamProgress; + +#endif // TSTEAMPROGRESS_H diff --git a/src/public SDK/TSteamSplitLocalUserID.h b/src/public SDK/TSteamSplitLocalUserID.h new file mode 100644 index 0000000..f772eac --- /dev/null +++ b/src/public SDK/TSteamSplitLocalUserID.h @@ -0,0 +1,39 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSPLITLOCALUSERID_H +#define TSTEAMSPLITLOCALUSERID_H +#ifdef _WIN32 +#pragma once +#endif + + +// Applications need to be able to authenticate Steam users from ANY instance. +// So a SteamIDTicket contains SteamGlobalUserID, which is a unique combination of +// instance and user id. + +// SteamLocalUserID is an unsigned 64-bit integer. +// For platforms without 64-bit int support, we provide access via a union that splits it into +// high and low unsigned 32-bit ints. Such platforms will only need to compare LocalUserIDs +// for equivalence anyway - not perform arithmetic with them. +typedef struct TSteamSplitLocalUserID +{ + unsigned int Low32bits; + unsigned int High32bits; +} TSteamSplitLocalUserID; + + +#endif // TSTEAMSPLITLOCALUSERID_H diff --git a/src/public SDK/TSteamSubscription.h b/src/public SDK/TSteamSubscription.h new file mode 100644 index 0000000..9d9d2da --- /dev/null +++ b/src/public SDK/TSteamSubscription.h @@ -0,0 +1,65 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSUBSCRIPTION_H +#define TSTEAMSUBSCRIPTION_H +#ifdef _WIN32 +#pragma once +#endif + + +typedef enum EBillingType +{ + eNoCost = 0, + eBillOnceOnly = 1, + eBillMonthly = 2, + eProofOfPrepurchaseOnly = 3, + eGuestPass = 4, + eHardwarePromo = 5, + eGift = 6, + eAutoGrant = 7, + OEMTicket = 8, + eRecurringOption = 9, + eNumBillingTypes = 10, +} EBillingType; + + +typedef struct TSteamSubscription +{ + char* szName; + unsigned int uMaxNameChars; + unsigned int* puAppIds; + unsigned int uMaxAppIds; + unsigned int uId; + unsigned int uNumApps; + EBillingType eBillingType; + unsigned int uCostInCents; + unsigned int uNumDiscounts; + int bIsPreorder; + int bRequiresShippingAddress; + unsigned int uDomesticShippingCostInCents; + unsigned int uInternationalShippingCostInCents; + bool bIsCyberCafeSubscription; + unsigned int uGameCode; + char szGameCodeDesc[STEAM_MAX_PATH]; + bool bIsDisabled; + bool bRequiresCD; + unsigned int uTerritoryCode; + bool bIsSteam3Subscription; +} TSteamSubscription; + + +#endif // TSTEAMSUBSCRIPTION_H diff --git a/src/public SDK/TSteamSubscriptionBillingInfo.h b/src/public SDK/TSteamSubscriptionBillingInfo.h new file mode 100644 index 0000000..fff6abb --- /dev/null +++ b/src/public SDK/TSteamSubscriptionBillingInfo.h @@ -0,0 +1,36 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSUBSCRIPTIONBILLINGINFO_H +#define TSTEAMSUBSCRIPTIONBILLINGINFO_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamSubscriptionBillingInfo +{ + ESteamSubscriptionBillingInfoType eBillingInfoType; + union + { + TSteamPaymentCardInfo PaymentCardInfo; + TSteamPrepurchaseInfo PrepurchaseInfo; + TSteamExternalBillingInfo ExternalBillingInfo; + char bUseAccountBillingInfo; + }; + +} TSteamSubscriptionBillingInfo; + +#endif // TSTEAMSUBSCRIPTIONBILLINGINFO_H diff --git a/src/public SDK/TSteamSubscriptionDiscount.h b/src/public SDK/TSteamSubscriptionDiscount.h new file mode 100644 index 0000000..9115191 --- /dev/null +++ b/src/public SDK/TSteamSubscriptionDiscount.h @@ -0,0 +1,30 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSUBSCRIPTIONDISCOUNT_H +#define TSTEAMSUBSCRIPTIONDISCOUNT_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamSubscriptionDiscount +{ + char szName[STEAM_MAX_PATH]; + unsigned int uDiscountInCents; + unsigned int uNumQualifiers; +} TSteamSubscriptionDiscount; + +#endif // TSTEAMSUBSCRIPTIONDISCOUNT_H diff --git a/src/public SDK/TSteamSubscriptionReceipt.h b/src/public SDK/TSteamSubscriptionReceipt.h new file mode 100644 index 0000000..8bae816 --- /dev/null +++ b/src/public SDK/TSteamSubscriptionReceipt.h @@ -0,0 +1,40 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSUBSCRIPTIONRECEIPT_H +#define TSTEAMSUBSCRIPTIONRECEIPT_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamSubscriptionReceipt +{ + ESteamSubscriptionStatus eStatus; + ESteamSubscriptionStatus ePreviousStatus; + ESteamSubscriptionBillingInfoType eReceiptInfoType; + + char szConfirmationCode[ STEAM_CONFIRMATION_CODE_SIZE + 1 ]; + + union + { + TSteamPaymentCardReceiptInfo PaymentCardReceiptInfo; + TSteamPrepurchaseReceiptInfo PrepurchaseReceiptInfo; + }; + +} TSteamSubscriptionReceipt; + + +#endif // TSTEAMSUBSCRIPTIONRECEIPT_H diff --git a/src/public SDK/TSteamSubscriptionStats.h b/src/public SDK/TSteamSubscriptionStats.h new file mode 100644 index 0000000..1efa17f --- /dev/null +++ b/src/public SDK/TSteamSubscriptionStats.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMSUBSCRIPTIONSTATS_H +#define TSTEAMSUBSCRIPTIONSTATS_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamSubscriptionStats +{ + unsigned int uNumSubscriptions; + unsigned int uMaxNameChars; + unsigned int uMaxApps; + +} TSteamSubscriptionStats; + +#endif // TSTEAMSUBSCRIPTIONSTATS_H diff --git a/src/public SDK/TSteamUpdateStats.h b/src/public SDK/TSteamUpdateStats.h new file mode 100644 index 0000000..4bc14da --- /dev/null +++ b/src/public SDK/TSteamUpdateStats.h @@ -0,0 +1,31 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef TSTEAMUPDATESTATS_H +#define TSTEAMUPDATESTATS_H +#ifdef _WIN32 +#pragma once +#endif + +typedef struct TSteamUpdateStats +{ + SteamUnsigned64_t uBytesTotal; + SteamUnsigned64_t uBytesPresent; + +} TSteamUpdateStats; + + +#endif // TSTEAMUPDATESTATS_H diff --git a/src/public SDK/UGCCommon.h b/src/public SDK/UGCCommon.h new file mode 100644 index 0000000..5209596 --- /dev/null +++ b/src/public SDK/UGCCommon.h @@ -0,0 +1,289 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= +#include "RemoteStorageCommon.h" + +#ifndef UGCCOMMON_H +#define UGCCOMMON_H +#ifdef _WIN32 +#pragma once +#endif +typedef uint64 UGCQueryHandle_t; +typedef uint64 UGCUpdateHandle_t; + +const UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffffull; +const UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffffull; + +// Matching UGC types for queries +enum EUGCMatchingUGCType +{ + k_EUGCMatchingUGCType_Items = 0, // both mtx items and ready-to-use items + k_EUGCMatchingUGCType_Items_Mtx = 1, + k_EUGCMatchingUGCType_Items_ReadyToUse = 2, + k_EUGCMatchingUGCType_Collections = 3, + k_EUGCMatchingUGCType_Artwork = 4, + k_EUGCMatchingUGCType_Videos = 5, + k_EUGCMatchingUGCType_Screenshots = 6, + k_EUGCMatchingUGCType_AllGuides = 7, // both web guides and integrated guides + k_EUGCMatchingUGCType_WebGuides = 8, + k_EUGCMatchingUGCType_IntegratedGuides = 9, + k_EUGCMatchingUGCType_UsableInGame = 10, // ready-to-use items and integrated guides + k_EUGCMatchingUGCType_ControllerBindings = 11, + k_EUGCMatchingUGCType_GameManagedItems = 12, // game managed items (not managed by users) + k_EUGCMatchingUGCType_All = ~0, // return everything +}; + +// Different lists of published UGC for a user. +// If the current logged in user is different than the specified user, then some options may not be allowed. +enum EUserUGCList +{ + k_EUserUGCList_Published, + k_EUserUGCList_VotedOn, + k_EUserUGCList_VotedUp, + k_EUserUGCList_VotedDown, + k_EUserUGCList_WillVoteLater, + k_EUserUGCList_Favorited, + k_EUserUGCList_Subscribed, + k_EUserUGCList_UsedOrPlayed, + k_EUserUGCList_Followed, +}; + +// Sort order for user published UGC lists (defaults to creation order descending) +enum EUserUGCListSortOrder +{ + k_EUserUGCListSortOrder_CreationOrderDesc, + k_EUserUGCListSortOrder_CreationOrderAsc, + k_EUserUGCListSortOrder_TitleAsc, + k_EUserUGCListSortOrder_LastUpdatedDesc, + k_EUserUGCListSortOrder_SubscriptionDateDesc, + k_EUserUGCListSortOrder_VoteScoreDesc, + k_EUserUGCListSortOrder_ForModeration, +}; + +// Combination of sorting and filtering for queries across all UGC +enum EUGCQuery +{ + k_EUGCQuery_RankedByVote = 0, + k_EUGCQuery_RankedByPublicationDate = 1, + k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2, + k_EUGCQuery_RankedByTrend = 3, + k_EUGCQuery_FavoritedByFriendsRankedByPublicationDate = 4, + k_EUGCQuery_CreatedByFriendsRankedByPublicationDate = 5, + k_EUGCQuery_RankedByNumTimesReported = 6, + k_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate = 7, + k_EUGCQuery_NotYetRated = 8, + k_EUGCQuery_RankedByTotalVotesAsc = 9, + k_EUGCQuery_RankedByVotesUp = 10, + k_EUGCQuery_RankedByTextSearch = 11, + k_EUGCQuery_RankedByTotalUniqueSubscriptions = 12, +}; + +enum EItemUpdateStatus +{ + k_EItemUpdateStatusInvalid = 0, // The item update handle was invalid, job might be finished, listen too SubmitItemUpdateResult_t + k_EItemUpdateStatusPreparingConfig = 1, // The item update is processing configuration data + k_EItemUpdateStatusPreparingContent = 2, // The item update is reading and processing content files + k_EItemUpdateStatusUploadingContent = 3, // The item update is uploading content changes to Steam + k_EItemUpdateStatusUploadingPreviewFile = 4, // The item update is uploading new preview file image + k_EItemUpdateStatusCommittingChanges = 5 // The item update is committing all changes +}; + +enum EItemState +{ + k_EItemStateNone = 0, // item not tracked on client + k_EItemStateSubscribed = 1, // current user is subscribed to this item. Not just cached. + k_EItemStateLegacyItem = 2, // item was created with ISteamRemoteStorage + k_EItemStateInstalled = 4, // item is installed and usable (but maybe out of date) + k_EItemStateNeedsUpdate = 8, // items needs an update. Either because it's not installed yet or creator updated content + k_EItemStateDownloading = 16, // item update is currently downloading + k_EItemStateDownloadPending = 32, // DownloadItem() was called for this item, content isn't available until DownloadItemResult_t is fired +}; + +enum EItemStatistic +{ + k_EItemStatistic_NumSubscriptions = 0, + k_EItemStatistic_NumFavorites = 1, + k_EItemStatistic_NumFollowers = 2, + k_EItemStatistic_NumUniqueSubscriptions = 3, + k_EItemStatistic_NumUniqueFavorites = 4, + k_EItemStatistic_NumUniqueFollowers = 5, + k_EItemStatistic_NumUniqueWebsiteViews = 6, + k_EItemStatistic_ReportScore = 7, +}; + +const uint32 kNumUGCResultsPerPage = 50; +const uint32 k_cchDeveloperMetadataMax = 5000; + +// Details for a single published file/UGC +struct SteamUGCDetails_t +{ + PublishedFileId_t m_nPublishedFileId; + EResult m_eResult; // The result of the operation. + EWorkshopFileType m_eFileType; // Type of the file + AppId_t m_nCreatorAppID; // ID of the app that created this file. + AppId_t m_nConsumerAppID; // ID of the app that will consume this file. + char m_rgchTitle[k_cchPublishedDocumentTitleMax]; // title of document + char m_rgchDescription[k_cchPublishedDocumentDescriptionMax]; // description of document + uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. + uint32 m_rtimeCreated; // time when the published file was created + uint32 m_rtimeUpdated; // time when the published file was last updated + uint32 m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable) + ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility + bool m_bBanned; // whether the file was banned + bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop + bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + char m_rgchTags[k_cchTagListMax]; // comma separated list of all tags associated with this file + // file/url information + UGCHandle_t m_hFile; // The handle of the primary file + UGCHandle_t m_hPreviewFile; // The handle of the preview file + char m_pchFileName[k_cchFilenameMax]; // The cloud filename of the primary file + int32 m_nFileSize; // Size of the primary file + int32 m_nPreviewFileSize; // Size of the preview file + char m_rgchURL[k_cchPublishedFileURLMax]; // URL (for a video or a website) + // voting information + uint32 m_unVotesUp; // number of votes up + uint32 m_unVotesDown; // number of votes down + float m_flScore; // calculated score + uint32 m_unNumChildren; // if m_eFileType == k_EWorkshopFileTypeCollection, then this number will be the number of children contained within the collection +}; + + +#define STEAMUGC_INTERFACE_VERSION001 "STEAMUGC_INTERFACE_VERSION001" +#define STEAMUGC_INTERFACE_VERSION002 "STEAMUGC_INTERFACE_VERSION002" +#define STEAMUGC_INTERFACE_VERSION003 "STEAMUGC_INTERFACE_VERSION003" +#define STEAMUGC_INTERFACE_VERSION004 "STEAMUGC_INTERFACE_VERSION004" +#define STEAMUGC_INTERFACE_VERSION005 "STEAMUGC_INTERFACE_VERSION005" +#define STEAMUGC_INTERFACE_VERSION006 "STEAMUGC_INTERFACE_VERSION006" +#define STEAMUGC_INTERFACE_VERSION007 "STEAMUGC_INTERFACE_VERSION007" +#define STEAMUGC_INTERFACE_VERSION008 "STEAMUGC_INTERFACE_VERSION008" +#define STEAMUGC_INTERFACE_VERSION009 "STEAMUGC_INTERFACE_VERSION009" +#define STEAMUGC_INTERFACE_VERSION010 "STEAMUGC_INTERFACE_VERSION010" +#define STEAMUGC_INTERFACE_VERSION012 "STEAMUGC_INTERFACE_VERSION012" +#define STEAMUGC_INTERFACE_VERSION013 "STEAMUGC_INTERFACE_VERSION013" + + +#pragma pack( push, 8 ) + +//----------------------------------------------------------------------------- +// Purpose: Callback for querying UGC +//----------------------------------------------------------------------------- +struct SteamUGCQueryCompleted_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 1 }; + UGCQueryHandle_t m_handle; + EResult m_eResult; + uint32 m_unNumResultsReturned; + uint32 m_unTotalMatchingResults; + bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache +}; + + +//----------------------------------------------------------------------------- +// Purpose: Callback for requesting details on one piece of UGC +//----------------------------------------------------------------------------- +struct SteamUGCRequestUGCDetailsResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 2 }; + SteamUGCDetails_t m_details; + bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache +}; + + +//----------------------------------------------------------------------------- +// Purpose: result for ISteamUGC::CreateItem() +//----------------------------------------------------------------------------- +struct CreateItemResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 3 }; + EResult m_eResult; + PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID + bool m_bUserNeedsToAcceptWorkshopLegalAgreement; +}; + + +//----------------------------------------------------------------------------- +// Purpose: result for ISteamUGC::SubmitItemUpdate() +//----------------------------------------------------------------------------- +struct SubmitItemUpdateResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 4 }; + EResult m_eResult; + bool m_bUserNeedsToAcceptWorkshopLegalAgreement; +}; + + +//----------------------------------------------------------------------------- +// Purpose: a new Workshop item has been installed or updated +//----------------------------------------------------------------------------- +struct ItemInstalled_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 5 }; + AppId_t m_unAppID; + PublishedFileId_t m_nPublishedFileId; +}; + + +//----------------------------------------------------------------------------- +// Purpose: result of DownloadItem(), existing item files can be accessed again +//----------------------------------------------------------------------------- +struct DownloadItemResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 6 }; + AppId_t m_unAppID; + PublishedFileId_t m_nPublishedFileId; + EResult m_eResult; +}; + + +//----------------------------------------------------------------------------- +// Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites() +//----------------------------------------------------------------------------- +struct UserFavoriteItemsListChanged_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 7 }; + PublishedFileId_t m_nPublishedFileId; + EResult m_eResult; + bool m_bWasAddRequest; +}; + + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to SetUserItemVote() +//----------------------------------------------------------------------------- +struct SetUserItemVoteResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 8 }; + PublishedFileId_t m_nPublishedFileId; + EResult m_eResult; + bool m_bVoteUp; +}; + + +//----------------------------------------------------------------------------- +// Purpose: The result of a call to GetUserItemVote() +//----------------------------------------------------------------------------- +struct GetUserItemVoteResult_t +{ + enum { k_iCallback = k_iClientUGCCallbacks + 9 }; + PublishedFileId_t m_nPublishedFileId; + EResult m_eResult; + bool m_bVotedUp; + bool m_bVotedDown; + bool m_bVoteSkipped; +}; + +#pragma pack( pop ) + +#endif // UGCCOMMON_H diff --git a/src/public SDK/UnifiedMessagesCommon.h b/src/public SDK/UnifiedMessagesCommon.h new file mode 100644 index 0000000..59e4b31 --- /dev/null +++ b/src/public SDK/UnifiedMessagesCommon.h @@ -0,0 +1,45 @@ + //========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef UNIFIEDMESSAGESCOMMON_H +#define UNIFIEDMESSAGESCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + +// versions +#define CLIENTUNIFIEDMESSAGES_INTERFACE_VERSION "CLIENTUNIFIEDMESSAGES_INTERFACE_VERSION001" +#define STEAMUNIFIEDMESSAGES_INTERFACE_VERSION_001 "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001" + +typedef uint64 ClientUnifiedMessageHandle; + +// callbacks +#pragma pack( push, 8 ) + +struct SteamUnifiedMessagesSendMethodResult_t +{ + enum { k_iCallback = k_iClientUnifiedMessagesCallbacks + 1 }; + ClientUnifiedMessageHandle m_hHandle; // The handle returned by SendMethod(). + uint64 m_unContext; // Context provided when calling SendMethod(). + EResult m_eResult; // The result of the method call. + uint32 m_unResponseSize; // The size of the response. +}; + +#pragma pack( pop ) + + +#endif // UNIFIEDMESSAGESCOMMON_H diff --git a/src/public SDK/UserCommon.h b/src/public SDK/UserCommon.h new file mode 100644 index 0000000..9a03ff7 --- /dev/null +++ b/src/public SDK/UserCommon.h @@ -0,0 +1,925 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef USERCOMMON_H +#define USERCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTUSER_INTERFACE_VERSION "CLIENTUSER_INTERFACE_VERSION001" +#define CLIENTGAMESERVER_INTERFACE_VERSION "CLIENTGAMESERVER_INTERFACE_VERSION001" + +#define STEAMUSER_INTERFACE_VERSION_004 "SteamUser004" +#define STEAMUSER_INTERFACE_VERSION_005 "SteamUser005" +#define STEAMUSER_INTERFACE_VERSION_006 "SteamUser006" +#define STEAMUSER_INTERFACE_VERSION_007 "SteamUser007" +#define STEAMUSER_INTERFACE_VERSION_008 "SteamUser008" +#define STEAMUSER_INTERFACE_VERSION_009 "SteamUser009" +#define STEAMUSER_INTERFACE_VERSION_010 "SteamUser010" +#define STEAMUSER_INTERFACE_VERSION_011 "SteamUser011" +#define STEAMUSER_INTERFACE_VERSION_012 "SteamUser012" +#define STEAMUSER_INTERFACE_VERSION_013 "SteamUser013" +#define STEAMUSER_INTERFACE_VERSION_014 "SteamUser014" +#define STEAMUSER_INTERFACE_VERSION_015 "SteamUser015" +#define STEAMUSER_INTERFACE_VERSION_016 "SteamUser016" +#define STEAMUSER_INTERFACE_VERSION_017 "SteamUser017" +#define STEAMUSER_INTERFACE_VERSION_018 "SteamUser018" +#define STEAMUSER_INTERFACE_VERSION_019 "SteamUser019" +#define STEAMUSER_INTERFACE_VERSION_020 "SteamUser020" + +// Callback values for callback ValidateAuthTicketResponse_t which is a response to BeginAuthSession +typedef enum EAuthSessionResponse +{ + k_EAuthSessionResponseOK = 0, // Steam has verified the user is online, the ticket is valid and ticket has not been reused. + k_EAuthSessionResponseUserNotConnectedToSteam = 1, // The user in question is not connected to steam + k_EAuthSessionResponseNoLicenseOrExpired = 2, // The license has expired. + k_EAuthSessionResponseVACBanned = 3, // The user is VAC banned for this game. + k_EAuthSessionResponseLoggedInElseWhere = 4, // The user account has logged in elsewhere and the session containing the game instance has been disconnected. + k_EAuthSessionResponseVACCheckTimedOut = 5, // VAC has been unable to perform anti-cheat checks on this user + k_EAuthSessionResponseAuthTicketCanceled = 6, // The ticket has been canceled by the issuer + k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7, // This ticket has already been used, it is not valid. + k_EAuthSessionResponseAuthTicketInvalid = 8, // This ticket is not from a user instance currently connected to steam. + k_EAuthSessionResponsePublisherIssuedBan = 9, // The user is banned for this game. The ban came via the web api and not VAC +} EAuthSessionResponse; + +// results from BeginAuthSession +typedef enum EBeginAuthSessionResult +{ + k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID. + k_EBeginAuthSessionResultInvalidTicket = 1, // Ticket is not valid. + k_EBeginAuthSessionResultDuplicateRequest = 2, // A ticket has already been submitted for this steamID + k_EBeginAuthSessionResultInvalidVersion = 3, // Ticket is from an incompatible interface version + k_EBeginAuthSessionResultGameMismatch = 4, // Ticket is not for this game + k_EBeginAuthSessionResultExpiredTicket = 5, // Ticket has expired +} EBeginAuthSessionResult; + +typedef enum EAppUsageEvent +{ + k_EAppUsageEventGameLaunch = 1, + k_EAppUsageEventGameLaunchTrial = 2, + k_EAppUsageEventMedia = 3, + k_EAppUsageEventPreloadStart = 4, + k_EAppUsageEventPreloadFinish = 5, + k_EAppUsageEventMarketingMessageView = 6, // deprecated, do not use + k_EAppUsageEventInGameAdViewed = 7, + k_EAppUsageEventGameLaunchFreeWeekend = 8, +} EAppUsageEvent; + +typedef enum ERegistrySubTree +{ + k_ERegistrySubTreeNews = 0, + k_ERegistrySubTreeApps = 1, + k_ERegistrySubTreeSubscriptions = 2, + k_ERegistrySubTreeGameServers = 3, + k_ERegistrySubTreeFriends = 4, + k_ERegistrySubTreeSystem = 5, + k_ERegistrySubTreeAppOwnershipTickets = 6, + k_ERegistrySubTreeLegacyCDKeys = 7, +} ERegistrySubTree; + +typedef enum ELogonState +{ + k_ELogonStateNotLoggedOn = 0, + k_ELogonStateLoggingOn = 1, + k_ELogonStateLoggingOff = 2, + k_ELogonStateLoggedOn = 3 +} ELogonState; + +typedef enum ELauncherType +{ + // TODO: Reverse this enum +} ELauncherType; + +//----------------------------------------------------------------------------- +// Purpose: types of VAC bans +//----------------------------------------------------------------------------- +typedef enum EVACBan +{ + k_EVACBanGoldsrc, + k_EVACBanSource, + k_EVACBanDayOfDefeatSource, +} EVACBan; + +typedef enum EUserHasLicenseForAppResult +{ + k_EUserHasLicenseResultHasLicense = 0, // User has a license for specified app + k_EUserHasLicenseResultDoesNotHaveLicense = 1, // User does not have a license for the specified app + k_EUserHasLicenseResultNoAuth = 2, // User has not been authenticated +} EUserHasLicenseForAppResult; + +// Enum for the types of news push items you can get +typedef enum ENewsUpdateType +{ + k_EAppNews = 0, // news about a particular app + k_ESteamAds = 1, // Marketing messages + k_ESteamNews = 2, // EJ's corner and the like + k_ECDDBUpdate = 3, // backend has a new CDDB for you to load + k_EClientUpdate = 4, // new version of the steam client is available +} ENewsUpdateType; + +typedef enum ESteamUsageEvent +{ + k_ESteamUsageEventMarketingMessageView = 1, + k_ESteamUsageEventHardwareSurvey = 2, + k_ESteamUsageEventDownloadStarted = 3, + k_ESteamUsageEventLocalizedAudioChange = 4, + k_ESteamUsageEventClientGUIUsage = 5, + k_ESteamUsageEventCharityChoice = 6, +} ESteamUsageEvent; + +typedef enum EClientStat +{ + k_EClientStatP2PConnectionsUDP = 0, + k_EClientStatP2PConnectionsRelay = 1, + k_EClientStatP2PGameConnections = 2, + k_EClientStatP2PVoiceConnections = 3, + k_EClientStatBytesDownloaded = 4, + k_EClientStatMax = 5, +} EClientStat; + +//----------------------------------------------------------------------------- +// Purpose: Marketing message flags that change how a client should handle them +//----------------------------------------------------------------------------- +typedef enum EMarketingMessageFlags +{ + k_EMarketingMessageFlagsNone = 0, + k_EMarketingMessageFlagsHighPriority = 1 << 0, + k_EMarketingMessageFlagsPlatformWindows = 1 << 1, + k_EMarketingMessageFlagsPlatformMac = 1 << 2, + + //aggregate flags + k_EMarketingMessageFlagsPlatformRestrictions = + k_EMarketingMessageFlagsPlatformWindows | k_EMarketingMessageFlagsPlatformMac, +} EMarketingMessageFlags; + +typedef enum ENatDiscoveryTypes +{ + eNatTypeUntested = 0, + eNatTypeTestFailed = 1, + eNatTypeNoUDP = 2, + eNatTypeOpenInternet = 3, + eNatTypeFullCone = 4, + eNatTypeRestrictedCone = 5, + eNatTypePortRestrictedCone = 6, + eNatTypeUnspecified = 7, + eNatTypeSymmetric = 8, + eNatTypeSymmetricFirewall = 9, + eNatTypeCount = 10, +} ENatType; + +typedef enum EPhysicalSocketConnectionResult +{ + PhysicalSocket_Unknown = 0, + PhysicalSocket_IsRemoteSide = 1, + PhysicalSocket_Connected = 2, + PhysicalSocket_Failed = 3, + PhysicalSocket_SignalingFailed = 4, + PhysicalSocket_ResultCount = 5, +} EPhysicalSocketConnectionResult; + +class CNatTraversalStat +{ +public: + EPhysicalSocketConnectionResult m_eResult; + ENatDiscoveryTypes m_eLocalNatType; + ENatDiscoveryTypes m_eRemoteNatType; + bool m_bMultiUserChat : 1; + bool m_bRelay : 1; +}; + +class CAmount +{ +public: + int m_nAmount; + ECurrencyCode m_eCurrencyCode; +}; + +enum EMicroTxnAuthResponse +{ + k_EMicroTxnAuthResponseInvalid = 0, + k_EMicroTxnAuthResponseAuthorize = 1, + k_EMicroTxnAuthResponseDeny = 2, + k_EMicroTxnAuthResponseAutoDeny = 3, +}; + +enum EMicroTxnAuthResult +{ + k_EMicroTxnAuthResultInvalid = 0, + k_EMicroTxnAuthResultOK = 1, + k_EMicroTxnAuthResultFail = 2, + k_EMicroTxnAuthResultInsufficientFunds = 3, +}; + +enum ERequestAccountDataAction +{ + k_ERequestAccountDataActionFindAccountsByEmailAddress = 1, + k_ERequestAccountDataActionFindAccountsByCdKey = 2, + k_ERequestAccountDataActionGetNumAccountsWithEmailAddress = 3, + //k_ERequestAccountDataActionIsAccountNameInUse = 4, // Only used internally +}; + +enum ESteamGuardProvider +{ + // TODO: Reverse this enum +}; + +enum EUserConnect +{ + // TODO: Reverse this enum +}; + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: called when a connections to the Steam back-end has been established +// this means the Steam client now has a working connection to the Steam servers +// usually this will have occurred before the game has launched, and should +// only be seen if the user has dropped connection due to a networking issue +// or a Steam server update +//----------------------------------------------------------------------------- +struct SteamServersConnected_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 1 }; +}; + +//----------------------------------------------------------------------------- +// Purpose: called when a connection attempt has failed +// this will occur periodically if the Steam client is not connected, +// and has failed in it's retry to establish a connection +//----------------------------------------------------------------------------- +struct SteamServerConnectFailure_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 2 }; + + EResult m_eResult; + bool m_bStillRetrying; +}; + +//----------------------------------------------------------------------------- +// Purpose: called if the client has lost connection to the Steam servers +// real-time services will be disabled until a matching SteamServersConnected_t has been posted +//----------------------------------------------------------------------------- +struct SteamServersDisconnected_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 3 }; + + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: called when the client is trying to retry logon after being unintentionally logged off +//----------------------------------------------------------------------------- +struct OBSOLETE_CALLBACK BeginLogonRetry_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 4 }; +}; + +//----------------------------------------------------------------------------- +// Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server, +// which it may be in the process of or already connected to. +// The game client should immediately disconnect upon receiving this message. +// This can usually occur if the user doesn't have rights to play on the game server. +//----------------------------------------------------------------------------- +struct ClientGameServerDeny_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 13 }; + + AppId_t m_uAppID; + uint32 m_unGameServerIP; + uint16 m_usGameServerPort; + uint16 m_bSecure; + uint32 m_uReason; +}; + +//----------------------------------------------------------------------------- +// Purpose: notifies the user that they are now the primary access point for chat messages +//----------------------------------------------------------------------------- +struct OBSOLETE_CALLBACK PrimaryChatDestinationSetOld_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 14 }; + uint8 m_bIsPrimary; +}; + +// See GSPolicyResponse_t in GameServerCommon.h for callback 115 + +//----------------------------------------------------------------------------- +// Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks) +// When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect. +// This usually occurs in the rare event the Steam client has some kind of fatal error. +//----------------------------------------------------------------------------- +struct IPCFailure_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 17 }; + enum EFailureType + { + k_EFailureFlushedCallbackQueue, + k_EFailurePipeFail, + }; + uint8 m_eFailureType; +}; + +//----------------------------------------------------------------------------- +// Purpose: Signaled whenever licenses change +//----------------------------------------------------------------------------- +struct LicensesUpdated_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 25 }; +}; + +struct AppLifetimeNotice_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 30 }; + + AppId_t m_nAppID; + int32 m_nInstanceID; + bool m_bExiting; +}; + +struct OBSOLETE_CALLBACK DRMSDKFileTransferResult_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 41 }; + + EResult m_EResult; +}; + +//----------------------------------------------------------------------------- +// callback for BeginAuthSession +//----------------------------------------------------------------------------- +struct ValidateAuthTicketResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 43 }; + + CSteamID m_SteamID; + EAuthSessionResponse m_eAuthSessionResponse; + CSteamID m_OwnerSteamID; // different from m_SteamID if borrowed +}; + +//----------------------------------------------------------------------------- +// Purpose: called when a user has responded to a microtransaction authorization request +//----------------------------------------------------------------------------- +struct MicroTxnAuthorizationResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 52 }; + + uint32 m_unAppID; // AppID for this microtransaction + uint64 m_ulOrderID; // OrderID provided for the microtransaction + uint8 m_bAuthorized; // if user authorized transaction +}; + +//----------------------------------------------------------------------------- +// Purpose: Result from RequestEncryptedAppTicket +//----------------------------------------------------------------------------- +struct EncryptedAppTicketResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 54 }; + + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// callback for GetAuthSessionTicket +//----------------------------------------------------------------------------- +struct GetAuthSessionTicketResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 63 }; + + HAuthTicket m_hAuthTicket; + EResult m_eResult; +}; + +//----------------------------------------------------------------------------- +// Purpose: sent to your game in response to a steam://gamewebcallback/ command +//----------------------------------------------------------------------------- +struct GameWebCallback_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 64 }; + char m_szURL[256]; +}; + +//----------------------------------------------------------------------------- +// Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL +//----------------------------------------------------------------------------- +struct StoreAuthURLResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 65 }; + char m_szURL[512]; +}; + + + + +// k_iClientUserCallbacks callbacks + + + +struct SystemIM_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 1 }; + + uint32 m_ESystemIMType; + char m_rgchMsgBody[4096]; +}; + +struct GuestPassGiftTarget_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 2 }; + + uint32 m_unPackageID; + uint64 m_ulSteamIDFriend; + int32 m_iPotentialGiftTarget; + int32 m_cPotentialGiftTargetsTotal; + uint8 m_bValidGiftTarget; +}; + +struct PrimaryChatDestinationSet_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 3 }; + + uint8 m_bIsPrimary; + uint8 m_bWasPrimary; +}; + +// TODO: Add callback 904 + +struct LicenseChanged_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 5 }; + + PackageId_t m_nPackageID; +}; + +struct RequestClientAppListInfo_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 6 }; + + bool m_bMedia; + bool m_bTools; + bool m_bGames; + bool m_bInstalled; +}; + +struct SetClientAppUpdateState_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 7 }; + + uint64 m_ulJobIDToPostResultTo; + AppId_t m_nAppID; + bool m_bUpdate; +}; + +struct InstallClientApp_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 8 }; + + uint64 m_ulJobIDToPostResultTo; + AppId_t m_nAppID; +}; + +struct UninstallClientApp_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 9 }; + + uint64 m_ulJobIDToPostResultTo; + AppId_t m_nAppID; +}; + +//----------------------------------------------------------------------------- +// Purpose: called when the steam2 ticket has been set +//----------------------------------------------------------------------------- +struct OBSOLETE_CALLBACK Steam2TicketChanged_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 10 }; +}; + +//----------------------------------------------------------------------------- +// Purpose: called when app news update is recieved +//----------------------------------------------------------------------------- +struct ClientAppNewsItemUpdate_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 11 }; + + uint8 m_eNewsUpdateType; // one of ENewsUpdateType + uint32 m_uNewsID; // unique news post ID + uint32 m_uAppID; // app ID this update applies to if it is of type k_EAppNews +}; + +//----------------------------------------------------------------------------- +// Purpose: steam news update +//----------------------------------------------------------------------------- +struct ClientSteamNewsItemUpdate_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 12 }; + + uint8 m_eNewsUpdateType; // one of ENewsUpdateType + + uint32 m_uNewsID; // unique news post ID + uint32 m_uHaveSubID; // conditions to control if we display this update for type k_ESteamNews + uint32 m_uNotHaveSubID; + uint32 m_uHaveAppID; + uint32 m_uNotHaveAppID; + uint32 m_uHaveAppIDInstalled; + uint32 m_uHavePlayedAppID; +}; + +//----------------------------------------------------------------------------- +// Purpose: steam cddb/bootstrapper update +//----------------------------------------------------------------------------- +struct ClientSteamNewsClientUpdate_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 13 }; + + uint8 m_eNewsUpdateType; // one of ENewsUpdateType + uint8 m_bReloadCDDB; // if true there is a new CDDB available + uint32 m_unCurrentBootstrapperVersion; + uint32 m_unCurrentClientVersion; +}; + +struct LegacyCDKeyRegistered_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 14 }; + + EResult m_eResult; + AppId_t m_iAppID; + char m_rgchCDKey[ 64 ]; +}; + +struct AccountInformationUpdated_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 15 }; + + bool m_bEmailValidationAction; +}; + +struct GuestPassSent_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 16 }; + + EResult m_eResult; +}; + +struct GuestPassAcked_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 17 }; + + EResult m_eResult; + + PackageId_t m_unPackageID; + + GID_t m_gidGuestPassID; + uint64 m_ulGuestPassKey; +}; + +struct GuestPassRedeemed_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 18 }; + + EResult m_eResult; + uint32 m_unPackageID; +}; + +struct UpdateGuestPasses_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 19 }; + + EResult m_eResult; + + uint32 m_cGuestPassesToGive; + uint32 m_cGuestPassesToRedeem; +}; + +struct LogOnCredentialsChanged_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 20 }; +}; + +struct CheckPasswordResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 22 }; + + EResult m_EResult; +}; + +struct ResetPasswordResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 23 }; + + EResult m_EResult; +}; + +struct DRMDataRequest_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 24 }; + + uint32 m_EResult; + uint32 m_unAppID; + bool m_bRestartApp; +}; + +struct DRMDataResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 25 }; + + // TODO : Reverse this callback +}; + +struct DRMFailureResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 26 }; + + // TODO : Reverse this callback +}; + +struct AppOwnershipTicketReceived_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 28 }; + + AppId_t m_nAppID; +}; + +struct PasswordChangeResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 29 }; + + EResult m_EResult; +}; + +struct EmailChangeResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 30 }; + + EResult m_EResult; + bool m_bFinal; +}; + +struct SecretQAChangeResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 31 }; + + EResult m_EResult; +}; + +struct CreateAccountResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 32 }; + + EResult m_EResult; +}; + +struct SendForgottonPasswordEmailResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 33 }; + + EResult m_EResult; +}; + +struct ResetForgottonPasswordResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 34 }; + + EResult m_EResult; +}; + +struct CreateAccountInformSteam3Response_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 35 }; + + uint32 m_EResult; +}; + +struct DownloadFromDFSResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 36 }; + + EResult m_EResult; + + char m_rgchURL[ 128 ]; +}; + +struct ClientMarketingMessageUpdate_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 37 }; +}; + +struct ValidateEmailResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 38 }; + + uint32 m_EResult; +}; + +struct RequestChangeEmailResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 39 }; + + uint32 m_EResult; +}; + +struct VerifyPasswordResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 40 }; + + uint32 m_EResult; +}; + +struct Steam2LoginResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 41 }; + + bool m_bSuccessful; + uint32 m_steam2Error; +}; + +struct WebAuthRequestCallback_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 42 }; + + bool m_bSuccessful; + char m_rgchToken[512]; +}; + +struct MicroTxnAuthRequestCallback_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 44 }; + + GID_t m_gidTransID; + AppId_t m_unAppID; +}; + +struct MicroTxnAuthResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 45 }; + + EMicroTxnAuthResult m_eAuthResult; +}; + +struct AppMinutesPlayedDataNotice_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 46 }; + + int32 m_nAppID; +}; + +struct MicroTxnInfoUpdated_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 47 }; + + EResult m_eResult; + GID_t m_gidTransID; +}; + +struct WalletBalanceUpdated_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 48 }; +}; + +struct EnableMachineLockingResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 49 }; + + uint32 m_EResult; +}; + +struct MachineLockProgressResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 50 }; + + uint32 m_EResult; +}; + +struct Steam3ExtraLoginProgress_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 51 }; // Note sure + + uint32 m_EResult; + int32 m_eState; +}; + +struct RequestAccountDataResult_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 52 }; + + EResult m_EResult; + uint32 m_cMatches; + ERequestAccountDataAction m_eAction; +}; + +struct IsAccountNameInUseResult_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 53 }; + + EResult m_EResult; + char m_szAccountNameSuggestion1[64]; + char m_szAccountNameSuggestion2[64]; + char m_szAccountNameSuggestion3[64]; +}; + +struct LoginInformationChanged_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 55 }; + + // TODO : Reverse this callback +}; + +struct RequestSpecialSurveyResult_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 56 }; + + int32 m_iSurveyID; + EResult m_eResult; + /*ESurveyState*/int32 m_eState; // 1 = denied, 4 = already complete + char m_szName[256]; + char m_szCustomURL[512]; + bool m_bIncludeSoftware; + uint8 m_ubToken[16]; +}; + +struct SendSpecialSurveyResponseResult_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 57 }; + + int32 m_iSurveyID; + EResult m_eResult; + uint8 m_ubToken[16]; +}; + +struct UpdateItemAnnouncement_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 58 }; + + uint32 m_cNewItems; +}; + +struct ChangeSteamGuardOptionsResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 59 }; + + EResult m_eResult; +}; + +struct UpdateCommentNotification_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 60 }; + + uint32 m_cNewComments; + uint32 m_cNewCommentsOwner; + uint32 m_cNewCommentsSubscriptions; +}; + +struct FriendUserStatusPublished_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 61 }; + + CSteamID m_steamIDFriend; + AppId_t m_unAppID; + char m_szStatus[512]; +}; + +struct UpdateOfflineMessageNotification_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 62 }; + + // TODO : Reverse this callback +}; + +struct FriendMessageHistoryChatLog_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 63 }; + + // TODO : Reverse this callback +}; + +struct TestAvailablePasswordResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 64 }; + + // TODO : Reverse this callback +}; + +// 65 ?? + +struct GetSteamGuardDetailsResponse_t +{ + enum { k_iCallback = k_iClientUserCallbacks + 66 }; + + // TODO : Reverse this callback +}; + +#pragma pack( pop ) + + +#endif // USERCOMMON_H diff --git a/src/public SDK/UserStatsCommon.h b/src/public SDK/UserStatsCommon.h new file mode 100644 index 0000000..482c760 --- /dev/null +++ b/src/public SDK/UserStatsCommon.h @@ -0,0 +1,289 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef USERSTATSCOMMON_H +#define USERSTATSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define STEAMUSERSTATS_INTERFACE_VERSION_001 "STEAMUSERSTATS_INTERFACE_VERSION001" +#define STEAMUSERSTATS_INTERFACE_VERSION_002 "STEAMUSERSTATS_INTERFACE_VERSION002" +#define STEAMUSERSTATS_INTERFACE_VERSION_003 "STEAMUSERSTATS_INTERFACE_VERSION003" +#define STEAMUSERSTATS_INTERFACE_VERSION_004 "STEAMUSERSTATS_INTERFACE_VERSION004" +#define STEAMUSERSTATS_INTERFACE_VERSION_005 "STEAMUSERSTATS_INTERFACE_VERSION005" +#define STEAMUSERSTATS_INTERFACE_VERSION_006 "STEAMUSERSTATS_INTERFACE_VERSION006" +#define STEAMUSERSTATS_INTERFACE_VERSION_007 "STEAMUSERSTATS_INTERFACE_VERSION007" +#define STEAMUSERSTATS_INTERFACE_VERSION_008 "STEAMUSERSTATS_INTERFACE_VERSION008" +#define STEAMUSERSTATS_INTERFACE_VERSION_009 "STEAMUSERSTATS_INTERFACE_VERSION009" +#define STEAMUSERSTATS_INTERFACE_VERSION_010 "STEAMUSERSTATS_INTERFACE_VERSION010" +#define STEAMUSERSTATS_INTERFACE_VERSION_011 "STEAMUSERSTATS_INTERFACE_VERSION011" + +#define CLIENTUSERSTATS_INTERFACE_VERSION "CLIENTUSERSTATS_INTERFACE_VERSION002" + + +// size limit on stat or achievement name (UTF-8 encoded) +enum { k_cchStatNameMax = 128 }; + +// maximum number of bytes for a leaderboard name (UTF-8 encoded) +enum { k_cchLeaderboardNameMax = 128 }; + +// maximum number of details int32's storable for a single leaderboard entry +enum { k_cLeaderboardDetailsMax = 64 }; + +// handle to a single leaderboard +typedef uint64 SteamLeaderboard_t; + +// handle to a set of downloaded entries in a leaderboard +typedef uint64 SteamLeaderboardEntries_t; + +//----------------------------------------------------------------------------- +// types of user game stats fields +// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN DATABASE +//----------------------------------------------------------------------------- +enum ESteamUserStatType +{ + k_ESteamUserStatTypeINVALID = 0, + k_ESteamUserStatTypeINT = 1, + k_ESteamUserStatTypeFLOAT = 2, + // Read as FLOAT, set with count / session length + k_ESteamUserStatTypeAVGRATE = 3, + k_ESteamUserStatTypeACHIEVEMENTS = 4, + k_ESteamUserStatTypeGROUPACHIEVEMENTS = 5, +}; + +// type of data request, when downloading leaderboard entries +enum ELeaderboardDataRequest +{ + k_ELeaderboardDataRequestGlobal = 0, + k_ELeaderboardDataRequestGlobalAroundUser = 1, + k_ELeaderboardDataRequestFriends = 2, + k_ELeaderboardDataRequestUsers = 3, +}; + +// the display type (used by the Steam Community web site) for a leaderboard +enum ELeaderboardDisplayType +{ + k_ELeaderboardDisplayTypeNone = 0, + k_ELeaderboardDisplayTypeNumeric = 1, // simple numerical score + k_ELeaderboardDisplayTypeTimeSeconds = 2, // the score represents a time, in seconds + k_ELeaderboardDisplayTypeTimeMilliSeconds = 3, // the score represents a time, in milliseconds +}; + +enum ELeaderboardUploadScoreMethod +{ + k_ELeaderboardUploadScoreMethodNone = 0, + k_ELeaderboardUploadScoreMethodKeepBest = 1, // Leaderboard will keep user's best score + k_ELeaderboardUploadScoreMethodForceUpdate = 2, // Leaderboard will always replace score with specified +}; + +// the sort order of a leaderboard +enum ELeaderboardSortMethod +{ + k_ELeaderboardSortMethodNone = 0, + k_ELeaderboardSortMethodAscending = 1, // top-score is lowest number + k_ELeaderboardSortMethodDescending = 2, // top-score is highest number +}; + +enum EGetAchievementIcon +{ + k_EGetAchievementIconUser = 0, + k_EGetAchievementIconAchieved = 1, + k_EGetAchievementIconUnachieved = 2, +}; + +#pragma pack( push, 8 ) + +// a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry() +struct LeaderboardEntry001_t +{ + CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info + int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard + int32 m_nScore; // score as set in the leaderboard + int32 m_cDetails; // number of int32 details available for this entry +}; + +struct LeaderboardEntry002_t +{ + CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info + int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard + int32 m_nScore; // score as set in the leaderboard + int32 m_cDetails; // number of int32 details available for this entry + UGCHandle_t m_hUGC; // handle for UGC attached to the entry +}; + +typedef LeaderboardEntry002_t LeaderboardEntry_t; + +//----------------------------------------------------------------------------- +// Purpose: called when the latests stats and achievements have been received +// from the server +//----------------------------------------------------------------------------- +struct UserStatsReceived_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 1 }; + + uint64 m_nGameID; // Game these stats are for + EResult m_eResult; // Success / error fetching the stats + CSteamID m_steamIDUser; // The user for whom the stats are retrieved for +}; + + +//----------------------------------------------------------------------------- +// Purpose: result of a request to store the user stats for a game +//----------------------------------------------------------------------------- +struct UserStatsStored_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 2 }; + + uint64 m_nGameID; // Game these stats are for + EResult m_eResult; // success / error +}; + + +//----------------------------------------------------------------------------- +// Purpose: result of a request to store the achievements for a game, or an +// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress +// are zero, that means the achievement has been fully unlocked. +//----------------------------------------------------------------------------- +struct UserAchievementStored_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 3 }; + + uint64 m_nGameID; // Game this is for + bool m_bGroupAchievement; // if this is a "group" achievement + char m_rgchAchievementName[k_cchStatNameMax]; // name of the achievement + uint32 m_nCurProgress; // current progress towards the achievement + uint32 m_nMaxProgress; // "out of" this many +}; + + +//----------------------------------------------------------------------------- +// Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard() +// use CCallResult<> to map this async result to a member function +//----------------------------------------------------------------------------- +struct LeaderboardFindResult_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 4 }; + + SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found + uint8 m_bLeaderboardFound; // 0 if no leaderboard found +}; + + +//----------------------------------------------------------------------------- +// Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries() +// use CCallResult<> to map this async result to a member function +//----------------------------------------------------------------------------- +struct LeaderboardScoresDownloaded_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 5 }; + + SteamLeaderboard_t m_hSteamLeaderboard; + SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries() + int m_cEntryCount; // the number of entries downloaded +}; + + +//----------------------------------------------------------------------------- +// Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore() +// use CCallResult<> to map this async result to a member function +//----------------------------------------------------------------------------- +struct LeaderboardScoreUploaded_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 6 }; + + uint8 m_bSuccess; // 1 if the call was successful + SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was + int32 m_nScore; // the score that was attempted to set + uint8 m_bScoreChanged; // true if the score in the leaderboard change, false if the existing score was better + int m_nGlobalRankNew; // the new global rank of the user in this leaderboard + int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard +}; + +struct NumberOfCurrentPlayers_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 7 }; + + uint8 m_bSuccess; // 1 if the call was successful + int32 m_cPlayers; // Number of players currently playing +}; + +//----------------------------------------------------------------------------- +// Purpose: Callback indicating that a user's stats have been unloaded. +// Call RequestUserStats again to access stats for this user +//----------------------------------------------------------------------------- +struct UserStatsUnloaded_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 }; + + CSteamID m_steamIDUser; // User whose stats have been unloaded +}; + +//----------------------------------------------------------------------------- +// Purpose: Callback indicating that an achievement icon has been fetched +//----------------------------------------------------------------------------- +struct UserAchievementIconFetched_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 9 }; + + CGameID m_nGameID; // Game this is for + char m_rgchAchievementName[k_cchStatNameMax]; // name of the achievement + bool m_bAchieved; // Is the icon for the achieved or not achieved version? + int m_nIconHandle; // Handle to the image, which can be used in ClientUtils()->GetImageRGBA(), 0 means no image is set for the achievement +}; + +//----------------------------------------------------------------------------- +// Purpose: Callback indicating that global achievement percentages are fetched +//----------------------------------------------------------------------------- +struct GlobalAchievementPercentagesReady_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 10 }; + + uint64 m_nGameID; // Game this is for + EResult m_eResult; // Result of the operation +}; + +//----------------------------------------------------------------------------- +// Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC() +//----------------------------------------------------------------------------- +struct LeaderboardUGCSet_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 11 }; + + EResult m_eResult; // The result of the operation + SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was +}; + +//----------------------------------------------------------------------------- +// Purpose: callback indicating global stats have been received. +// Returned as a result of RequestGlobalStats() +//----------------------------------------------------------------------------- +struct GlobalStatsReceived_t +{ + enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 }; + + uint64 m_nGameID; // Game global stats were requested for + EResult m_eResult; // The result of the request +}; + +#pragma pack( pop ) + + + + +#endif // USERSTATSCOMMON_H diff --git a/src/public SDK/UtilsCommon.h b/src/public SDK/UtilsCommon.h new file mode 100644 index 0000000..a7163f0 --- /dev/null +++ b/src/public SDK/UtilsCommon.h @@ -0,0 +1,225 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef UTILSCOMMON_H +#define UTILSCOMMON_H +#ifdef _WIN32 +#pragma once +#endif + + + +#define CLIENTUTILS_INTERFACE_VERSION "CLIENTUTILS_INTERFACE_VERSION001" + +#define STEAMUTILS_INTERFACE_VERSION_001 "SteamUtils001" +#define STEAMUTILS_INTERFACE_VERSION_003 "SteamUtils003" +#define STEAMUTILS_INTERFACE_VERSION_002 "SteamUtils002" +#define STEAMUTILS_INTERFACE_VERSION_004 "SteamUtils004" +#define STEAMUTILS_INTERFACE_VERSION_005 "SteamUtils005" +#define STEAMUTILS_INTERFACE_VERSION_006 "SteamUtils006" +#define STEAMUTILS_INTERFACE_VERSION_007 "SteamUtils007" +#define STEAMUTILS_INTERFACE_VERSION_008 "SteamUtils008" +#define STEAMUTILS_INTERFACE_VERSION_009 "SteamUtils009" + + +// Steam API call failure results +typedef enum ESteamAPICallFailure +{ + k_ESteamAPICallFailureNone = -1, // no failure + k_ESteamAPICallFailureSteamGone = 0, // the local Steam process has gone away + k_ESteamAPICallFailureNetworkFailure = 1, // the network connection to Steam has been broken, or was already broken + // SteamServersDisconnected_t callback will be sent around the same time + // SteamServersConnected_t will be sent when the client is able to talk to the Steam servers again + k_ESteamAPICallFailureInvalidHandle = 2, // the SteamAPICall_t handle passed in no longer exists + k_ESteamAPICallFailureMismatchedCallback = 3,// GetAPICallResult() was called with the wrong callback type for this API call +} ESteamAPICallFailure; + +typedef enum EConfigStore +{ + k_EConfigStoreInvalid = 0, + k_EConfigStoreInstall = 1, + k_EConfigStoreUserRoaming = 2, + k_EConfigStoreUserLocal = 3, + k_EConfigStoreMax = 4, +} EConfigStore; + +//----------------------------------------------------------------------------- +// results for CheckFileSignature +//----------------------------------------------------------------------------- +enum ECheckFileSignature +{ + k_ECheckFileSignatureInvalidSignature = 0, + k_ECheckFileSignatureValidSignature = 1, + k_ECheckFileSignatureFileNotFound = 2, + k_ECheckFileSignatureNoSignaturesFoundForThisApp = 3, + k_ECheckFileSignatureNoSignaturesFoundForThisFile = 4, +}; + +enum ESpewGroup +{ + k_ESpewGroupConsole = 0, + k_ESpewGroupPublish = 1, + k_ESpewGroupBootstrap = 2, + k_ESpewGroupStartup = 3, + k_ESpewGroupService = 4, + k_ESpewGroupFileop = 5, + k_ESpewGroupSystem = 6, + k_ESpewGroupSmtp = 7, + k_ESpewGroupAccount = 8, + k_ESpewGroupJob = 9, + k_ESpewGroupCrypto = 10, + k_ESpewGroupNetwork = 11, + k_ESpewGroupVac = 12, + k_ESpewGroupClient = 13, + k_ESpewGroupContent = 14, + k_ESpewGroupCloud = 15, + k_ESpewGroupLogon = 16, + k_ESpewGroupClping = 17, + k_ESpewGroupThreads = 18, + k_ESpewGroupBsnova = 19, + k_ESpewGroupTest = 20, + k_ESpewGroupFiletx = 21, + k_ESpewGroupStats = 22, + k_ESpewGroupSrvping = 23, + k_ESpewGroupFriends = 24, + k_ESpewGroupChat = 25, + k_ESpewGroupGuestpass = 26, + k_ESpewGroupLicense = 27, + k_ESpewGroupP2p = 28, + k_ESpewGroupDatacoll = 29, + k_ESpewGroupDrm = 30, + k_ESpewGroupSvcm = 31, + k_ESpewGroupHttpclient = 32, + k_ESpewGroupHttpserver = 33, +}; + +//----------------------------------------------------------------------------- +// Purpose: codes for well defined launch options +//----------------------------------------------------------------------------- +enum ELaunchOptionType +{ + k_ELaunchOptionType_None = 0, // unknown what launch option does + k_ELaunchOptionType_Default = 1, // runs the game, app, whatever in default mode + k_ELaunchOptionType_SafeMode = 2, // runs the game in safe mode + k_ELaunchOptionType_Multiplayer = 3, // runs the game in multiplayer mode + k_ELaunchOptionType_Config = 4, // runs config tool for this game + k_ELaunchOptionType_VR = 5, // runs game in VR mode + k_ELaunchOptionType_Server = 6, // runs dedicated server for this game + k_ELaunchOptionType_Editor = 7, // runs game editor + k_ELaunchOptionType_Manual = 8, // shows game manual + k_ELaunchOptionType_Benchmark = 9, // runs game benchmark + k_ELaunchOptionType_Option1 = 10, // generic run option, uses description field for game name + k_ELaunchOptionType_Option2 = 11, // generic run option, uses description field for game name + k_ELaunchOptionType_Option3 = 12, // generic run option, uses description field for game name + + + k_ELaunchOptionType_Dialog = 1000, // show launch options dialog +}; + +enum EUIMode +{ + k_EUIModeNormal = 0, + k_EUIModeTenFoot = 1, +}; + +enum EGamepadTextInputMode +{ + // TODO: Reverse this enum +}; + +enum EGamepadTextInputLineMode +{ + // TODO: Reverse this enum +}; + +enum EWindowType +{ + // TODO: Reverse this enum +}; + +#pragma pack( push, 8 ) +//----------------------------------------------------------------------------- +// Purpose: The country of the user changed +//----------------------------------------------------------------------------- +struct IPCountry_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 1 }; +}; + + +//----------------------------------------------------------------------------- +// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute +//----------------------------------------------------------------------------- +struct LowBatteryPower_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 2 }; + + uint8 m_nMinutesBatteryLeft; +}; + +//----------------------------------------------------------------------------- +// Purpose: called when a SteamAsyncCall_t has completed (or failed) +//----------------------------------------------------------------------------- +struct SteamAPICallCompleted_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 3 }; + + SteamAPICall_t m_hAsyncCall; +}; + +//----------------------------------------------------------------------------- +// called when Steam wants to shutdown +//----------------------------------------------------------------------------- +struct SteamShutdown_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 4 }; +}; + +//----------------------------------------------------------------------------- +// callback for CheckFileSignature +//----------------------------------------------------------------------------- +struct CheckFileSignature_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 5 }; + + ECheckFileSignature m_eCheckFileSignature; +}; + +struct SteamConfigStoreChanged_t +{ + enum { k_iCallback = k_iSteamUtilsCallbacks + 11 }; + + EConfigStore m_eConfigStore; + char m_szRootOfChanges[ 255 ]; +}; + + + +// k_iClientUtilsCallbacks + + + +struct CellIDChanged_t +{ + enum { k_iCallback = k_iClientUtilsCallbacks + 3 }; + + CellID_t m_nCellID; +}; + +#pragma pack( pop ) + + +#endif // UTILSCOMMON_H diff --git a/src/public SDK/VideoCommon.h b/src/public SDK/VideoCommon.h new file mode 100644 index 0000000..9f9cd49 --- /dev/null +++ b/src/public SDK/VideoCommon.h @@ -0,0 +1,66 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef VIDEOCOMMON_H +#define VIDEOCOMMON_H +#ifdef _WIN32 +#pragma once +#endif +#define STEAMVIDEO_INTERFACE_VERSION_001 "STEAMVIDEO_INTERFACE_V001" +#define STEAMVIDEO_INTERFACE_VERSION_002 "STEAMVIDEO_INTERFACE_V002" + +//----------------------------------------------------------------------------- +// Purpose: Broadcast upload result details +//----------------------------------------------------------------------------- +enum EBroadcastUploadResult +{ + k_EBroadcastUploadResultNone = 0, // broadcast state unknown + k_EBroadcastUploadResultOK = 1, // broadcast was good, no problems + k_EBroadcastUploadResultInitFailed = 2, // broadcast init failed + k_EBroadcastUploadResultFrameFailed = 3, // broadcast frame upload failed + k_EBroadcastUploadResultTimeout = 4, // broadcast upload timed out + k_EBroadcastUploadResultBandwidthExceeded = 5, // broadcast send too much data + k_EBroadcastUploadResultLowFPS = 6, // broadcast FPS too low + k_EBroadcastUploadResultMissingKeyFrames = 7, // broadcast sending not enough key frames + k_EBroadcastUploadResultNoConnection = 8, // broadcast client failed to connect to relay + k_EBroadcastUploadResultRelayFailed = 9, // relay dropped the upload + k_EBroadcastUploadResultSettingsChanged = 10, // the client changed broadcast settings + k_EBroadcastUploadResultMissingAudio = 11, // client failed to send audio data + k_EBroadcastUploadResultTooFarBehind = 12, // clients was too slow uploading + k_EBroadcastUploadResultTranscodeBehind = 13, // server failed to keep up with transcode +}; + + + +#pragma pack( push, 8 ) + +DEFINE_CALLBACK( BroadcastUploadStart_t, k_iClientVideoCallbacks + 4 ) +END_DEFINE_CALLBACK_0() + +DEFINE_CALLBACK( BroadcastUploadStop_t, k_iClientVideoCallbacks + 5 ) + CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult ) +END_DEFINE_CALLBACK_1() + +DEFINE_CALLBACK( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 ) + CALLBACK_MEMBER( 0, EResult, m_eResult ) + CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) + CALLBACK_MEMBER( 2, char, m_rgchURL[256] ) +END_DEFINE_CALLBACK_1() + +#pragma pack( pop ) + + +#endif // VIDEOCOMMON_H diff --git a/src/public SDK/Win32Library.h b/src/public SDK/Win32Library.h new file mode 100644 index 0000000..ccced58 --- /dev/null +++ b/src/public SDK/Win32Library.h @@ -0,0 +1,51 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#pragma once + +class DynamicLibrary +{ +public: + DynamicLibrary(const char* cszPath) + { + m_handle = LoadLibraryA(cszPath); + } + + ~DynamicLibrary() + { + if(m_handle) + FreeLibrary(m_handle); + } + + void * GetSymbol(const char* cszSymbol) const + { + if(!m_handle) + return NULL; + + return (void *)GetProcAddress(m_handle, cszSymbol); + } + + bool IsLoaded() const + { + return m_handle != NULL; + } + +private: + HMODULE m_handle; + + DynamicLibrary(const DynamicLibrary&); + void operator=(const DynamicLibrary&); +}; diff --git a/src/public SDK/gameserveritem.h b/src/public SDK/gameserveritem.h new file mode 100644 index 0000000..086b695 --- /dev/null +++ b/src/public SDK/gameserveritem.h @@ -0,0 +1,95 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef GAMESERVERITEM_H +#define GAMESERVERITEM_H +#ifdef _WIN32 +#pragma once +#endif + +//----------------------------------------------------------------------------- +// Purpose: Data describing a single server +//----------------------------------------------------------------------------- +class gameserveritem_t +{ +public: + gameserveritem_t(); + + const char* GetName() const; + void SetName( const char *pName ); + +public: + servernetadr_t m_NetAdr; // IP/Query Port/Connection Port for this server + int m_nPing; // current ping time in milliseconds + bool m_bHadSuccessfulResponse; // server has responded successfully in the past + bool m_bDoNotRefresh; // server is marked as not responding and should no longer be refreshed + char m_szGameDir[32]; // current game directory + char m_szMap[32]; // current map + char m_szGameDescription[64]; // game description + uint32 m_nAppID; // Steam App ID of this server + int m_nPlayers; // current number of players on the server + int m_nMaxPlayers; // Maximum players that can join this server + int m_nBotPlayers; // Number of bots (i.e simulated players) on this server + bool m_bPassword; // true if this server needs a password to join + bool m_bSecure; // Is this server protected by VAC + uint32 m_ulTimeLastPlayed; // time (in unix time) when this server was last played on (for favorite/history servers) + int m_nServerVersion; // server version as reported to Steam + +private: + char m_szServerName[64]; // Game server name + + // For data added after SteamMatchMaking001 add it here +public: + char m_szGameTags[128]; // the tags this server exposes + CSteamID m_steamID; // steamID of the game server - invalid if it's doesn't have one (old server, or not connected to Steam) +}; + + +inline gameserveritem_t::gameserveritem_t() +{ + m_szGameDir[0] = m_szMap[0] = m_szGameDescription[0] = m_szServerName[0] = 0; + m_bHadSuccessfulResponse = m_bDoNotRefresh = m_bPassword = m_bSecure = false; + m_nPing = m_nAppID = m_nPlayers = m_nMaxPlayers = m_nBotPlayers = m_ulTimeLastPlayed = m_nServerVersion = 0; + m_szGameTags[0] = 0; +} + +inline const char* gameserveritem_t::GetName() const +{ + // Use the IP address as the name if nothing is set yet. + if ( m_szServerName[0] == 0 ) + return m_NetAdr.GetConnectionAddressString(); + else + return m_szServerName; +} + +#ifdef _S4N_ + #define strncpy(...) +#elif defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable: 4996) +#endif + +inline void gameserveritem_t::SetName( const char *pName ) +{ + strncpy( m_szServerName, pName, sizeof( m_szServerName ) ); + m_szServerName[ sizeof( m_szServerName ) - 1 ] = '\0'; +} + +#ifdef _MSC_VER + #pragma warning(pop) +#endif + +#endif // GAMESERVERITEM_H diff --git a/src/public SDK/isteamparentalsettings.h b/src/public SDK/isteamparentalsettings.h new file mode 100644 index 0000000..ca08348 --- /dev/null +++ b/src/public SDK/isteamparentalsettings.h @@ -0,0 +1,56 @@ +//====== Copyright � 2013-, Valve Corporation, All rights reserved. ======= +// +// Purpose: Interface to Steam parental settings (Family View) +// +//============================================================================= + +#ifndef ISTEAMPARENTALSETTINGS_H +#define ISTEAMPARENTALSETTINGS_H +#ifdef _WIN32 +#pragma once +#endif + +#include "SteamTypes.h" + +// Feature types for parental settings +enum EParentalFeature +{ + k_EFeatureInvalid = 0, + k_EFeatureStore = 1, + k_EFeatureCommunity = 2, + k_EFeatureProfile = 3, + k_EFeatureFriends = 4, + k_EFeatureNews = 5, + k_EFeatureTrading = 6, + k_EFeatureSettings = 7, + k_EFeatureConsole = 8, + k_EFeatureBrowser = 9, + k_EFeatureParentalSetup = 10, + k_EFeatureLibrary = 11, + k_EFeatureTest = 12, + k_EFeatureMax +}; + +class ISteamParentalSettings001 +{ +public: + virtual bool BIsParentalLockEnabled() = 0; + virtual bool BIsParentalLockLocked() = 0; + + virtual bool BIsAppBlocked( AppId_t nAppID ) = 0; + virtual bool BIsAppInBlockList( AppId_t nAppID ) = 0; + + virtual bool BIsFeatureBlocked( EParentalFeature eFeature ) = 0; + virtual bool BIsFeatureInBlockList( EParentalFeature eFeature ) = 0; +}; + +//----------------------------------------------------------------------------- +// Purpose: Callback for querying UGC +//----------------------------------------------------------------------------- +struct SteamParentalSettingsChanged_t +{ + enum { k_iCallback = 5000 + 1 }; +}; + + +#endif // ISTEAMPARENTALSETTINGS_H diff --git a/src/public SDK/servernetadr.h b/src/public SDK/servernetadr.h new file mode 100644 index 0000000..61eb29b --- /dev/null +++ b/src/public SDK/servernetadr.h @@ -0,0 +1,165 @@ +//========================== Open Steamworks ================================ +// +// This file is part of the Open Steamworks project. All individuals associated +// with this project do not claim ownership of the contents +// +// The code, comments, and all related files, projects, resources, +// redistributables included with this project are Copyright Valve Corporation. +// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the +// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, +// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the +// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition +// Zero are trademarks and or registered trademarks of Valve Corporation. +// All other trademarks are property of their respective owners. +// +//============================================================================= + +#ifndef SERVERNETADR_H +#define SERVERNETADR_H +#ifdef _WIN32 +#pragma once +#endif + + +// servernetadr_t is all the addressing info the serverbrowser needs to know about a game server, +// namely: its IP, its connection port, and its query port. +class servernetadr_t +{ +public: + servernetadr_t() : m_usConnectionPort( 0 ), m_usQueryPort( 0 ), m_unIP( 0 ) {} + + void Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort ); +#ifdef NETADR_H + void Init( const netadr_t &ipAndQueryPort, uint16 usConnectionPort ); + netadr_t& GetIPAndQueryPort(); +#endif + + // Access the query port. + uint16 GetQueryPort() const; + void SetQueryPort( uint16 usPort ); + + // Access the connection port. + uint16 GetConnectionPort() const; + void SetConnectionPort( uint16 usPort ); + + // Access the IP + uint32 GetIP() const; + void SetIP( uint32 ); + + // This gets the 'a.b.c.d:port' string with the connection port (instead of the query port). + const char *GetConnectionAddressString() const; + const char *GetQueryAddressString() const; + + // Comparison operators and functions. + bool operator<(const servernetadr_t &netadr) const; + void operator=( const servernetadr_t &that ) + { + m_usConnectionPort = that.m_usConnectionPort; + m_usQueryPort = that.m_usQueryPort; + m_unIP = that.m_unIP; + } + +private: + const char *ToString( uint32 unIP, uint16 usPort ) const; + uint16 m_usConnectionPort; // (in HOST byte order) + uint16 m_usQueryPort; + uint32 m_unIP; +}; + + +inline void servernetadr_t::Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort ) +{ + m_unIP = ip; + m_usQueryPort = usQueryPort; + m_usConnectionPort = usConnectionPort; +} + +#ifdef NETADR_H +inline void servernetadr_t::Init( const netadr_t &ipAndQueryPort, uint16 usConnectionPort ) +{ + Init( ipAndQueryPort.GetIP(), ipAndQueryPort.GetPort(), usConnectionPort ); +} + +inline netadr_t& servernetadr_t::GetIPAndQueryPort() +{ + static netadr_t netAdr; + netAdr.SetIP( m_unIP ); + netAdr.SetPort( m_usQueryPort ); + return netAdr; +} +#endif + +inline uint16 servernetadr_t::GetQueryPort() const +{ + return m_usQueryPort; +} + +inline void servernetadr_t::SetQueryPort( uint16 usPort ) +{ + m_usQueryPort = usPort; +} + +inline uint16 servernetadr_t::GetConnectionPort() const +{ + return m_usConnectionPort; +} + +inline void servernetadr_t::SetConnectionPort( uint16 usPort ) +{ + m_usConnectionPort = usPort; +} + +inline uint32 servernetadr_t::GetIP() const +{ + return m_unIP; +} + +inline void servernetadr_t::SetIP( uint32 unIP ) +{ + m_unIP = unIP; +} + +#ifdef _S4N_ + #define snprintf(...) +#elif defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable: 4996) + #ifndef snprintf + #define snprintf _snprintf + #endif +#endif + +inline const char *servernetadr_t::ToString( uint32 unIP, uint16 usPort ) const +{ + static char s[4][64]; + static int nBuf = 0; + unsigned char *ipByte = (unsigned char *)&unIP; + snprintf(s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[3]), (int)(ipByte[2]), (int)(ipByte[1]), (int)(ipByte[0]), usPort ); + s[nBuf][sizeof(s[nBuf]) - 1] = '\0'; + const char *pchRet = s[nBuf]; + ++nBuf; + nBuf %= ( (sizeof(s)/sizeof(s[0])) ); + return pchRet; +} + +#ifdef _MSC_VER + #pragma warning(pop) +#endif + + +inline const char* servernetadr_t::GetConnectionAddressString() const +{ + return ToString( m_unIP, m_usConnectionPort ); +} + +inline const char* servernetadr_t::GetQueryAddressString() const +{ + return ToString( m_unIP, m_usQueryPort ); +} + +inline bool servernetadr_t::operator<(const servernetadr_t &netadr) const +{ + return ( m_unIP < netadr.m_unIP ) || ( m_unIP == netadr.m_unIP && m_usQueryPort < netadr.m_usQueryPort ); +} + +#endif // SERVERNETADR_H